Skip to main content

Reference client (and optional server) for the just-dna annotation module marketplace

Project description

just-dna-marketplace

A catalog / publish / download REST API for just-dna-lite annotation modules. Authors publish module specs; the server validates, recompiles, stores, and indexes them; consumers browse, search, download, and integrity-verify. There is no frontend here — the webui and Dagster pipelines are consumers of this API.

Live: https://module-marketplace.just-dna.life · health GET /health · API under /api/v1 · interactive docs at /docs.

See docs/SPEC.md for the full design and docs/ROADMAP.md for build status.

Install

Two shapes from one package:

pip install just-dna-marketplace            # client only (lightweight): httpx + just-dna-format
pip install just-dna-marketplace[server]    # + FastAPI app, server-side recompile, storage, admin

The default install is the reference client — import it instead of re-implementing the REST calls + integrity verification:

from just_dna_marketplace import MarketplaceClient

with MarketplaceClient("https://module-marketplace.just-dna.life", token="mk_live_…") as mkt:
    print(mkt.list_modules())
    mkt.import_module("just-dna-seq", "coronary", "1.0.0", "coronary_v1.zip")   # publish a zip
    mkt.download("just-dna-seq", "coronary", "1.0.0", "./coronary")             # fetch + verify
    mkt.lookup_by_digest("sha256:…")                                            # already published?

Or the marketplace-client CLI (ships with the client install):

export MARKETPLACE_URL=https://module-marketplace.just-dna.life MARKETPLACE_TOKEN=mk_live_…
marketplace-client list
marketplace-client download just-dna-seq coronary 1.0.0 ./coronary

Run the server (needs [server])

uv sync                      # dev env (includes the server extra + tests)
uv run pytest -q
uv run marketplace issue-key <account> -n <namespace>   # mint an API key
uv run marketplace serve --host 0.0.0.0 --port 8000     # /docs for the interactive API

What works today

  • Read/catalog API — list + search (?q, ?gene, ?category, ?genome_build, ?owner, ?license, ?sort), module detail, versions, manifest (SPEC §8.1–§8.4).
  • Publish — multipart spec upload or zip/tar.gz archive import (incl. legacy parquet-only via reverse-engineering), server-side recompiled so compile_success/digest are trusted.
  • Download + integrity — per-file + streamable tar.gz, verify-then-install via just_dna_format.verify_manifest (SPEC §5).
  • Logs over the API; digest lookup; auth (static API keys) + namespace ownership; yank / un-yank; ops-only hard removal (marketplace remove-namespace/-module).

Architecture

The manifest.json of each version is the source of truth; the SQLite catalog is a rebuildable projection of it. The manifest contract and integrity primitives live in the shared, dependency-light just-dna-format package so this service and the compiler never drift.

src/just_dna_marketplace/
  config.py            # Pydantic settings
  db/                  # SQLite schema + repository (the projection)
  storage/             # StorageBackend interface + LocalStorage (HfStorage pending)
  models/api.py        # card / detail / version / page response models
  services/            # catalog (reads) + ingest (manifest -> projection)
  api/                 # FastAPI app, deps (auth/pagination), routers
  cli.py               # `marketplace` admin CLI

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

just_dna_marketplace-0.4.4.tar.gz (32.7 kB view details)

Uploaded Source

Built Distribution

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

just_dna_marketplace-0.4.4-py3-none-any.whl (46.7 kB view details)

Uploaded Python 3

File details

Details for the file just_dna_marketplace-0.4.4.tar.gz.

File metadata

  • Download URL: just_dna_marketplace-0.4.4.tar.gz
  • Upload date:
  • Size: 32.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for just_dna_marketplace-0.4.4.tar.gz
Algorithm Hash digest
SHA256 1f8de49d3a1c96ba9bdf365b9fa9d511c5d89bb82a5cab80589be7272ca76bd0
MD5 cb42b716e71788befefd4c2514ea33ce
BLAKE2b-256 69dc779fe2f9f69a8609278216e4a14b051d8e1b2d5fe026f7be63c14e14ca99

See more details on using hashes here.

File details

Details for the file just_dna_marketplace-0.4.4-py3-none-any.whl.

File metadata

  • Download URL: just_dna_marketplace-0.4.4-py3-none-any.whl
  • Upload date:
  • Size: 46.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for just_dna_marketplace-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b894d1433dbd4c7bc7fcf90b3e9003da4a46dbd9a61c9fa74405fae89ece4294
MD5 6b77e48d3623c0734b0a65a976aeb825
BLAKE2b-256 506426148e285dcba06be8dfdadb1040969b4d5e88e63f973d3e94caea73cfa9

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