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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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