Skip to content

Releases: trycourier/courier-python

v6.0.0b0

26 Jan 17:34
71685b2
Compare
Choose a tag to compare
v6.0.0b0 Pre-release
Pre-release

We now use 🌿 Fern to generate our Python SDK. This releasing has breaking changes, it comes with several quality of life upgrades:

  • Endpoint coverage: All endpoints that are supported in our Node SDK are now also supported in python.
  • Resource-scoped SDK methods: Endpoints are scoped under their resource. For example, instead of courier.deleteBrands the SDK now reads courier.brands.delete(...)
  • Docs on Hover: All endpoint and parameter level documentation that you see on our docs website are now embedded directly within the SDKs.
  • Strongly Typed: All requests, responses and methods are annotated with mypy types. You should get autocomplete as you use the SDK. Note that request and response models are all Pydantic.
  • Async Client: The SDK now exports an async python client in addition to a sync client. Just use AsyncCourier :
    from courier.client import AsyncCourier
    
    client = AsyncCourier(authorization_token="..") # defaults to os.getenv("COURIER_AUTH_TOKEN")
  • Courier Module: The SDK exports a courier module and all the types are nested within this module.
    import courier
    
    courier. # see all the types you have access to
  • HTTPX: The Python SDK now uses httpx instead of requests for the underlying client. For advanced usecases such as proxies and transports, you can directly pass in your own httpx client!