Skip to main content

Standalone Ark open-source Pydantic models

Project description

ark-opensource

Open Pydantic schemas for describing bioreactor run setup data.

ark-opensource provides a typed data structure for the scientific inputs that define an Ark run: vessel geometry, medium composition, gas transfer, headspace conditions, and process-control setpoints. The models are useful in scripts, notebooks, services, and partner integrations that need to validate or exchange run setup payloads while preserving explicit units and domain enums.

Installation

After publication:

pip install ark-opensource

From a local build artifact:

pip install dist/ark_opensource-0.1.0-py3-none-any.whl

Quick Start

from ark_opensource import RunSetup

setup = RunSetup.model_validate(
    {
        "bioreactor": {"bioreactor_name": "BRX-1", "manufacturer": "Ark"},
        "feed_liquids": {
            "feed": {"ph": 7.1, "osmolality": 300},
        },
        "dissolved_oxygen_control": None,
        "ph_control": None,
        "agitation_control": None,
        "headspace": {"headspace_pressure": 1.0, "gas_overlay": None},
    }
)

payload = setup.model_dump(mode="json")

Data Model

RunSetup is the root object. It groups the physical vessel, liquid feeds, gas environment, and optional control loops that define the initial state and operating policy for a run.

  • bioreactor describes the hardware: reactor type, dimensions, impellers, spargers, shaker flasks, deep-well plates, and manufacturer metadata.
  • feed_liquids maps liquid names to chemically defined media or feeds. Each liquid records pH, osmolality, sugars, amino acids, ions, buffers, metabolites, and tracer concentrations with explicit concentration units.
  • headspace captures the gas-side environment: pressure, overlay gas composition, humidity, condenser efficiency, lid permeability, and time-based overlay schedules.
  • dissolved_oxygen_control represents oxygen-control strategy, setpoints, PI gains, sparger dependencies, gas limits, and scheduled or conditional flow-rate changes.
  • ph_control represents low-side and high-side pH correction using liquid additions or CO2 delivery, including controller gains, deadbands, setpoint schedules, and reagent composition.
  • agitation_control describes mixing speed, orbital diameter, scheduled speed changes, scale-control alternatives, and DO-driven agitation constraints.

The schema uses Pydantic v2 for validation and serialization. Unit and option fields are represented as string enums so JSON payloads remain portable while still being checked against the supported scientific vocabulary.

Package Layout

  • ark_opensource.RunSetup: the public root model.
  • ark_opensource.jsonb_models: nested scientific data structures.
  • ark_opensource.string_constants: units, options, and domain enums.
  • Runtime dependency: pydantic>=2.10.6.

Development

Install the package in editable mode with the optional test dependency:

python -m pip install -e ".[dev]"

Run the test suite:

python -m pytest

Publishing

Before publishing a public release, confirm the version in pyproject.toml and build a wheel and source distribution from a clean checkout.

Built artifacts are written to dist/.

License

MIT. See LICENSE.

Project details


Download files

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

Source Distribution

ark_opensource-0.1.0.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

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

ark_opensource-0.1.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file ark_opensource-0.1.0.tar.gz.

File metadata

  • Download URL: ark_opensource-0.1.0.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for ark_opensource-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3d1c1846cec8a08fe8789d3cfeee6e51d47048eedaad424e93994f6ce28ec432
MD5 536158cf474bb7453602cfae5c12bb8f
BLAKE2b-256 5d22bf9a49f933ac0f13cf6739087da16b80c0215d7c6a9d901a307935b24264

See more details on using hashes here.

File details

Details for the file ark_opensource-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ark_opensource-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for ark_opensource-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 84150d255028c741c7c6d60c9ac3677ca24dda464ea68fb85b8638870c587d86
MD5 14802f1bd1d0600914eaddcd167953ad
BLAKE2b-256 e1d9b20e368c99488c79426767a3e34e2475e17e7ba0b52795261a3928c58e74

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page