Skip to content

Latest commit

 

History

History
81 lines (73 loc) · 1.73 KB

README.md

File metadata and controls

81 lines (73 loc) · 1.73 KB

TwtPy

Super lightweight twitter client for Python used for personal projects. No need for long Twitter APIs. Use Twitter in Python.

BCH compliance

Requirements

  • Python3
  • Twitter-Python Module

Setup

Download the repo. Install python-twitter through pip. Generate keys and tokens. Once you have the necessary keys and tokens, open auth.py and insert them.

How to use

Start Python

$ python

Import TwtPy via tweet

>>> import tweet

Start Using it

Basic Usage

Check your Name

>>> tweet.whoami()

Check your username/screen name

>>> tweet.username()

Tweet Something

>>> status = "Hello World"
>>> tweet.tweet(status)

Tweet Something (without printing any response)

>>> status = "Hello World"
>>> tweet.update(status)

Search for Tweets

>>> query = "Your Query Here"
>>> tweet.tweet(query)

See your Followers

>>> tweet.followers()

Follow Someone

>>> username = "username_here"
>>> tweet.follow(username)

Unfollow Someone

>>> username = "username_here"
>>> tweet.unfollow(username)

Send a DM

>>> to = "username"
>>> message = "Hi!"
>>> tweet.sendDM(to, message)

Get DMs (last 20 DMs Recieved)

>>> tweet.getDM()

Note

  • Please do not rename tweet.py as twitter.py
  • Get token and keys from https://dev.twitter.com and replace the values in the file.
  • This will not work without token and keys.
  • This is made for personal projects. Use with caution.

Development

This is a personal project and was intended for personal use. You may fork and improve this. Report bugs if you find one.