We're excited to announce the release of shipthisapi-python v3.0.0 - now with full async support!
The library has been completely rewritten to support async/await, making it perfect for modern Python applications like FastAPI, aiohttp, and other async frameworks.
import asyncio
from ShipthisAPI import ShipthisAPI
async def main():
client = ShipthisAPI(
organisation="your_org_id",
x_api_key="your_api_key"
)
await client.connect()
# Fetch shipments
shipments = await client.get_list("sea_shipment")
# Update a document
await client.patch_item(
"fcl_load",
"68a4f906743189ad061429a7",
update_fields={"container_no": "CONT123"}
)
asyncio.run(main())Server-to-server authentication is now supported via custom headers:
client = ShipthisAPI(
organisation="org_id",
custom_headers={
"authorization": "Bearer your_token",
# ... other custom headers
}
)patch_item is now the recommended way to update document fields. It provides:
- Full field validation
- Workflow triggers
- Audit logging
- Business logic execution
- All methods are now async - You must use
awaitwhen calling API methods requestsreplaced withhttpx- The library now useshttpxfor HTTP calls- Removed deprecated methods:
webhook_sync- Usepatch_iteminsteadwebhook_update- Usepatch_iteminstead
pip install shipthisapi-python==3.0.0Or update your requirements:
shipthisapi-python>=3.0.0
See CHANGELOG.md for a detailed migration guide from v2.x to v3.x.
- Open an issue on GitHub
- Contact support at support@shipthis.co