Skip to main content

Official Refactual REST API client for Python.

Project description

refactual-sdk

Official Refactual REST API client for Python.

Status: preview — this package is not yet published on PyPI. The API shape below is stable; until the publish lands, call the REST API directly with requests / httpx.

# Once published:
pip install refactual-sdk

Quickstart

from refactual import Refactual

client = Refactual(api_key="rk_live_...")
reply  = client.chat.completions.create(
    model="claude-sonnet-4-6",
    messages=[{"role": "user", "content": "Explain async/await"}],
)
print(reply["content"])

OAuth 2.0 (client_credentials)

token = Refactual(api_key="rk_placeholder").oauth.token(
    client_id="rc_live_xxx",
    client_secret="rcs_live_xxx",
    scope=["chat:write", "chat:read"],
)
client = Refactual(access_token=token["access_token"])

Webhook verification

from refactual import verify_webhook
verify_webhook(raw_body, request.headers.get("Refactual-Signature"), secret)

See API.md for the full reference.

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

refactual_sdk-0.1.0.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

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

refactual_sdk-0.1.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file refactual_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: refactual_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for refactual_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d6b4957614d9a1c7cec2d577147bf75e5ceace881cd580aeb286ae995a9d2377
MD5 40ef4bb964fc6f81f60095d93cab76da
BLAKE2b-256 64e1e8c5713ea4c8d8d2e0fdc79c4e7cf35ca59d7f53f63eccf34568a0f8d015

See more details on using hashes here.

Provenance

The following attestation bundles were made for refactual_sdk-0.1.0.tar.gz:

Publisher: release-sdk-py.yml on refactual/refactual

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file refactual_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: refactual_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for refactual_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3f6fecc51412a2d2aa86b2d04baf76af5655164218877068f7610a20a65f9381
MD5 d0b8130ec42f24c6218e632497364b52
BLAKE2b-256 170463aa95e3185b4d0fd56b89afc472b92ae222f30f84a30586dedd511502c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for refactual_sdk-0.1.0-py3-none-any.whl:

Publisher: release-sdk-py.yml on refactual/refactual

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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