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 TypeScript 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

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

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

Examples

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.

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


If this project is helpful to you, please give us a ⭐️

Made with ❤️ by Datalayer

Datalayer Logo

Release files for datalayer-core 1.2.7

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.7
File Size Uploaded
datalayer_core-1.2.7.tar.gz 4.8 MB Details

Built distribution (wheel)

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

Total release size: 8.1 MB

Release files / datalayer_core-1.2.7.tar.gz

Download URL datalayer_core-1.2.7.tar.gz
Size 4.8 MB
Tags Source
SHA-256 checksum
How to use checksums
a9867b955f691e65cb1bdde66bcf72518fe9c3d2d32b7316d96c21f92a1ed577
BLAKE2b-256 checksum
How to use checksums
222f9c5f864d4bf99a703c60636afd68e239a71ab25e7e68c7fd55acccff32ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.11

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

Download URL datalayer_core-1.2.7-py3-none-any.whl
Size 3.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
d6caf98cb4ab4af36e8d20124135fefdb7f999b47c7112177312bb2de6150b25
BLAKE2b-256 checksum
How to use checksums
874714b9597f88185c083637ebac31b7bc630c0211fd61faa877dec3260c1355
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.11

Release history Release notifications | RSS feed

1.2.12

2 release files

1.2.11

1 release file

1.2.10

1 release file

1.2.9

2 release files

1.2.8

2 release files

This release

1.2.7 This release

2 release files

1.2.6

1 release file

1.2.5

1 release file

1.2.4

1 release file

1.2.3

1 release file

1.2.2

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.67

1 release file

1.1.66

1 release file

1.1.65

1 release file

1.1.64

1 release file

1.1.63

1 release file

1.1.62

1 release file

1.1.61

1 release file

1.1.60

1 release file

1.1.57

1 release file

1.1.56

1 release file

1.1.54

1 release file

1.1.53

1 release file

1.1.52

1 release file

1.1.51

1 release file

1.1.50

1 release file

1.1.48

1 release file

1.1.47

1 release file

1.1.45

1 release file

1.1.44

1 release file

1.1.43

1 release file

1.1.42

1 release file

1.1.41

1 release file

1.1.40

1 release file

1.1.39

1 release file

1.1.38

1 release file

1.1.37

1 release file

1.1.36

1 release file

1.1.35

1 release file

1.1.34

1 release file

1.1.33

1 release file

1.1.32

1 release file

1.1.31

1 release file

1.1.30

1 release file

1.1.29

1 release file

1.1.28

1 release file

1.1.27

1 release file

1.1.26

1 release file

1.1.25

1 release file

1.1.24

1 release file

1.1.23

1 release file

1.1.22

1 release file

1.1.21

1 release file

1.1.19

1 release file

1.1.18

1 release file

1.1.17

1 release file

1.1.16

1 release file

1.1.15

1 release file

1.1.14

1 release file

1.1.13

1 release file

1.1.12

1 release file

1.1.11

1 release file

1.1.10

1 release file

1.1.9

1 release file

1.1.8

1 release file

1.1.7

1 release file

1.1.6

1 release file

1.1.5

1 release file

1.1.4

1 release file

1.1.3

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.34

1 release file

1.0.33

1 release file

1.0.31

2 release files

1.0.30

2 release files

1.0.29

2 release files

1.0.28

1 release file

1.0.25

1 release file

1.0.24

1 release file

1.0.23

1 release file

1.0.22

1 release file

1.0.21

1 release file

1.0.20

1 release file

1.0.19

1 release file

1.0.15

1 release file

1.0.14

1 release file

1.0.13

1 release file

1.0.12

1 release file

1.0.11

1 release file

1.0.10

1 release file

1.0.9

1 release file

1.0.8

1 release file

1.0.7

1 release file

1.0.6

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.1

1 release file

1.0.0

1 release file

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