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 twitter.Client()
import twitter
client=twitter.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.twitter.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
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.0.tar.gz
(10.0 kB
view hashes)
Built Distribution
PyTweet-1.1.0-py3-none-any.whl
(16.8 kB
view hashes)