Skip to main content

SporeDB

CI PyPI version Python versions License

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 Deploy on Railway ~3 min
Render Deploy to 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.

Metadata

Release files for sporedb 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sporedb 0.1.0
File Size Uploaded
sporedb-0.1.0.tar.gz 196.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sporedb 0.1.0
File Interpreter ABI Platform
sporedb-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 461.2 kB

Release files / sporedb-0.1.0.tar.gz

Download URL sporedb-0.1.0.tar.gz
Size 196.5 kB
Tags Source
SHA-256 checksum
How to use checksums
11fcb8c8e0d12e7e762152cbc7378c5a95499029d44039ee272529f8da3129a4
BLAKE2b-256 checksum
How to use checksums
0b0be59bbab67baff661f0824484e46ff456ae0cc06628f51d445ae31476f878
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 11, 2026.

Transparency log

Release files / sporedb-0.1.0-py3-none-any.whl

Download URL sporedb-0.1.0-py3-none-any.whl
Size 264.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
32c4bde0f20f5b998b44d7ccde0f52abb34cd901c9f69347ea7b7c06812adbfa
BLAKE2b-256 checksum
How to use checksums
ca825256ae5d5d9845e0080aa9b5d1f1f907f865e3351adf21ee50f17a2d2feb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release 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