Skip to main content

XDK Python SDK

A Python SDK for the X API.

Installation

uv add xdk

Or with pip:

pip install xdk

Usage

from xdk import Client

# Initialize the 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"
)

# Use the client to interact with the X API
# For example, to get posts:
posts = client.posts.get(ids=["1234567890"])

# To search for posts:
search_results = client.posts.recent_search(query="python")

# To post a post:
post = client.posts.create(post_data={"text": "Hello, world!"})

Features

  • Full support for the X API v2
  • Simple and intuitive interface
  • Comprehensive documentation
  • Type hints for better IDE support

Documentation

For more information, see the documentation.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for xdk 0.10.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xdk 0.10.6
File Size Uploaded
xdk-0.10.6.tar.gz 461.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for xdk 0.10.6
File Interpreter ABI Platform
xdk-0.10.6-py3-none-any.whl Python 3 none any Details

Total release size: 673.9 kB

Release files / xdk-0.10.6.tar.gz

Download URL xdk-0.10.6.tar.gz
Size 461.2 kB
Tags Source
SHA-256 checksum
How to use checksums
34a5142680f051f65aa1d4b53759ec7cead84ddf49428bcf278c7f8881da6d79
BLAKE2b-256 checksum
How to use checksums
9b7b47c5efdb3f6b1e76b101eca028fc68831344762650138534854cc4bd2243
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 25, 2026.

Transparency log

Release files / xdk-0.10.6-py3-none-any.whl

Download URL xdk-0.10.6-py3-none-any.whl
Size 212.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
89859f02e2365a3edceb04340f1902ba5d975a3e22e469bb9bfd8bfdf557e587
BLAKE2b-256 checksum
How to use checksums
b3986bf27d955447ace007b3a55094ef36dc35c3b97f4e2da939247e443f3936
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 25, 2026.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page