Skip to main content

Python client for the onepot API

Project description

onepot-python

Python client for the onepot API.

Installation

uv add onepot
# or
pip install onepot

Usage

from onepot import Client

client = Client(api_key="your-api-key")

response = client.search(
    smiles_list=["Cc1c(C(=O)Nc2ccc(N3CC(C)OC(C)C3)nc2)cccc1-c1ccc(OC(F)(F)F)cc1", ...],
    max_results=10,
    include_chemistry_risk_score=True,
)

Ordering

order = client.order(
    smiles=["CCO", "c1ccccc1"],
    email="you@example.com",
    notes="Optional notes",
)
# {"order_id": "a1b2c3d4-...", "molecule_count": 2}

Pricing

Credits are charged per SMILES in the query:

Option Credits per SMILES
Base search 1
include_chemistry_risk=True 5
include_chemistry_risk_score=True 10

Response Format

{
    "queries": [
        {
            "query_smiles": "Cc1c(C(=O)Nc2ccc(N3CC(C)OC(C)C3)nc2)cccc1-c1ccc(OC(F)(F)F)cc1",
            "query_inchikey": "VZZJRYRQSPEMTK-CALCHBBNSA-N",
            "results": [
                {
                    "chemistry_risk": "medium",     # if include_chemistry_risk=True
                    "chemistry_risk_score": 0.5,    # if include_chemistry_risk_score=True
                    "inchikey": "VZZJRYRQSPEMTK-UHFFFAOYSA-N",
                    "price_usd": 590,
                    "similarity": 1.0,
                    "smiles": "Cc1c(C(=O)Nc2ccc(N3CC(C)OC(C)C3)nc2)cccc1-c1ccc(OC(F)(F)F)cc1",
                    "supplier_risk": "high",
                },
                ...
            ]
        },
        ...
    ],
    "credits_used": 10,
    "credits_remaining": 990
}

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

onepot-0.1.3.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

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

onepot-0.1.3-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file onepot-0.1.3.tar.gz.

File metadata

  • Download URL: onepot-0.1.3.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for onepot-0.1.3.tar.gz
Algorithm Hash digest
SHA256 c48546f78a758b4c9adf002c3c7f40202fcf25474618eee6f0ade8865443ca1a
MD5 5328295d835b66baf2d465d99dfa1f78
BLAKE2b-256 80d31f8e15a6a94841747bd2e6abe1ef2e18a5861c5f7bcacf7a66f71cd2dab2

See more details on using hashes here.

File details

Details for the file onepot-0.1.3-py3-none-any.whl.

File metadata

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

File hashes

Hashes for onepot-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5fd27c35dfd39886cd1f69edb8c70cb3b0fab7f050a9150be428540b3fdb5de2
MD5 b0fff89f499172e25dd3f23afc1c7a77
BLAKE2b-256 234828ddde07a27fa43b479b489f08a33255520886bb780dc2a33b33473f9467

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