
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@datalayer/core
Advanced tools
Datalayer Core
The foundational Python SDK for the Datalayer AI Platform
Datalayer Core is the foundational package that powers the Datalayer AI Platform. It provides both a Python SDK and 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.
Install Datalayer Core using pip:
pip install datalayer-core
Install as an npm package:
npm install @datalayer/core
git clone https://github.com/datalayer/core.git
cd core
# Python development
pip install -e .[test]
# TypeScript development
npm install
Set your Datalayer token as an environment variable:
export DATALAYER_TOKEN="your-token-here"
Or pass it directly to the SDK:
from datalayer_core import DatalayerClient
# Using environment variable
client = DatalayerClient()
# Or pass token directly
client = DatalayerClient(token="your-token-here")
if client.authenticate():
print("Successfully authenticated!")
Use context managers to create runtimes and ensure proper resource cleanup:
from datalayer_core import DatalayerClient
client = DatalayerClient()
# Execute code in a managed runtime
with client.create_runtime() as runtime:
response = runtime.execute("print('Hello from Datalayer!')")
print(response.stdout)
The CLI provides command-line access to Datalayer platform features:
# List available runtimes
datalayer runtime list
# Create a new runtime
datalayer runtime create ai-env --given-name my-runtime-123
# Execute a script in a runtime
datalayer runtime exec my-script.py --runtime <runtime-id>
# Create a snapshot from a runtime but do not terminate the runtime
datalayer snapshots create <pod-name> my-snapshot 'AI work!' False
For comprehensive Python usage examples, see the examples/
directory which includes:
@datalayer
Run the interactive examples locally:
# Install dependencies
npm install
# Set your Datalayer API token in .env
echo "VITE_DATALAYER_API_TOKEN=your-token-here" > .env
# Start the examples server
npm run example
Available at http://localhost:3000/:
A complete Next.js application demonstrating platform integration:
cd examples/nextjs-notebook
npm install
npm run dev
Features:
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 SDK and CLI:
# Build TypeScript library
npm run build:lib
# Build Python package
python -m build
# Install Python dependencies
pip install -e .[test]
# Install TypeScript dependencies
npm install
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.
# 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
This SDK is designed to be simple and extensible. We welcome contributions! Please:
For issues and enhancement requests, please use the GitHub issue tracker.
Datalayer Core serves as the foundation for the entire Datalayer ecosystem:
This project is licensed under the BSD 3-Clause License.
🚀 AI Platform for Data Analysis
Get started with Datalayer today!
FAQs
**Datalayer Core**
The npm package @datalayer/core receives a total of 72 weekly downloads. As such, @datalayer/core popularity was classified as not popular.
We found that @datalayer/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.