PyTweets: Simple Python Twitter API
Project description
PyTweets: Python Twitter Api
Tested with:
- Python 3.6+
Use the following command to install using pip:
pip install pytweets
Usage example
Use TwitterApp
class to start a twitter app
from pytweets import TwitterApp
app = TwitterApp(
api_key='YOUR_API_KEY',
api_secret_key='YOUR_API_SECRET_KEY',
app_name='YOUR_APP_NAME',
bearer_token='YOUR_BEARER_TOKEN'
)
app.standard_search_tweets(keywords=['twitter', 'app']) # search tweets which include 'twitter' and 'app'
user_info = app.get_user_by_username(username='jack') # get user info for Jack Dorsey
app.get_user_statuses_timeline(user_id=user_info.user_id, count=500) # retrieve latest 500 tweets of user
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pytweets-0.2.tar.gz
(4.6 kB
view hashes)
Built Distribution
pytweets-0.2-py3-none-any.whl
(5.4 kB
view hashes)