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.11.0

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.11.0
File Size Uploaded Provenance Actions
xdk-0.11.0.tar.gz 652.4 kB With provenance Details for xdk-0.11.0.tar.gz

Built distribution (wheel)

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

Total release size: 959.7 kB

Release files / xdk-0.11.0.tar.gz

Download URL xdk-0.11.0.tar.gz
Size 652.4 kB
Tags Source
SHA-256 checksum
How to use checksums
46b3d8943acca6dcee96d0734ac2c10ec29b1c163005ac6901bd1917d26e1734
BLAKE2b-256 checksum
How to use checksums
5ebe9fc5880a4a59630ad2e0e6c61cefedd9dd665366af1a6ed4a0515a818140
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 20, 2026.

Transparency log

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

Download URL xdk-0.11.0-py3-none-any.whl
Size 307.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
888f132934eed02d9ca7a5f7ee12bfe727199e9645ecb274d7b055339fa5bc2d
BLAKE2b-256 checksum
How to use checksums
bd86921a4d8fbfb8b30c23076291a4317dd2293044f5f046f233f3de396de155
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 20, 2026.

Transparency log

Security for xdk 0.11.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for xdk-0.11.0.tar.gz

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 Nov 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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