--- id: tweepy version: "4.17.0" license: unclear license_treatment: permissive maintenance: active --- # tweepy — Library for accessing the X API (Twitter) License: permissive · Maintenance: active · Downloads: 4.7M/mo ## What it is and what it does Tweepy is a mature Python wrapper around the X (Twitter) API that abstracts away the complexity of OAuth authentication and HTTP request formatting. It lets you write Python code to search tweets, retrieve user timelines, post updates, and manage followers without manually constructing API calls or handling token refresh cycles. The library depends on oauthlib, requests, and requests-oauthlib to handle the OAuth handshake and HTTP transport. The package is designed for developers who need programmatic access to X data—whether for data collection, bot automation, or social media monitoring. It supports both synchronous and asynchronous workflows (via the optional async extra) and maintains compatibility with modern Python versions (3.9 and later). Since it's actively maintained and carries no known vulnerabilities, it's a stable choice for production use. Use it for: - Collect tweets matching a search query or from a specific user's timeline for analysis or archival. - Build a Twitter bot that automatically posts updates or responds to mentions on a schedule. - Monitor brand mentions or hashtags in real-time and trigger alerts or logging based on tweet content. - Analyze social media trends by fetching historical tweet data and user engagement metrics. - Integrate X data into a larger application dashboard or reporting pipeline. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Tweepy is a Python library that provides access to the X (Twitter) API, handling authentication and request formatting so you can fetch tweets, post updates, and interact with user data programmatically. Yes. Tweepy is a production-stable, actively maintained library with no security issues, low install friction, and permissive licensing. If you need programmatic access to the X API from Python, it's the standard choice and will save you from writing OAuth and HTTP plumbing yourself. Install it unless you have a specific reason to use a different X API client. ## Install pip install tweepy uv add tweepy poetry add tweepy ## Installing tweepy Before you install: Installation is straightforward with pip and carries low friction. The package is actively maintained with a recent release (43 days old) and an established repository with 11177 stars. It supports current Python versions (3.9 and later) and has no known security vulnerabilities. License in practice: Tweepy is released under a permissive license, meaning you can use, modify, and distribute it freely in both open-source and commercial projects with minimal restrictions. Quickstart: pip install tweepy import tweepy client = tweepy.Client(bearer_token="YOUR_BEARER_TOKEN") tweets = client.get_users_mentions(id=user_id) print(tweets.data) You must obtain API credentials from the X Developer Portal and set a valid bearer token to authenticate requests. Verify before relying: - Whether the async extra (tweepy[async]) adds significant overhead or is necessary for your use case. - Rate limiting behavior and how the library handles X API quota exhaustion. - Support timeline for Python versions currently in bugfix/security phases. - Specific API endpoints and methods available in version 4.17.0. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 4.7M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags twitter api python client, x api library, tweet fetching python, twitter data access, social media api wrapper, twitter authentication python, post tweets programmatically, social-media-api, twitter-client, oauth-wrapper [View on SkillFed](https://skillfed.io/packages/tweepy) · [View on PyPI](https://pypi.org/project/tweepy/)