Skip to main content

Python SDK for the X API

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xdk-0.9.0.tar.gz (404.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xdk-0.9.0-py3-none-any.whl (172.5 kB view details)

Uploaded Python 3

File details

Details for the file xdk-0.9.0.tar.gz.

File metadata

  • Download URL: xdk-0.9.0.tar.gz
  • Upload date:
  • Size: 404.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for xdk-0.9.0.tar.gz
Algorithm Hash digest
SHA256 0fab8a1649cb92b824f3ff0b579a2e8bcce42a5c378298a4e381f0d1f40191d6
MD5 35934743d74cbdc85b758cf8e09f4e78
BLAKE2b-256 093c6940c6e94d4f96f5f048bb11e7303cfe09ca5bc4fd95f25d461f350b3b58

See more details on using hashes here.

Provenance

The following attestation bundles were made for xdk-0.9.0.tar.gz:

Publisher: publish.yml on xdevplatform/xdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xdk-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: xdk-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 172.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for xdk-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 042555e661c1ee772e085d9eb4df0a335b1f81dcfb9ae7fba1a32d950cd6a4ef
MD5 04d42228dcb9d46797be23f163332c9b
BLAKE2b-256 0b37b7e57c9fe9c4f383afc1a4b16451373ee5ae96dd25b02e1c0dd347b30423

See more details on using hashes here.

Provenance

The following attestation bundles were made for xdk-0.9.0-py3-none-any.whl:

Publisher: publish.yml on xdevplatform/xdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page