Skip to main content

east-py-io

License: BSL 1.1

I/O platform functions for the East programming language in Python.

Python equivalent of @elaraai/east-node-io - provides platform functions for S3 object storage and SQLite database operations.

Installation

pip install east-py-io

Quick Start

import asyncio
from east.runtime.compiler import compile_async
from east_py_io import python_io_platform

# Assuming you have East IR from the TypeScript compiler
# compiled_fn = compile_async(ir, python_io_platform)
# await compiled_fn()

Platform Functions

S3 Operations (s3_impl)

6 functions for AWS S3 and S3-compatible object storage (MinIO, Backblaze, etc.):

  • s3_put_object(config: S3Config, key: String, data: Blob) -> Null - Upload object (async)
  • s3_get_object(config: S3Config, key: String) -> Blob - Download object (async)
  • s3_head_object(config: S3Config, key: String) -> S3ObjectMetadata - Get metadata without downloading (async)
  • s3_delete_object(config: S3Config, key: String) -> Null - Delete object, idempotent (async)
  • s3_list_objects(config: S3Config, prefix: String, maxKeys: Integer) -> S3ListResult - List with pagination (async)
  • s3_presign_url(config: S3Config, key: String, expiresIn: Integer) -> String - Generate presigned URL (async)

S3Config structure:

{
  region: String,
  bucket: String,
  accessKeyId: Option<String>,
  secretAccessKey: Option<String>,
  endpoint: Option<String>  // For S3-compatible services
}

S3ObjectMetadata structure:

{
  key: String,
  size: Integer,
  lastModified: DateTime,
  contentType: Option<String>,
  etag: Option<String>
}

S3ListResult structure:

{
  objects: Array<S3ObjectMetadata>,
  isTruncated: Boolean,
  continuationToken: Option<String>
}

SQLite Database (sqlite_impl)

4 functions for SQLite database operations with connection pooling:

  • sqlite_connect(config: SqliteConfig) -> ConnectionHandle - Connect to database, returns handle (async)
  • sqlite_query(handle: ConnectionHandle, sql: String, params: Array<SqlParameter>) -> SqlResult - Execute parameterized query (async)
  • sqlite_close(handle: ConnectionHandle) -> Null - Close connection (async)
  • sqlite_close_all() -> Null - Close all connections, useful for cleanup (async)

SqliteConfig structure:

{
  path: String,
  readOnly: Option<Boolean>,
  memory: Option<Boolean>
}

SqlParameter variant:

String(String) | Integer(Integer) | Float(Float) | Boolean(Boolean) |
Null(Null) | Blob(Blob) | DateTime(DateTime)

SqlResult variant:

select({ rows: Array<Dict<String, SqlParameter>> }) |
insert({ rowsAffected: Integer, lastInsertId: Option<Integer> }) |
update({ rowsAffected: Integer }) |
delete({ rowsAffected: Integer })

Usage

Full Platform (Async)

from east_py_io import python_io_platform
from east.runtime.compiler import compile_async

# Use all I/O platform functions (all are async)
compiled_fn = compile_async(ir, python_io_platform)
await compiled_fn()

Individual Modules

from east_py_io import s3_impl, sqlite_impl

# Use specific platform function groups
platform = [*s3_impl, *sqlite_impl]
compiled_fn = compile_async(ir, platform)

# Or just one module
platform = [*sqlite_impl]
compiled_fn = compile_async(ir, platform)

Type Definitions

from east_py_io import (
    S3ConfigType,
    S3ObjectMetadataType,
    S3ListResultType,
    SqliteConfigType,
    SqlParameterType,
    SqlResultType,
)

# Use type definitions in your platform functions

Development

# First-time setup (installs dependencies)
make install

# Development workflow
make test          # Run test suite (17 tests)
make lint          # Run linter (ruff)
make lint-fix      # Auto-fix linting issues
make typecheck     # Type check with mypy
make check         # Run all checks (lint + typecheck + test)

# Other useful commands
make coverage      # Generate HTML coverage report
make clean         # Clean build artifacts

Claude Code plugin

The East ecosystem also ships a Claude Code plugin — East language skills, example search, and preemptive diagnostics for East code — installed separately from the elaraai marketplace:

# Inside Claude Code
/plugin marketplace add elaraai/east-workspace
/plugin install east@elaraai
# From a terminal
claude plugin marketplace add elaraai/east-workspace
claude plugin install east@elaraai

License

BSL 1.1 (Business Source License):

  • Non-production use (evaluation, testing, development) is free
  • Production use by or on behalf of for-profit entities requires a commercial license
  • Code becomes AGPL-3.0 four years after each release

See LICENSE.md for full details.

Commercial licensing: support@elara.ai

