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

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datalayer_core-1.1.56-py3-none-any.whl (3.0 MB view details)

Uploaded Python 3

File details

Details for the file datalayer_core-1.1.56-py3-none-any.whl.

File metadata

File hashes

Hashes for datalayer_core-1.1.56-py3-none-any.whl
Algorithm Hash digest
SHA256 05d0b3814c0c20614e3a1c90ba958948295c235baa64935aa02501034255257b
MD5 df31d01f0ac00d7ba444350a9d3b6db2
BLAKE2b-256 a44e76b989a3e417f3368b5ebd5a853d63110f1f8fab0b5c640b455bc9abe25c

See more details on using hashes here.

Release history Release notifications | RSS feed

1.1.66

1 file

1.1.65

1 file

1.1.64

1 file

1.1.63

1 file

1.1.62

1 file

1.1.61

1 file

1.1.60

1 file

1.1.57

1 file

This release

1.1.56 This release

1 file

1.1.54

1 file

1.1.53

1 file

1.1.52

1 file

1.1.51

1 file

1.1.50

1 file

1.1.48

1 file

1.1.47

1 file

1.1.45

1 file

1.1.44

1 file

1.1.43

1 file

1.1.42

1 file

1.1.41

1 file

1.1.40

1 file

1.1.39

1 file

1.1.38

1 file

1.1.37

1 file

1.1.36

1 file

1.1.35

1 file

1.1.34

1 file

1.1.33

1 file

1.1.32

1 file

1.1.31

1 file

1.1.30

1 file

1.1.29

1 file

1.1.28

1 file

1.1.27

1 file

1.1.26

1 file

1.1.25

1 file

1.1.24

1 file

1.1.23

1 file

1.1.22

1 file

1.1.21

1 file

1.1.19

1 file

1.1.18

1 file

1.1.17

1 file

1.1.16

1 file

1.1.15

1 file

1.1.14

1 file

1.1.13

1 file

1.1.12

1 file

1.1.11

1 file

1.1.10

1 file

1.1.9

1 file

1.1.8

1 file

1.1.7

1 file

1.1.6

1 file

1.1.5

1 file

1.1.4

1 file

1.1.3

1 file

1.1.2

1 file

1.1.1

1 file

1.1.0

1 file

1.0.34

1 file

1.0.33

1 file

1.0.32

2 files

1.0.31

2 files

1.0.30

2 files

1.0.29

2 files

1.0.28

1 file

1.0.27

2 files

1.0.26

2 files

1.0.25

1 file

1.0.24

1 file

1.0.23

1 file

1.0.22

1 file

1.0.21

1 file

1.0.20

1 file

1.0.19

1 file

1.0.15

1 file

1.0.14

1 file

1.0.13

1 file

1.0.12

1 file

1.0.11

1 file

1.0.10

1 file

1.0.9

1 file

1.0.8

1 file

1.0.7

1 file

1.0.6

1 file

1.0.5

1 file

1.0.4

1 file

1.0.3

1 file

1.0.1

1 file

1.0.0

1 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