Skip to main content

theglobalfuel-sdk

Official Python SDK for Theglobalfuel — upstream energy & commodities operations on the Burdenoff platform.

Pre-launch notice: Theglobalfuel is launching in 2026. This package is published ahead of general availability so integrators can build early. There is no live production service yet — join the waitlist at theglobalfuel.com to get early access.

This SDK is a thin shell over burdenoff-sdk-libs. It mounts the shared platform modules plus the Theglobalfuel domain module and a standalone sandbox module, and exposes them as one ergonomic, fully typed client.

Features

  • Async/await throughout, built on httpx
  • Dual-endpoint GraphQL client (workspace + global gateways)
  • 23 mounted modules: the shared generic set + theglobalfuel + sandbox
  • Multiple auth flows: email/password, device code, PKCE, client credentials
  • Automatic token refresh
  • Typed error hierarchy
  • Full type hints with py.typed marker

Installation

pip install theglobalfuel-sdk

# Development install
pip install -e ".[dev]"

Quick Start

import asyncio
import os

from burdenoff_sdk_libs.modules.auth.types import SignInInput

from theglobalfuel_sdk import TheglobalfuelSDK


async def main():
    # Defaults to the shared production gateways. Override endpoints for local dev
    # via workspace_endpoint / global_endpoint or THEGLOBALFUEL_* env vars.
    sdk = TheglobalfuelSDK()

    try:
        await sdk.auth.sign_in(
            SignInInput(
                username=os.environ["THEGLOBALFUEL_EMAIL"],
                password=os.environ["THEGLOBALFUEL_PASSWORD"],
            )
        )
        await sdk.auth.issue_workspace_token(
            workspace_id=os.environ["THEGLOBALFUEL_WORKSPACE_ID"],
            organization_id=os.environ["THEGLOBALFUEL_ORGANIZATION_ID"],
        )
        assets = await sdk.theglobalfuel.assets.list()
        contracts = await sdk.theglobalfuel.contracts.list()
        print(f"Fetched {len(assets.items)} assets and {len(contracts.items)} contracts")
    finally:
        await sdk.close()


asyncio.run(main())

Nested namespace

Per the platform mandate (no compatibility shim), every module surface is nested under its owning module. The Theglobalfuel domain bundle keeps its sub-entities nested:

await sdk.theglobalfuel.assets.list()
await sdk.theglobalfuel.production.list()
await sdk.theglobalfuel.reserves.list()
await sdk.theglobalfuel.contracts.list()
await sdk.theglobalfuel.shipments.list()
await sdk.theglobalfuel.inventory.list()
await sdk.theglobalfuel.emissions.list()
await sdk.theglobalfuel.compliance.list()
await sdk.theglobalfuel.system.health()

Modules

All methods are async. The following modules are mounted on the TheglobalfuelSDK instance: auth, billing, channels, conversations, devportal, export, files, groups, health, integrations, theglobalfuel, notifications, organizations, products, rbac, sandbox, scheduler, security, store, support, tags, tours, workspaces.

Configuration

from theglobalfuel_sdk import TheglobalfuelSDK

sdk = TheglobalfuelSDK(
    workspace_endpoint="https://graphqlworkspaces.burdenoff.com/workspaces/graphql",
    global_endpoint="https://graphql.burdenoff.com/global/graphql",
    client_id=None,                         # optional OIDC client id
    oidc_issuer=None,                       # derived from global_endpoint
    api_key=None,
    access_token=None,
    refresh_token=None,
    workspace_token=None,
    timeout=30.0,
    auto_refresh=True,
)

Error Handling

from burdenoff_sdk_libs.modules.auth.types import SignInInput

from theglobalfuel_sdk import (
    TheglobalfuelError,
    AuthenticationError,
    AuthorizationError,
    NetworkError,
    ValidationError,
    RateLimitError,
    DeviceCodeExpiredError,
    DeviceCodeDeniedError,
)

try:
    await sdk.auth.sign_in(SignInInput(username="user@example.com", password="wrong"))
except AuthenticationError:
    print("Invalid credentials")
except NetworkError:
    print("Could not reach the API")
except TheglobalfuelError as e:
    print(f"SDK error: {e}")

Development

python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"

make format        # black + isort
make lint          # flake8
make type-check    # mypy (strict)
make test          # pytest
make sanity        # format-check + lint + type-check + test (cov>=80) + build

License

Proprietary — Copyright Burdenoff Consultancy Services Pvt. Ltd.

Support

Metadata

Release files for theglobalfuel-sdk 2026.1123.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for theglobalfuel-sdk 2026.1123.1
File Size Uploaded Provenance Actions
theglobalfuel_sdk-2026.1123.1.tar.gz 15.0 kB Without provenance Details for theglobalfuel_sdk-2026.1123.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for theglobalfuel-sdk 2026.1123.1
File Interpreter ABI Platform Actions
theglobalfuel_sdk-2026.1123.1-py3-none-any.whl Python 3 none any Details for theglobalfuel_sdk-2026.1123.1-py3-none-any.whl

Total release size: 23.2 kB

Release files / theglobalfuel_sdk-2026.1123.1.tar.gz

Download URL theglobalfuel_sdk-2026.1123.1.tar.gz
Size 15.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a3bbe4b70c1f7f26b8d752235b498bdb463620a26d367aba2a680f69311ba47c
BLAKE2b-256 checksum
How to use checksums
73aaea352a6c3a25f1a63417af792888c7f3fcc32f39362cd64f3a564b74c1c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.18

Release files / theglobalfuel_sdk-2026.1123.1-py3-none-any.whl

Download URL theglobalfuel_sdk-2026.1123.1-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bc60d3240f333567aabdad935c26bef0faf132949a2fc398db1cd9ea4bcb702d
BLAKE2b-256 checksum
How to use checksums
e5475fee05c91dcba347ecd8df6e600e7319db03ca3b507c798f6b9e7b05fd91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.18

Security for theglobalfuel-sdk 2026.1123.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

2026.1123.1 This release

2 release files No provenance

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