Skip to main content

OneDep Remote API Library

PyPI version

Prepares data to be deposited into OneDep system through the Deposition API. JSON schemas served remotelly will be used to check metadata in mmCIF files and also check if the local deposition/session has all required files for the chosen experiment type. Checks will be carried before deposition is created on the server and files are uploaded.

Installation

uv add onedep_lib

Quickstart

import onedep_lib as dsp
from onedep_lib.config import DepositConfig

config = DepositConfig.load()

with dsp.deposit_init(
    email="depositor@example.org",
    users=["0000-0002-5109-8728"],  # ORCID IDs
    country=dsp.Country.USA,
    experiment_type=dsp.ExperimentType.XRAY,
    config=config,
) as dep:
    dep.add_file("model.cif", dsp.FileType.MMCIF_COORD)
    dep.add_file("data-sf.cif", dsp.FileType.CRYSTAL_STRUC_FACTORS)

    report = dep.check_required_files()
    if not report.ok:
        for issue in report.errors():
            print(issue.message)

    dep_id = dep.deposit()
    print(dep.get_status())

Documentation

Full documentation — configuration, authentication, the complete deposition workflow, and API reference — is at https://wwPDB.github.io/onedep_lib/.

  • Preview locally: just docs-serve (serves at http://localhost:8000)
  • Build: just docs-build

Docs deploy automatically on push to main via GitHub Actions.

Development

Run tests:

uv run pytest

Run quality checks (format, lint, type check, test):

just qa

Download files

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

Source Distribution

onedep_lib-1.0.0.tar.gz (165.5 kB view details)

Uploaded Source

Built Distribution

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

onedep_lib-1.0.0-py3-none-any.whl (42.4 kB view details)

Uploaded Python 3

File details

Details for the file onedep_lib-1.0.0.tar.gz.

File metadata

  • Download URL: onedep_lib-1.0.0.tar.gz
  • Upload date:
  • Size: 165.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for onedep_lib-1.0.0.tar.gz
Algorithm Hash digest
SHA256 39ce365e13ab46f808505590ff50fe238d43b5c2f2a11cc2b9d7a13a00b9557f
MD5 345db7730ca3528d02e996a34b93511b
BLAKE2b-256 ddde33bda18503dba2e03fcf1f19670d255d14c7767219a5a41823449e760524

See more details on using hashes here.

File details

Details for the file onedep_lib-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: onedep_lib-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 42.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for onedep_lib-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 feb826aa9f589954812d823a0f5546e23c55692ea226ef3fdfa041a524df4e27
MD5 461e98d276f86da413f096e96154989d
BLAKE2b-256 a03baa138c7d0d0cd71c72ba384a36223dcfc34b44453f9f44449d0e9f662b61

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