-
Notifications
You must be signed in to change notification settings - Fork 250
Description
Add support for installing async dependencies via extras
I've implemented asynchronous support for this library in my fork, which enables significantly improved performance for applications handling multiple concurrent requests or integrating with async frameworks like FastAPI, aiohttp, or similar tools.
I've already added the async functionality to my repository and have it working. The implementation includes:
- Async client with non-blocking API calls
- Support for concurrent request handling
- Integration with popular async frameworks
Requested Enhancement:
- It would be great if the library could support installing async dependencies through pip extras. Ideally, users would be able to install it using:
pip install twitter-api-client[async]
This approach would:
Install the base tweepy package along with async-specific dependencies (like aiohttp)
Keep the base package lightweight for users who don't need async functionality
Follow Python packaging best practices for optional dependencies
For existing installations, users could upgrade with:
pip install --upgrade twitter-api-client[async]
Benefits:
- Cleaner dependency management
- Optional async support without bloating the base installation
- Better developer experience for async users
- Standard pattern used by many popular libraries (like httpx[http2], sqlalchemy[asyncio], tweepy[async], etc.)
I'm happy to submit a PR with my async implementation if you'd like to review it. Would this be something you'd be interested in merging?