Skip to main content

Rafflesia Python SDK

A typed Python client for the Rafflesia public API, generated from the server's OpenAPI contract by the oagen product generator.

pip install rafflesia-sdk
from rafflesia import Rafflesia

client = Rafflesia(api_key="...")  # or RAFFLESIA_API_KEY env var
databases = client.homology.databases.list()
releases = client.homology.databases.releases.list("tomato")
result = client.homology(
    database="tomato",
    query={
        "kind": "protein_sequence",
        "sequence": "MTEYKLVVVGAGGVGKSALTIQLIQNHFVDEYDPTIEDSYRKQ",
    },
)
batch = client.homology_many(
    database_release_id=releases.data[0].id,
    queries=[
        {"kind": "protein_sequence", "sequence": "MTEYK"},
        {"kind": "protein_sequence", "sequence": "GAGGVGKS"},
    ],
    include=[],
    limit=100,
)

Async:

from rafflesia import AsyncRafflesia

async with AsyncRafflesia(api_key="...") as client:
    result = await client.homology(
        database="tomato",
        query={"kind": "protein_sequence", "sequence": "MTEYK"},
    )
    batch = await client.homology_many(
        database="tomato",
        queries=[
            {"kind": "protein_sequence", "sequence": "MTEYK"},
            {"kind": "protein_sequence", "sequence": "GAGGVGKS"},
        ],
    )

base_url defaults to https://api.rafflesia.ai (override via the base_url argument or RAFFLESIA_API_BASE_URL). When no API key is configured the client sends anonymous requests, which is convenient against a local unauthenticated server.

Layout

  • rafflesia/resources/, rafflesia/types/generated from the OpenAPI contract; do not edit by hand. Regenerate with factory/generators/oagen/retab-gennode scripts/generate-product.mjs python.
  • rafflesia/client.py, rafflesia/_resource.py, rafflesia/exceptions.py, rafflesia/utils/ — hand-written runtime the emitter reuses; kept stable across regeneration (the emitter only prunes files it previously generated).

Download files

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

Source Distribution

rafflesia_sdk-0.2.0.tar.gz (91.7 kB view details)

Uploaded Source

Built Distribution

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

rafflesia_sdk-0.2.0-py3-none-any.whl (109.4 kB view details)

Uploaded Python 3

File details

Details for the file rafflesia_sdk-0.2.0.tar.gz.

File metadata

  • Download URL: rafflesia_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 91.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","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 rafflesia_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 dd5219814e34dc2be9ea1037f5c681e03353653b2e996cc41033979a91406e41
MD5 db08f020db4e19f48b6f0e8f20bba24f
BLAKE2b-256 2724cb39c6848b22518ab4ae3ded7e0f19c9ff50ce87d494e3e3a7e67f376d64

See more details on using hashes here.

File details

Details for the file rafflesia_sdk-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: rafflesia_sdk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 109.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","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 rafflesia_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 98cf0be34f5a084904c3761dfa68cd227f8b41113c9f1f0486368e3e53864b36
MD5 4113fe06da8aeb7083df9d9ce362389c
BLAKE2b-256 e7c02390ed936923690063ef4fa643b844f77384724f7959c332160f845e49b8

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.1

2 files

This release

0.2.0 This release

2 files

0.1.0

2 files

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