$npx skillfedfor your agent

tweepy

Library for accessing the X API (Twitter)

Worth itPyPI LibrariesReleased Jul 20264.7M downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — tweepy-4.17.0-py3-none-any.whl
v4.17.0 · released 2026-07-02 · Python >=3.9 · 3 runtime deps: oauthlib, requests, requests-oauthlib

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.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • You must obtain API credentials from the X Developer Portal and set a valid bearer token to authenticate requests.
  • 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.

License · maintenance · safety

permissive license (permissive) — 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.

last release 2026-07-02 (43 days) · last repo commit 2026-07-02 · 11,177 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 4,731,411 downloads/mo, #2,243 on PyPI

Verify before relying

pip install tweepy

import tweepy

client = tweepy.Client(bearer_token="YOUR_BEARER_TOKEN")
tweets = client.get_users_mentions(id=user_id)
print(tweets.data)
  • 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.
Same gist for agents: .md · .json

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 on this page. Verify before relying on it.

Worth it

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

tweepy on PyPI

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.

You must obtain API credentials from the X Developer Portal and set a valid bearer token to authenticate requests.

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)

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

Licensepermissive license permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
3 packages
oauthlibrequestsrequests-oauthlib
MaintenanceActively maintained 43 days since the last release
Last repo commit
First released
Downloads4,731,411 / month, #2,243 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries

Evidence: tweepy-4.17.0-py3-none-any.whl

Tags

Capabilities
twitter api python clientx api librarytweet fetching pythontwitter data accesssocial media api wrappertwitter authentication pythonpost tweets programmatically
Topics
social-media-apitwitter-clientoauth-wrapper
PyPI keywords
X.comAPITwitter

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “tweet fetching python”

  • tweepyTweepy is a Python library that provides access to the X (Twitter)…
  • ScweetScrape tweets, profiles, followers, and user data from Twitter/X…
  • twythonTwython is a Python wrapper for the Twitter API that lets you query…

Give your agent the search over MCP, or paste the wish link into any chat.

More Libraries packages

urllib3 Worth it
PyPI · Libraries · released May 2026

urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.

MITpure Python · 3.10+
1.8Bdownloads / mo
requests Worth it
PyPI · Libraries · released May 2026

Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.

Apache-2.0pure Python · 3.10+
1.8Bdownloads / mo
pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
python-dateutil Worth it
PyPI · Libraries · released Mar 2024

Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.

Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.

Apache-2.0pure Python
1.2Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.

MITpure Python
1.2Bdownloads / mo
pytest Worth it
PyPI · Libraries · released Jun 2026

pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.

MITpure Python · 3.10+
1.1Bdownloads / mo

See also Mastodon.py · twikit · twython · Scweet · python-twitter · twscrape · TikTokApi · crowdin-api-client · xclienttransaction · pyobjc-framework-Social