Skip to content

feat: Async Support with httpx 🔥 #149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open

feat: Async Support with httpx 🔥 #149

wants to merge 19 commits into from

Conversation

drish
Copy link
Collaborator

@drish drish commented Jun 16, 2025

Introduces async support using the httpx library.

  • Base extra_requires setup
  • Async requests module setup
  • Api Keys module
  • Audiences module
  • Broadcasts module
  • Contacts module
  • Domains module
  • Emails module
  • Batch Emails module

SDK async version

  1. Users will need to install the async version of the sdk (extra-requries) with: pip install resend[async]

  2. Set the default_http_client:

import resend
# Set up async HTTP client
resend.default_http_client = resend.HTTPXClient()
  1. call the async version method (suffixed with _async):
email: resend.Email = await resend.Emails.send_async(params)

@pedroimpulcetto
Copy link
Contributor

wow, I loved this Async support!!! great job @drish

Base automatically changed from feat/custom-http-client to main July 7, 2025 17:46
@drish drish marked this pull request as ready for review July 18, 2025 15:19
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