Skip to main content

A Python wrapper for the Twitter API using twitter APi version 1.1 and 2!

Project description

PyTweet

PyTweet is an api wrapper made for receiving info from twitter using twitter's api version 2!

Installation

Windows

py3 -m pip install PyTweet

Linux

python -m pip install PyTweet

Usage

First we create our client instance using pytweet.Client()

import pytweet

client=pytweet.Client("Your Bearer Token Here!!!", consumer_key="Your consumer_key here", consumer_key_secret="Your consumer_key_secret here", access_token="Your access_token here", access_token_secret="Your access_token_secret here") #if you dont have one make an application in https://apps.pytweet.com

After that we use functions to get info from twitter api.

user=client.get_user_by_username("TheGenocides")
print(user.name, user.username, user.id)
#Return The user's name, username, and id

tweet=client.get_tweet(Tweet ID Here)
print(tweet.text, tweet.id, tweet.author.username)
# Return the tweet's text, id, and the author's username.

Contribute

You can Contribute or open an issue regarding this wrapper in github!

Licence

MIT

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

PyTweet-1.1.1.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

PyTweet-1.1.1-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file PyTweet-1.1.1.tar.gz.

File metadata

  • Download URL: PyTweet-1.1.1.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/3.10.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.12

File hashes

Hashes for PyTweet-1.1.1.tar.gz
Algorithm Hash digest
SHA256 725ed8a57547ac8dafa5ab281f21d03754af2c52d7f2378c79f220274db0c1b8
MD5 fc85075aaee834d5403451453d757ae7
BLAKE2b-256 af0d079bcf3869bfd6ab12816d69a65ef77a875d81ce1b800326259a51aa9be5

See more details on using hashes here.

File details

Details for the file PyTweet-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: PyTweet-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/3.10.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.12

File hashes

Hashes for PyTweet-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 141c5a0622081d5010dd7d3995c2b7987bfe123c4f2723798f2b6d601f59f8e7
MD5 044ca5523c23196b07d3f542dda8cad3
BLAKE2b-256 04721567c2569be8497a72924c2619b65b28cc2977ebc5a2e99344d4c81cb105

See more details on using hashes here.

Supported by

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