Bioprocess-native time-series database
Project description
SporeDB
Bioprocess-native time-series database for fermentation scientists, cell culture engineers, and biologics developers.
Built on Apache Arrow, Parquet, and DuckDB -- SporeDB provides first-class primitives for batch management, automatic phase detection, cross-run alignment, and regulatory-compliant audit trails (FDA 21 CFR Part 11).
Features
- Batch Management -- create, track, and compare fermentation runs with full metadata
- Automatic Phase Detection -- PELT + BOCPD algorithms identify lag, exponential, stationary, and decline phases
- Cross-Run Alignment --
align(runs, by='phase')for multi-batch comparison - FDA 21 CFR Part 11 Compliance -- cryptographic audit trails, electronic signatures, access controls
- PromQL-style Query Language -- domain-specific DSL compiled to DuckDB SQL
- Columnar Storage -- Apache Arrow + Parquet + DuckDB for fast analytical queries
- Industrial Connectors -- InfluxDB, OSIsoft PI Web API import/export
- Interactive Visualization -- Plotly-based charts for Jupyter notebooks
Installation
pip install sporedb
Optional extras
pip install sporedb[cloud] # FastAPI server, SQLAlchemy, Alembic
pip install sporedb[viz] # Plotly interactive visualizations
pip install sporedb[connectors] # InfluxDB, PI Web API connectors
pip install sporedb[all] # Everything
Quick Start
from sporedb import SporeDB
# Connect to a local SporeDB instance
with SporeDB("./my_data") as db:
# Create a batch
batch = db.create_batch("CHO-Run-001", strain="CHO-K1")
print(batch)
# Import telemetry from CSV
result = db.import_csv("telemetry.csv", "CHO-Run-001")
print(f"Imported {result.rows_imported} rows in {result.elapsed_seconds:.2f}s")
# Detect phases automatically
phases = db.detect_phases(result.batch_id)
for phase in phases:
print(f" {phase.phase_type.value}: {phase.start_ts} - {phase.end_ts}")
# Retrieve telemetry as a Pandas DataFrame
df = db.get_telemetry(result.batch_id)
print(df.head())
Expected output:
Batch CHO-Run-001 created (id=019...)
Imported 2847 rows in 0.42s
Detected 4 phases:
lag: 2024-01-01T00:00 - 2024-01-01T06:00
exponential: 2024-01-01T06:00 - 2024-01-02T12:00
stationary: 2024-01-02T12:00 - 2024-01-03T18:00
decline: 2024-01-03T18:00 - 2024-01-04T00:00
Architecture
SporeDB is a library-first database that embeds directly in your Python process:
- Storage: Apache Arrow in-memory + Parquet on-disk + DuckDB for SQL analytics
- Phase Detection: PELT (offline) and BOCPD (online) changepoint algorithms via
ruptures - Query Language: PromQL-style DSL parsed by Lark, compiled to DuckDB SQL
- Compliance: SHA-256 hash chains + Ed25519 signatures for tamper-evident audit trails
- Cloud Tier: Optional FastAPI server with PostgreSQL metadata + S3-compatible object storage
Deploy
Deploy SporeDB on your platform of choice:
| Platform | Deploy | Time |
|---|---|---|
| Railway | ~3 min | |
| Render | ~5 min | |
| Fly.io | Deploy Guide | ~5 min |
| AWS | ECS/Fargate Guide | ~20 min |
| DigitalOcean | App Platform Guide | ~10 min |
| Self-Hosted | Docker Compose Guide | ~5 min |
Quick start with Docker Compose:
git clone https://github.com/spore-db/SporeDB.git
cd SporeDB && make generate-keys && make build && make up
See all deployment guides for detailed instructions, cost estimates, and recommended sizing.
Contributing
We welcome contributions! See CONTRIBUTING.md for development setup, testing, and PR guidelines.
License
Apache-2.0 -- see LICENSE for details.
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 sporedb-0.1.0.tar.gz.
File metadata
- Download URL: sporedb-0.1.0.tar.gz
- Upload date:
- Size: 196.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11fcb8c8e0d12e7e762152cbc7378c5a95499029d44039ee272529f8da3129a4
|
|
| MD5 |
c07c5df85c653c5853d6be1cb1586f36
|
|
| BLAKE2b-256 |
0b0be59bbab67baff661f0824484e46ff456ae0cc06628f51d445ae31476f878
|
Provenance
The following attestation bundles were made for sporedb-0.1.0.tar.gz:
Publisher:
release.yml on spore-db/SporeDB
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sporedb-0.1.0.tar.gz -
Subject digest:
11fcb8c8e0d12e7e762152cbc7378c5a95499029d44039ee272529f8da3129a4 - Sigstore transparency entry: 1504257360
- Sigstore integration time:
-
Permalink:
spore-db/SporeDB@eb4679a2fd80c3fb0fc4702408cd834f74055af1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/spore-db
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@eb4679a2fd80c3fb0fc4702408cd834f74055af1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sporedb-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sporedb-0.1.0-py3-none-any.whl
- Upload date:
- Size: 264.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32c4bde0f20f5b998b44d7ccde0f52abb34cd901c9f69347ea7b7c06812adbfa
|
|
| MD5 |
49c25139d841513b17a5b88f36472073
|
|
| BLAKE2b-256 |
ca825256ae5d5d9845e0080aa9b5d1f1f907f865e3351adf21ee50f17a2d2feb
|
Provenance
The following attestation bundles were made for sporedb-0.1.0-py3-none-any.whl:
Publisher:
release.yml on spore-db/SporeDB
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sporedb-0.1.0-py3-none-any.whl -
Subject digest:
32c4bde0f20f5b998b44d7ccde0f52abb34cd901c9f69347ea7b7c06812adbfa - Sigstore transparency entry: 1504257475
- Sigstore integration time:
-
Permalink:
spore-db/SporeDB@eb4679a2fd80c3fb0fc4702408cd834f74055af1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/spore-db
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@eb4679a2fd80c3fb0fc4702408cd834f74055af1 -
Trigger Event:
push
-
Statement type: