python-twitter
A Python wrapper around the Twitter API
Decision gist · record as of 2026-08-14
No, not for new projects. The repository is archived, the last release was in 2018, and there is no active maintenance. Twitter's API has evolved significantly since then, and the library will not be updated to handle breaking changes or new endpoints. Install only if you are maintaining legacy code that already depends on it and you have verified it still works with your target Twitter API version.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- You must obtain OAuth credentials from Twitter's developer portal and register an application before any API calls will succeed.
- Low install friction with three straightforward dependencies (future, requests, requests-oauthlib).
- However, the repository is archived and abandoned—the last release was in 2018 and the last commit in 2024 shows no active maintenance.
License · maintenance · safety
Apache License 2.0 (permissive) — Licensed under Apache License 2.0 (permissive). You may use, modify, and distribute the code freely in commercial and private projects, provided you include a copy of the license and state significant changes.
last release 2018-11-03 (2841 days) · last repo commit 2024-08-07 · 3,402 stars · archived
0 known vulnerabilities (OSV.dev, 2026-08-14) · 115,889 downloads/mo, #12,233 on PyPI
Alternatives
Verify before relying
pip install python-twitter
import twitter
api = twitter.Api(consumer_key='key',
consumer_secret='secret',
access_token_key='token',
access_token_secret='token_secret')
statuses = api.GetUserTimeline(screen_name='username')
print([s.text for s in statuses])- Whether the library still works with current Twitter API v2 endpoints or is limited to deprecated v1.1 endpoints.
- Current compatibility with modern Python versions beyond 3.6, given the package's age and lack of recent testing.
- Whether Twitter's API changes since 2018 have broken undocumented functionality in the library.
What it is and what it does
python-twitter is a pure Python client library that wraps Twitter's REST API, allowing you to authenticate via OAuth and interact with Twitter data without writing raw HTTP requests. It models Twitter entities (users, statuses, trends, direct messages, etc.) as Python objects and exposes them through an Api class with methods like GetUserTimeline, PostUpdate, GetFriends, and VerifyCredentials.
The library handles OAuth token management and request signing through its dependencies on requests and requests-oauthlib, abstracting away authentication complexity. It was designed to work with Python 2.7 and Python 3, though it has not been actively maintained since 2018 and the repository is now archived. For new projects, you should verify whether it still aligns with Twitter's current API surface and whether the maintainers will address breaking changes.
Use it for
- Fetch a user's tweet timeline or search results and analyze tweet text, metadata, or engagement metrics.
- Post tweets, retweets, or replies programmatically from a Python application or bot.
- Retrieve user profile information, follower lists, or friend networks for social graph analysis.
- Monitor trends or hashtags by polling Twitter's trending endpoints and storing results in a database.
- Build a Twitter integration layer in a Django or Flask web application using the library's data models.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No, not for new projects.
The repository is archived, the last release was in 2018, and there is no active maintenance. Twitter's API has evolved significantly since then, and the library will not be updated to handle breaking changes or new endpoints. Install only if you are maintaining legacy code that already depends on it and you have verified it still works with your target Twitter API version.
Install
python-twitter on PyPI
Before you install
Low install friction with three straightforward dependencies (future, requests, requests-oauthlib). However, the repository is archived and abandoned—the last release was in 2018 and the last commit in 2024 shows no active maintenance. Use only if you accept that bugs and API changes will not be addressed.
You must obtain OAuth credentials from Twitter's developer portal and register an application before any API calls will succeed.
License in practice
Licensed under Apache License 2.0 (permissive). You may use, modify, and distribute the code freely in commercial and private projects, provided you include a copy of the license and state significant changes.
Quickstart
pip install python-twitter
import twitter
api = twitter.Api(consumer_key='key',
consumer_secret='secret',
access_token_key='token',
access_token_secret='token_secret')
statuses = api.GetUserTimeline(screen_name='username')
print([s.text for s in statuses])
Verify before relying
- Whether the library still works with current Twitter API v2 endpoints or is limited to deprecated v1.1 endpoints.
- Current compatibility with modern Python versions beyond 3.6, given the package's age and lack of recent testing.
- Whether Twitter's API changes since 2018 have broken undocumented functionality in the library.
Package facts
| License | Apache License 2.0 permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesfuturerequestsrequests-oauthlib |
| Maintenance | Abandoned 2,841 days since the last release |
| Last repo commit | repository archived |
| First released | |
| Downloads | 115,889 / month, #12,233 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.6Topic :: Communications :: ChatTopic :: InternetTopic :: Software Development :: Libraries :: Python Modules |
Evidence: python_twitter-3.5-py2.py3-none-any.whl
Tags
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 › “fetch twitter data python”
- python-twitterA Python wrapper that provides programmatic access to the Twitter…
- twitter-adsA Python SDK for managing Twitter Ads campaigns, accounts, and…
- tweepyTweepy is a Python library that provides access to the X (Twitter)…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also twitter-ads · twython · python-youtube · tweepy · rauth · twikit · requests-oauth · Scweet · twscrape · requests-oauthlib