Skip to main content

Datalayer

Become a Sponsor

☰ 🌀 Datalayer Core

Python and Typescript libraries for Datalayer

PyPI version Python versions License Documentation Units TestsUnits Tests

Overview

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.

Key Features

  • 🔐 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

Installation

Python Client

Install Datalayer Core using pip:

pip install datalayer-core

TypeScript/React Client

Install as an npm package:

npm install @datalayer/core

Development Installation

git clone https://github.com/datalayer/core.git
cd core

# Python development
pip install -e .[test]

# TypeScript development
npm install

Quick Start with Python

1. Authentication

Set 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!")

2. Runtime, Snapshots, and Evals

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

Examples have moved to Agent Runtimes:

Platform Integration

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

Documentation

Development

Building the Library

# Build TypeScript library
npm run build:lib

# Build Python package
python -m build

Setup

# Install Python dependencies
pip install -e .[test]

# Install TypeScript dependencies
npm install

Code Quality

This 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 check

Pre-commit hooks automatically run formatting and linting on staged files via Husky and lint-staged.

Running Tests

# 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 coverage

Contributing

This Client is designed to be simple and extensible. We welcome contributions! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Submit a pull request

For issues and enhancement requests, please use the GitHub issue tracker.

Architecture

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

Use Cases

  • 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

License

This project is licensed under the BSD 3-Clause License.

Support


Datalayer Logo

🚀 AI Agents for Data Analysis

Get started with Datalayer today!

Metadata

Release files for datalayer-core 1.2.21

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for datalayer-core 1.2.21
File Size Uploaded Provenance
datalayer_core-1.2.21.tar.gz 7.0 MB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for datalayer-core 1.2.21
File Interpreter ABI Platform
datalayer_core-1.2.21-py3-none-any.whl Python 3 none any Details

Total release size: 10.3 MB

Release files / datalayer_core-1.2.21.tar.gz

Download URL datalayer_core-1.2.21.tar.gz
Size 7.0 MB
Tags Source
SHA-256 checksum
How to use checksums
f24120bf533b50bff9f4c89c4f20df8ace3167bf861907c13b50a622180e55ee
BLAKE2b-256 checksum
How to use checksums
470719effd24b1ed2486b1fb6995fe4025bc06dec22802790a1d659f5bde7584
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release files / datalayer_core-1.2.21-py3-none-any.whl

Download URL datalayer_core-1.2.21-py3-none-any.whl
Size 3.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
41c3fd24d01769b8d6da6c5f6718023f1c30cef7ca7b355a4e43300ea35e1b67
BLAKE2b-256 checksum
How to use checksums
1b7eb3a08f3658aa60c1fa54a9de52fe0537a23ff87c8c24cda10466dbe26a72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Security for datalayer-core 1.2.21

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for datalayer_core-1.2.21.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.2.21 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page