Skip to main content

Python SDK

Official Python SDK for MoveTheWheels — async/await access to the logistics API.

Install​

pip install movethewheels-sdk

Quick start​

import asyncio
from movethewheels_sdk import MovethewheelsSDK


async def main():
# Defaults to production gateways and burdenoff_cli_movethewheels OIDC client
sdk = MovethewheelsSDK()

# Sign in with email/password
await sdk.auth.sign_in(email="[email protected]", password="secret")

# Domain operations are nested under sdk.movethewheels
customers = await sdk.movethewheels.customers.list()
orders = await sdk.movethewheels.orders.list()

# Shared cross-product modules are mounted at the top level
tags = await sdk.tags.list()

await sdk.close()


asyncio.run(main())

Environment selection​

All endpoints default to production. Select local or alpha via constructor arguments:

from movethewheels_sdk import MovethewheelsSDK

sdk = MovethewheelsSDK(
workspace_endpoint="https://alphagraphqlworkspaces.burdenoff.com/workspaces/graphql",
global_endpoint="https://alphagraphql.burdenoff.com/global/graphql",
)

Or use the high-level selector if your tooling supports it:

BURDENOFF_ENV=alpha python my_script.py

Modules​

All methods are async. Mounted modules:

auth, billing, channels, conversations, devportal, export, files, groups, health, integrations, movethewheels, notifications, organizations, products, rbac, sandbox, scheduler, security, store, support, tags, tours, workspaces.

Nested namespace​

await sdk.movethewheels.customers.list()
await sdk.movethewheels.drivers.list()
await sdk.movethewheels.vehicles.list()
await sdk.movethewheels.warehouses.list()
await sdk.movethewheels.inventory.list()
await sdk.movethewheels.orders.list()
await sdk.movethewheels.shipments.list()
await sdk.movethewheels.tracking.list()
await sdk.movethewheels.routes.list()
await sdk.movethewheels.reports.list()
await sdk.movethewheels.analytics.dashboard()

Error handling​

from movethewheels_sdk import (
MovethewheelsError,
AuthenticationError,
AuthorizationError,
NetworkError,
)

try:
await sdk.auth.sign_in(email="[email protected]", password="wrong")
except AuthenticationError:
print("Invalid credentials")
except NetworkError:
print("Could not reach the API")
except MovethewheelsError as e:
print(f"SDK error: {e}")

Source​

Published as movethewheels-sdk on PyPI; source at github.com/algoshred/movethewheels-sdk-python.

Next steps​