Python and Typescript libraries for Datalayer
Datalayer Core is the foundational package that powers the Datalayer AI Platform. It provides a TypesScript and Python packages as a Command Line Interface (CLI) for AI engineers, data scientists, and researchers to seamlessly integrate scalable compute runtimes into their workflows.
This package serves as the base foundation used by many other Datalayer packages, containing core application classes, configuration, and unified APIs for authentication, runtime management, and code execution in cloud-based environments.
- 🔐 Simple Authentication: Easy token-based authentication with environment variable support
- 🔒 Secrets Management: Securely handle sensitive data and credentials in your workflows
- 🐍 Python Client: Programmatic access to Datalayer platform with context managers and clean resource management
- 🌐 TypeScript/React Client: React components and services for building Jupyter-based applications
- 💻 Command Line Interface: CLI tools for account and platform operations
- 🔧 Base Classes: Core application classes and configuration inherited by other Datalayer projects
- 📓 Jupyter Integration: ServiceManager and collaboration providers for notebook experiences
- 🧭 Universal Navigation: Smart navigation hooks that auto-detect and work with React Router, Next.js, or native browser
Install Datalayer Core using pip:
pip install datalayer-coreInstall as an npm package:
npm install @datalayer/coregit clone https://github.com/datalayer/core.git
cd core
# Python development
pip install -e .[test]
# TypeScript development
npm installSet your Datalayer token as an environment variable:
export DATALAYER_API_KEY="your-api-key"Or pass it directly to the Client:
from datalayer_core import DatalayerClient
# Using environment variable
client = DatalayerClient()
# Or pass token directly
client = DatalayerClient(api_key="your-api-key-here")
if client.authenticate():
print("Successfully authenticated!")Runtime execution, snapshot workflows, and evals CLI are now documented and maintained in:
Use agent-runtimes for runtime workloads (RuntimeClient, @datalayer, snapshots, and evals), and use datalayer-core for account/platform operations (authentication, secrets, API keys, usage, profile).
Examples have moved to Agent Runtimes:
Datalayer adds AI capabilities and scalable compute runtimes to your development workflows. The platform is designed to seamlessly integrate into your existing processes and supercharge your computations with the processing power you need.
Key platform features accessible through this Client and CLI:
- Remote Runtimes: Execute code on powerful remote machines with CPU, RAM, and GPU resources
- Multiple Interfaces: Access and consume runtimes through Python Client, CLI, or other integrated tools
- Scalable Compute: Dynamically scale your computational resources based on workload requirements
- Command Line Interface (CLI): https://datalayer.ai/docs/cli/
- Core Python Client: core.datalayer.tech/python/
- Platform Documentation: docs.datalayer.app
- API Reference: API documentation
# Build TypeScript library
npm run build:lib
# Build Python package
python -m build# Install Python dependencies
pip install -e .[test]
# Install TypeScript dependencies
npm installThis project maintains high code quality standards with automated linting, formatting, and type checking:
# Run all checks (format, lint, type-check)
npm run check
# Auto-fix all issues
npm run check:fix
# Individual commands
npm run lint # ESLint with React/TypeScript rules
npm run lint:fix # Auto-fix linting issues
npm run format # Prettier formatting
npm run format:check # Check formatting without changes
npm run type-check # TypeScript compilation checkPre-commit hooks automatically run formatting and linting on staged files via Husky and lint-staged.
# Python tests
pip install -e .[test]
pytest datalayer_core/tests/
# TypeScript tests
npm run test
# TypeScript type checking
npm run type-check
npm run test:watch # Watch mode
npm run test:coverage # With coverageThis Client is designed to be simple and extensible. We welcome contributions! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Submit a pull request
For issues and enhancement requests, please use the GitHub issue tracker.
Datalayer Core serves as the foundation for the entire Datalayer ecosystem:
- Base Classes: Core application classes inherited by other Datalayer packages
- Configuration Management: Centralized configuration system for all Datalayer components
- Authentication Layer: Unified authentication across all Datalayer services
- Runtime Abstraction: Common interface for different types of compute runtimes
- Resource Management: Automatic cleanup and lifecycle management
- AI/ML Development: Scale your machine learning workflows with cloud compute using Client or CLI
- Data Analysis: Process large datasets with powerful remote runtimes
- Research: Collaborate on computational research with reproducible environments
- Automation: Integrate Datalayer into CI/CD pipelines and automated workflows using CLI tools
- Prototyping: Quickly test ideas without local hardware limitations
This project is licensed under the BSD 3-Clause License.
- Documentation: Datalayer Platform Documentation
- Issues: GitHub Issues
- Community: Datalayer Platform
🚀 AI Agents for Data Analysis
Get started with Datalayer today!