Skip to main content

Official Python SDK for Fulkruma — stock + warehouses + shipping + licenses + deliveries. HMAC-signed requests with full parity to the Node SDK.

Project description

fulkruma (Python)

Official Python SDK for Fulkruma — stock, warehouses, shipping, licenses, deliveries. Mirrors the Node SDK (@forjio/fulkruma-node) API surface 1:1.

Install

pip install fulkruma

Quickstart

from fulkruma import FulkrumaClient

client = FulkrumaClient(
    key_id="AKIAFULK...",
    secret="sk_...",
    base_url="https://fulkruma.com",          # default
)

# Create a warehouse
wh = client.warehouses.create({"name": "Jakarta DC", "city": "Jakarta"})

# Adjust stock
client.stock.adjust({
    "variantId": "var_1",
    "warehouseId": wh["warehouse"]["id"],
    "delta": 50,
    "reason": "initial_stock",
})

# List shipments
shipments = client.shipments.list(status="in_transit")

Platform-admin scope

Keys with the fulkruma:platform:admin scope can operate against any merchant via the X-Fulkruma-On-Behalf-Of header. Either pass it on the client:

admin = FulkrumaClient(key_id="...", secret="...", on_behalf_of="acc_merchant")

…or scope a single call:

client.shipments.list(on_behalf_of="acc_merchant")

for_merchant(account_id) returns a cloned client locked to one merchant.

Webhook verification

from fulkruma import verify_webhook

# Flask
@app.post("/webhooks/fulkruma")
def hook():
    raw = request.get_data()  # bytes — verify the raw body, NOT parsed JSON
    sig = request.headers.get("Fulkruma-Signature", "")
    event = verify_webhook(raw_body=raw, signature=sig, secret=os.environ["WHSEC"])
    # event["type"], event["data"], etc.
    return "", 204

Resource namespaces

Namespace Methods
products create, get, list, update, archive, add_variant, update_variant, archive_variant
warehouses create, list, update, archive
stock levels, movements, reservations, adjust
addresses list, create, delete
shipments list, get, create
shipping couriers, origin, set_origin, rates
licenses list, issue, revoke, activate, deactivate, validate
deliveries list, get, create
api_keys list, create, revoke
audit_log list
billing plans, current_plan, subscription, usage, invoices, checkout, cancel
integrations status
stats overview
webhooks list_endpoints, create_endpoint, update_endpoint, delete_endpoint, list_events
admin provision_workspace, get_workspace, partner_usage

License

MIT

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

fulkruma-0.1.0.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

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

fulkruma-0.1.0-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fulkruma-0.1.0.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for fulkruma-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3b4426d5f74003e83b845d0454396a60bbc190ab152852d369b0cdcb8e6ee8ec
MD5 1b8f39b105e7e085bc394dcff0a20fc0
BLAKE2b-256 03544d2e5347ce2f5d9068a21eda7a7464653cf52d0fb9398c1a867346bc299a

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for fulkruma-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cf302e7242d6b86b6371460ba5b00f39d10bfea44e0b91a41e22e80272c6eff8
MD5 37d2f5389c954c6f9450f11f95360402
BLAKE2b-256 bbbfd6b75b6f45d73604da8f2d937ec8d4b9d3381669628fcdb8aaceb320c8de

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