Ecosystem

  • East: Statically typed, expression-based language with serializable IR. Run portable logic across TypeScript, Python, C, and other runtimes.

    • @elaraai/east: Core language SDK with type system, expressions, and reference JS compiler
  • East Node: Node.js platform functions for I/O, databases, and system operations.

  • East C: C11 native runtime for executing East IR. Distributed via npm (launcher + per-platform optional dependencies) and as tarballs on each GitHub Release.

    • @elaraai/east-c-cli: npm launcher — installs the matching native binary as an optional dependency
    • east-c: Core runtime — type system, IR interpreter, builtins, serialization (Beast2, JSON, CSV, East text)
    • east-c-std: Console, FileSystem, Fetch, Crypto, Time, Path, Random
    • east-c-cli: CLI for running East IR programs natively
  • East Python: Python runtime, standard platform, I/O, and data-science platform functions. Published to PyPI.

    • east-py: Core Python runtime — type system, IR compiler, 212+ builtins, Cython-accelerated hot paths
    • east-py-std: Console, FileSystem, Fetch, Crypto, Time, Path, Random
    • east-py-io: SQLite, PostgreSQL, MySQL, MongoDB, Redis, S3, FTP, SFTP, XLSX, XML, compression
    • east-py-cli: CLI for running East IR programs in Python
    • east-py-datascience (PyPI) + @elaraai/east-py-datascience (npm): Optimization (MADS, Optuna, ALNS, GoogleOR), ML (XGBoost, LightGBM, NGBoost, PyTorch, Lightning, GP), Bayesian inference (PyMC), explainability (SHAP), conformal prediction (MAPIE)
  • East UI: Typed UI component definitions and React renderer, plus VS Code preview.

  • e3 — East Execution Engine: Durable execution engine for running East pipelines at scale. Git-like content-addressable storage, automatic memoization, reactive dataflow, real-time monitoring.

Links

About Elara

East is developed by Elara AI Pty Ltd, an AI-powered platform that creates economic digital twins of businesses that optimize performance. Elara combines business objectives, decisions and data to help organizations make data-driven decisions across operations, purchasing, sales and customer engagement, and project and investment planning. East powers the computational layer of Elara solutions, enabling the expression of complex business logic and data in a simple, type-safe and portable language.


Developed by Elara AI Pty Ltd.


Developed by Elara AI Pty Ltd

Download files

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

Source Distribution

elaraai_east_py_io-1.0.73.tar.gz (49.8 kB view details)

Uploaded Source

Built Distribution

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

elaraai_east_py_io-1.0.73-py3-none-any.whl (69.4 kB view details)

Uploaded Python 3

File details

Details for the file elaraai_east_py_io-1.0.73.tar.gz.

File metadata

  • Download URL: elaraai_east_py_io-1.0.73.tar.gz
  • Upload date:
  • Size: 49.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for elaraai_east_py_io-1.0.73.tar.gz
Algorithm Hash digest
SHA256 887ae022a5084a5318a509a10a912609541a893f28810d05a28fbb14842a2166
MD5 508d95453217c15fe6b5668cbd3552bc
BLAKE2b-256 02ce839562a81aa4e37f17efc74dbf3483ffb8923f0b9f43322848c71d5f8d41

See more details on using hashes here.

File details

Details for the file elaraai_east_py_io-1.0.73-py3-none-any.whl.

File metadata

File hashes

Hashes for elaraai_east_py_io-1.0.73-py3-none-any.whl
Algorithm Hash digest
SHA256 51d0619b85762906b296f3798b3604902883a7a35476a69b33b0c4359b11b344
MD5 d0c25b7a55fbbf524a5b0e3ccf16eed7
BLAKE2b-256 1bb0945fd4869d749fd3eed74c7907db5f1b07f4e2fd6492a271845d21af427d

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.75

2 files

1.0.74

2 files

This release

1.0.73 This release

2 files

1.0.72

2 files

1.0.71

2 files

1.0.70

2 files

1.0.69

2 files

1.0.68

2 files

1.0.67

2 files

1.0.66

2 files

1.0.65

2 files

1.0.64

2 files

1.0.63

2 files

1.0.62

2 files

1.0.61

2 files

1.0.60

2 files

1.0.59

2 files

1.0.58

2 files

1.0.57

2 files

1.0.56

2 files

1.0.55

2 files

1.0.54

2 files

1.0.53

2 files

1.0.52

2 files

1.0.51

2 files

1.0.50

2 files

1.0.49

2 files

1.0.48

2 files

1.0.47

2 files

1.0.46

2 files

1.0.45

2 files

1.0.44

2 files

1.0.43

2 files

1.0.42

2 files

1.0.41

2 files

1.0.40

2 files

1.0.39

2 files

1.0.38

2 files

1.0.37

2 files

1.0.36

2 files

1.0.35

2 files

1.0.34

2 files

1.0.33

2 files

1.0.32

2 files

1.0.31

2 files

1.0.30

2 files

1.0.29

2 files

1.0.28

2 files

1.0.27

2 files

1.0.26

2 files

1.0.25

2 files

1.0.24

2 files

1.0.23

2 files

1.0.22

2 files

1.0.21

2 files

1.0.20

2 files

1.0.19

2 files

1.0.18

2 files

1.0.17

2 files

1.0.16

2 files

1.0.15

2 files

1.0.14

2 files

1.0.13

2 files

1.0.12

2 files

1.0.11

2 files

1.0.10

2 files

1.0.9

2 files

1.0.8

2 files

1.0.7

2 files

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

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