Skip to content

feat: convert to async using httpx (v3.0.0)#7

Merged
yashdhote merged 2 commits intomainfrom
feature/async-support
Feb 6, 2026
Merged

feat: convert to async using httpx (v3.0.0)#7
yashdhote merged 2 commits intomainfrom
feature/async-support

Conversation

@mayurrawte
Copy link
Copy Markdown
Member

Summary

Convert the library to async using httpx for better performance in async applications like FastAPI/pynexus.

BREAKING CHANGE: All methods are now async and require await.

Changes

  • Replace requests with httpx for async HTTP calls
  • All API methods now return coroutines
  • Add httpx>=0.24.0 as dependency
  • Bump version to 3.0.0

Usage

import asyncio
from ShipthisAPI import ShipthisAPI

async def main():
    client = ShipthisAPI(
        organisation="your_org_id",
        x_api_key="your_api_key"
    )

    await client.connect()
    items = await client.get_list("shipment")
    await client.patch_item("fcl_load", doc_id, {"status": "completed"})

asyncio.run(main())

Test plan

  • Verify async methods work correctly
  • Test in pynexus environment

BREAKING CHANGE: All methods are now async and require await
- Replace requests with httpx for async HTTP calls
- All API methods now return coroutines
- Add httpx as dependency
- Bump version to 3.0.0
@yashdhote yashdhote merged commit 492e751 into main Feb 6, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants