A Python package for Altastata data processing and machine learning integration
Project description
Altastata Python Package
Sovereign encrypted data fabric for any cloud Python SDK — with support for fsspec, PyTorch, TensorFlow, LangChain, AI Agents, Databricks, Snowflake (via S3), boto3/S3 CLI, gRPC, and a bundled Web UI User Console.
Package version 1.0.6.9 is built on the Java/BSL runtime from
sovereign-data-fabric v2026.07.25
(bundled altastata-services uber jar + MCP).
pip install altastata
What you get
- Sovereign storage: Encrypted files in S3, Azure, IBM COS, and other clouds (
AltaStataFunctions) - Pythonic APIs: Standard Python file I/O via fsspec (
create_filesystem) - PyTorch: Train and load datasets directly from encrypted cloud paths (
AltaStataPyTorchDataset) - TensorFlow: Same for TensorFlow /
tf.data(AltaStataTensorFlowDataset) - LangChain & AI Agents: RAG loaders and agent tools over encrypted data; gateway auto-starts
- S3-compatible API: boto3, aws CLI, s3fs on port 9876 — including Snowflake external stages that read S3
- Distributed apps: gRPC API (Python client + JS clients via port 9877)
- Sharing & events: Users share encrypted files with each other; Python apps subscribe to SHARE/DELETE notifications
- Web UI User Console: Finder-style file manager in the browser (http://127.0.0.1:9877)
- Big Data: Databricks / Apache Spark (AltaStata Hadoop FS JAR)
Configure your account
See USER_SETUP_GUIDE.md for create-account (CLI/SDK), inline credentials, and account types.
altastata help # list CLI commands
from altastata import AltaStataFunctions
f = AltaStataFunctions.from_account_dir(
"~/.altastata/accounts/amazon.rsa.bob123",
password="your_password",
)
Quick start
from_account_dir / from_credentials auto-start the bundled Java gateway (Web UI User Console + gRPC + S3).
from altastata import AltaStataFunctions
# RSA / PQC
f = AltaStataFunctions.from_account_dir(
"/path/to/.altastata/accounts/amazon.rsa.bob123",
password="your_password",
)
# HPCS / HSM — empty password
f = AltaStataFunctions.from_account_dir(
"/path/to/.altastata/accounts/amazon.rsa.hpcs.myuser",
password="",
)
print(f.list_cloud_versions("Public/", True))
Ports
One bundled Java process (altastata-services) listens on:
- 9877: gRPC (file ops, auth, events) + Web UI User Console at http://127.0.0.1:9877
- 9876: S3-compatible REST API
fsspec
from altastata import AltaStataFunctions
from altastata.fsspec import create_filesystem
f = AltaStataFunctions.from_account_dir("/path/to/account", password="secret")
fs = create_filesystem(f, "my_account")
with fs.open("Public/readme.txt", "r") as fh:
print(fh.read())
Works with pandas, dask, and other fsspec consumers.
LangChain & AI Agents
LangChain / RAG
Load encrypted documents without copying them to local disk:
from altastata import AltaStataFunctions
from altastata.fsspec import create_filesystem
from langchain_core.documents import Document
f = AltaStataFunctions.from_account_dir("/path/to/account", password="secret")
fs = create_filesystem(f, "my_account")
with fs.open("Public/docs/policy.txt", "r") as fh:
docs = [Document(page_content=fh.read(), metadata={"source": "Public/docs/policy.txt"})]
TextLoader, DirectoryLoader, and other LangChain loaders work via the altastata:// fsspec protocol once the filesystem is registered — see examples/fsspec-example/ and full RAG pipelines in examples/rag-example/.
Integration with AI Agents
Python agents (LangGraph, notebooks, scripts) use the same AltaStataFunctions /
fsspec APIs as above — from_account_dir auto-starts the gateway. For external
agents that speak MCP over stdio (Claude Desktop, Cursor/Windsurf, …), see
altastata-mcp
(altastata mcp is optional).
S3-compatible API (boto3, aws CLI, s3fs)
f = AltaStataFunctions.from_account_dir("/path/to/account", password="secret")
s3 = f.boto3_s3() # pip install boto3
s3.put_object(Bucket="altastata-bucket", Key="hello.txt", Body=b"hi")
f.install_aws_env() # AWS_* for !aws s3 ls in Jupyter
Snowflake
Snowflake can read AltaStata-backed objects through the S3-compatible gateway:
- External stage via S3: point Snowflake at the bundled S3 Gateway (
http://host:9876) as an S3-compatible endpoint for encrypted objects in your backing bucket. - Snowpark Python: use fsspec /
create_filesystemin Snowpark notebooks to read AltaStata paths with the same account credentials.
PyTorch
from altastata import AltaStataFunctions, AltaStataPyTorchDataset
from altastata.altastata_pytorch_dataset import register_altastata_functions_for_pytorch
f = AltaStataFunctions.from_account_dir("/path/to/account", password="secret")
register_altastata_functions_for_pytorch(f, "my_account")
dataset = AltaStataPyTorchDataset("my_account", root_dir="Public/", file_pattern="*.jpg")
See examples/pytorch-example/.
TensorFlow
from altastata import AltaStataFunctions, AltaStataTensorFlowDataset
from altastata.altastata_tensorflow_dataset import register_altastata_functions_for_tensorflow
f = AltaStataFunctions.from_account_dir("/path/to/account", password="secret")
register_altastata_functions_for_tensorflow(f, "my_account")
dataset = AltaStataTensorFlowDataset(
"my_account",
root_dir="Public/",
file_pattern="*.jpg",
)
See examples/tensorflow-example/.
Event notifications
AltaStata lets users share encrypted files with each other. When files are shared or deleted, Python applications can catch those events in real time and react (refresh caches, notify users, trigger pipelines).
def on_event(name, data):
print(name, data)
f = AltaStataFunctions.from_account_dir(
"/path/to/account",
password="secret",
)
f.add_event_listener(on_event)
SHARE and DELETE events also appear in the Web UI User Console and via gRPC EventsService.Watch.
See examples/event-listener-example/.
Web UI User Console
The wheel ships a browser file manager. Start the gateway:
altastata-grpc-server
# same as: python -m altastata.grpc_server
Open http://127.0.0.1:9877 — Miller-column browser, upload/download, share, generate keys, and live refresh on SHARE/DELETE events.
Sign in: Settings → Choose account folder → Sign in
- RSA / PQC: Use your account password.
- HPCS / HSM: Leave the password blank.
Set ALTASTATA_WEB_UI_DIR= (empty) to disable the UI and run gRPC-only.
More documentation
- Developers (build wheel, bundle JAR + Console SPA, PyPI): README-developer.md
- Examples: examples/
Questions?
Email contact@altastata.com.
License
Licensed under the Apache License, Version 2.0 — see LICENSE.
The Python / TypeScript sources in this repository are Apache 2.0. Bundled AltaStata
Java runtime JARs (when present under altastata/lib/) remain under the
Business Source License 1.1.
See NOTICE for attribution of bundled components.
Appendix: Databricks / Apache Spark
Spark / Databricks use the AltaStata Hadoop filesystem JAR so jobs can read
encrypted paths (altastata://… or a configured Hadoop URI).
The Hadoop JAR is not inside the altastata pip wheel. Download it from the
release assets:
https://github.com/AltaStata/sovereign-data-fabric/releases/tag/v2026.07.25
(altastata-hadoop-*-uber.jar).
You also need the signed Bouncy Castle JARs on the Spark classpath. Use the
same versions as in this package’s runtime lib (after pip install altastata,
look under …/site-packages/altastata/lib/):
bcprov-jdk18on-1.85.jarbcpkix-jdk18on-1.85.jarbcutil-jdk18on-1.85.jar
You can copy those files from the installed package, or take the matching lib/
set from altastata-services-*-uber.zip on the same release page.
Put all of them on the Spark / Databricks classpath
(spark.driver.extraClassPath / spark.executor.extraClassPath, or the
cluster’s jars / init-script install path). On Databricks (or other Spark)
Python notebooks you can still pip install altastata for account setup and
local helpers; the cluster job itself needs the Hadoop + Bouncy Castle JARs on
the Spark classpath separately.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file altastata-1.0.6.9.tar.gz.
File metadata
- Download URL: altastata-1.0.6.9.tar.gz
- Upload date:
- Size: 142.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d4466579f932f15ccfc1a6ef90966fd563830c04f6c70f9e9849b48d2ead9f8
|
|
| MD5 |
7573e1d641a914fb71ac49bb9b85d57a
|
|
| BLAKE2b-256 |
1702a44045206e78c5473ec37c9d197b13d230448a4ae98682b11bee713ad33b
|
File details
Details for the file altastata-1.0.6.9-py3-none-any.whl.
File metadata
- Download URL: altastata-1.0.6.9-py3-none-any.whl
- Upload date:
- Size: 142.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00aee691bb27dd05ed98bbedc8d24ba38cc1d0a1a8029583fd5b8fd428db63f8
|
|
| MD5 |
eb0af93f8768cdbfd505e62c76568b9c
|
|
| BLAKE2b-256 |
c13a002a7135606e18717a3fd9c7cfb5c8ca2588bd654796fe8d6467711da73f
|