Skip to main content

A simple Python library for posting tweets using new X API v2.

Project description

Twitter API Package

A simple Python library for posting tweets using Twitter API v2.

Installation

You can install the package using pip:

pip install x_posting_api

Usage

from x_posting_api import XPostingAPI

# Twitter API credentials
CONSUMER_KEY = 'your_consumer_key'
CONSUMER_SECRET = 'your_consumer_secret'

def main():
    # Initialize XPostingAPI
    twitter_api = XPostingAPI(CONSUMER_KEY, CONSUMER_SECRET)

    # Authorize (only needed once)
    twitter_api.authorize()

    # Post a tweet
    tweet_text = "Hello world!"
    twitter_api.post_tweet(tweet_text)

if __name__ == "__main__":
    main()

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

x_posting_api-0.4.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

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

x_posting_api-0.4-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file x_posting_api-0.4.tar.gz.

File metadata

  • Download URL: x_posting_api-0.4.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.0

File hashes

Hashes for x_posting_api-0.4.tar.gz
Algorithm Hash digest
SHA256 3165a31cb0125718644fdc0b7ec93a78bed64b3de7d6c783f042e32ce58c9fd7
MD5 2c7f769f3bbd2d0ff60b5cb2f75b2e56
BLAKE2b-256 3e0f2e0689ca399620ea4c0c0133a0bf08887897229eef53c8af673f57bc6783

See more details on using hashes here.

File details

Details for the file x_posting_api-0.4-py3-none-any.whl.

File metadata

  • Download URL: x_posting_api-0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.0

File hashes

Hashes for x_posting_api-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5ea4188afb5408349b80b4b478f6c5e3ea145d09429db04c2dc2453a557ae05d
MD5 3db4b77ca8624390bf4016b47bbffe4f
BLAKE2b-256 c295f0c208042ddb93ff4b22a256eb2dcf156f5087088e80d202fdb6a78bd66a

See more details on using hashes here.

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