xdk
Python SDK for the X API
Decision gist · record as of 2026-08-14
Yes, if you need to interact with the X API from Python. The package has low install friction, permissive licensing, no known vulnerabilities, and active maintenance. The alpha status and small user base mean edge cases may not be fully tested; verify that it covers the API endpoints you need before committing to it in production.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires valid X API credentials (API key, secret, and OAuth tokens) to authenticate.
- Low install friction; pure Python wheel with three common dependencies (pydantic, requests, requests-oauthlib).
- Active maintenance with a release 20 days old and recent commits.
License · maintenance · safety
permissive license (permissive) — MIT license (permissive) means you can use, modify, and distribute this package with minimal restrictions in commercial or private projects.
last release 2026-07-25 (20 days) · last repo commit 2026-07-25 · 39 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 102,521 downloads/mo, #12,865 on PyPI
Alternatives
Verify before relying
pip install xdk
from xdk import Client
client = Client(
api_key="your_api_key",
api_secret="your_api_secret",
access_token="your_access_token",
access_token_secret="your_access_token_secret"
)
posts = client.posts.get(ids=["1234567890"])- Whether the SDK covers the full X API v2 surface or a subset of endpoints
- Whether rate-limiting or retry logic is built in or left to the caller
- Whether the package is officially maintained by X Corp or a third party
What it is and what it does
XDK is a Python SDK for the X API that wraps OAuth-authenticated HTTP requests into a typed client interface. It provides methods to fetch posts by ID, search recent posts, and create new posts, with support for Python 3.8 through 3.12. The package depends on pydantic for validation, requests for HTTP, and requests-oauthlib for OAuth credential handling.
The SDK is in alpha status and actively maintained, with a growing user base. It abstracts away the details of constructing X API requests and managing OAuth tokens, letting developers focus on application logic rather than authentication plumbing.
Use it for
- Fetch and analyze posts from X by ID in a Python application
- Search for recent posts matching a query and process results programmatically
- Publish posts to X from an automated workflow or bot
- Build a Python application that reads and writes to X without manual HTTP request construction
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to interact with the X API from Python.
The package has low install friction, permissive licensing, no known vulnerabilities, and active maintenance. The alpha status and small user base mean edge cases may not be fully tested; verify that it covers the API endpoints you need before committing to it in production.
Install
xdk on PyPI
Before you install
Low install friction; pure Python wheel with three common dependencies (pydantic, requests, requests-oauthlib). Active maintenance with a release 20 days old and recent commits.
Requires valid X API credentials (API key, secret, and OAuth tokens) to authenticate.
License in practice
MIT license (permissive) means you can use, modify, and distribute this package with minimal restrictions in commercial or private projects.
Quickstart
pip install xdk
from xdk import Client
client = Client(
api_key="your_api_key",
api_secret="your_api_secret",
access_token="your_access_token",
access_token_secret="your_access_token_secret"
)
posts = client.posts.get(ids=["1234567890"])
Verify before relying
- Whether the SDK covers the full X API v2 surface or a subset of endpoints
- Whether rate-limiting or retry logic is built in or left to the caller
- Whether the package is officially maintained by X Corp or a third party
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagespydanticrequests-oauthlibrequests |
| Maintenance | Actively maintained 20 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 102,521 / month, #12,865 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: xdk-0.10.6-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 › “X posts API wrapper”
- xdkA Python SDK for interacting with the X API, providing typed client…
- pydiscourseA Python client library for the Discourse API that provides methods…
- instagrapiUnofficial Instagram API wrapper that automates private mobile and…
Give your agent the search over MCP, or paste the wish link into any chat.
More WWW/HTTP packages
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.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.
Install it if you are building new projects or modernizing existing ones that rely on HTTP.
A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.
aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.
Install it if you need async HTTP client or server capabilities in asyncio-based applications.
See also late-sdk · requests-oauth · zernio-sdk · linkedin-api-client · hubspot-api-client · auth0-python · vonage · dropbox-sign · python-twitter · python-youtube