Skip to main content

PyTweets: Simple Python Twitter API

Project description

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

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

pytweets-0.2.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytweets-0.2-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file pytweets-0.2.tar.gz.

File metadata

  • Download URL: pytweets-0.2.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8

File hashes

Hashes for pytweets-0.2.tar.gz
Algorithm Hash digest
SHA256 6a213d88b441e9d038ced47e9f1cf74dc4e7e97ef098168a8fe53a5d387dd098
MD5 12a6d85da0347b04fe329cc333c9c9db
BLAKE2b-256 4556d49039d04c38e1b5507e69d7a04100176aeb7f5d7b52fa4c9a66829aff8f

See more details on using hashes here.

File details

Details for the file pytweets-0.2-py3-none-any.whl.

File metadata

  • Download URL: pytweets-0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8

File hashes

Hashes for pytweets-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f41bb6df1559b3ae2647f62be66913c0173f441e6a70323f87441d080de5a5d5
MD5 f5ee18588baefe135b55bf34e453ab25
BLAKE2b-256 f5cd7d0cf443959e09baa6ba3c7b8c5d66bf7160222f358cc2af45df157c6285

See more details on using hashes here.

Supported by

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