Skip to main content

PyCule

PyPI version

Wrapper to access the MCule and Enamine APIs

MCule

MCuleWrapper talks to the standard MCule API (base url https://mcule.com/api/v1/). Public endpoints (database files, compound details, InChIKey lookup, single query search) work without authentication; everything else requires an API access token sent as an Authorization: Token <token> header. To request a token, email MCule with a summary of your intended use, per their docs.

from pycule import MCuleWrapper

mcule = MCuleWrapper(authorisation_token="your-mcule-token")

mcule.databasefiles()
mcule.compounddetails("Mcule-1234567")
mcule.inchikeylookup("IHHITLNORGKBTP-UHFFFAOYSA-N")
mcule.singlequerysearch("CCO")

# Protected endpoints (require a valid token).
mcule.compoundavailability("Mcule-1234567")
mcule.compoundprices("Mcule-1234567")
mcule.compoundpricesamount("Mcule-1234567", amount=10)
mcule.multiplequeriessearch(["Mcule-1234567", "CCO"])
mcule.multiplequerieswithavailability(["Mcule-1234567", "CCO"])
mcule.similaritysearch("CCO", limit=5, threshold=0.7)
mcule.substructuresearch("CCO")

Documented rate limits:

Burst Sustained
Anonymous (no token) 10/min 100/day
Authenticated (with token) 20/min 200/hour

The Compound list details and Quote Request (POST) endpoints have their own, stricter limits — see the docs for details. On a 429 response, check the Retry-After header/body before retrying.

MCule ULTIMATE

UltimateMCuleWrapper talks to the separate MCule ULTIMATE API (base url https://ultimateapp.mcule.com/api/v1/), which searches MCule's larger make-on-demand "Ultimate" compound space. It requires its own access token (also requested from MCule by email) and is not interchangeable with a standard MCule API token.

from pycule import UltimateMCuleWrapper

ultimate = UltimateMCuleWrapper(authorisation_token="your-ultimate-token")

ultimate.exact_search("CCO")
ultimate.similarity_search("CCO", limit=5, sim_threshold=0.7)
ultimate.substructure_search("CCO", limit=5)
ultimate.price_search_multi(["IHHITLNORGKBTP-UHFFFAOYSA-N"], amounts=[10])
ultimate.quote_request_multi(
    ["IHHITLNORGKBTP-UHFFFAOYSA-N"], amounts=[10], delivery_country="GB"
)

Documented rate limits:

Per minute Per day
Anonymous (no token) 10 100
Authenticated (with token) 100 1000

Enamine

EnamineWrapper talks to the current EnamineStore API (JWT-based auth, /api/v2 endpoints). Authentication, token refresh and HTTP 429 (rate limit) retries with backoff are all handled transparently.

from pycule import EnamineWrapper

enamine = EnamineWrapper(email="you@example.com", password="your-password")

# Exact-match searches (synchronous). Accept a single identifier or a list -
# lists are automatically split into batches of `batch_size` (default 2000,
# Enamine's documented recommendation for the Code Search endpoint).
enamine.compoundidsearch(["EN300-17264", "EN300-456830", "Z234859494"])
enamine.cassearch(["110-86-1", "91-17-8"], catalog="building-blocks")
enamine.mfcdsearch(["MFCD00011732"], catalog="building-blocks")

# Exact SMILES search (asynchronous "delayed result", polled to completion).
enamine.exactsearch(["C=1C=CN=CC1", "CC(N)=O"], catalog="building-blocks")

# Substructure/similarity searches only accept a single query SMILES per call.
enamine.substructuresearch("CC(N)=O", catalog="building-blocks")
enamine.similaritysearch("CC(N)=O", catalog="building-blocks", similarity_value=0.8)

Valid catalog values: "building-blocks", "screening-compounds", "made-building-blocks", "real", "bioactive-compounds".

Enamine does not currently publish its API rate limits. Rather than guessing, requests are retried with exponential backoff when an HTTP 429 is received; once the real limits are known, this can be tightened up in pycule/decorators.py.

Metadata

Release files for PyCule 0.3.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 PyCule 0.3.0
File Size Uploaded Provenance Actions
pycule-0.3.0.tar.gz 16.6 kB With provenance Details for pycule-0.3.0.tar.gz

Release files / pycule-0.3.0.tar.gz

Download URL pycule-0.3.0.tar.gz
Size 16.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1b2a8a8be42f81fbce69b0208b241e31a9ed3d8d166acb4c0efe6e55da59af20
BLAKE2b-256 checksum
How to use checksums
1d7586395ed850b37c7ece97764c23338d3099b8f80f85d113aa3f9bbc1c0d7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Dec 1, 2026.

Transparency log

Security for PyCule 0.3.0

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.

Full provenance

1 file in this release has been uploaded with provenance metadata.

Attestation for pycule-0.3.0.tar.gz

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 Dec 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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