Socket
Socket
Sign inDemoInstall

pytweets

Package Overview
Dependencies
2
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    pytweets

PyTweets: Simple Python Twitter API


Maintainers
1

Readme

alt text alt text

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

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc