Super lightweight twitter client for Python used for personal projects. No need for long Twitter APIs. Use Twitter in Python.
- Python3
- Twitter-Python Module
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.
Start Python
$ python
Import TwtPy via tweet
>>> import tweet
Start Using it
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()
- 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.
This is a personal project and was intended for personal use. You may fork and improve this. Report bugs if you find one.