Twitter API wrapper for python with **no API key required**.
Project description
Twikit
A simple API wrapper to interact with twitter's internal API. Read the documentation for more information.
Features
No API Key Required
The library uses an unofficial API and therefore does not require an API key.
Completely Free
The service is entirely free to use.
Functionality
This library allows you to perform various Twitter-related actions, including:
- Create tweets
- Search tweets
- Retrieve trending topics
- etc...
Installing
pip install twikit
Quick Example
Define a client and log in to the account.
from twikit import Client
USERNAME = 'example_user'
EMAIL = 'email@example.com'
PASSWORD = 'password0000'
# Initialize client
client = Client('en-US')
# Login to the service with provided user credentials
client.login(
auth_info_1=USERNAME ,
auth_info_2=EMAIL,
password=PASSWORD
)
Create a tweet with media attached.
# Upload media files and obtain media_ids
media_ids = [
client.upload_media('media1.jpg', index=0),
client.upload_media('media2.jpg', index=1)
]
# Create a tweet with the provided text and attached media
client.create_tweet(
text='Example Tweet',
media_ids=media_ids
)
For more examples, see example.py.
Contributing
This project is currently in beta, and we would love to hear your thoughts and suggestions. If you have any features you'd like to see added or encounter any issues, please let us know in the issues section.
Additionally, if you find this library useful, spreading the word by starring it would be greatly appreciated and serve as motivation for further development. Thank you!
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
Built Distribution
File details
Details for the file twikit-1.0.8.tar.gz
.
File metadata
- Download URL: twikit-1.0.8.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15f9611303a1d667fd4270d8471c28055866501f0b5da787945f9c2acc1a5b8a |
|
MD5 | 0a2e98fd6e62f31234b9e5e8f888bf77 |
|
BLAKE2b-256 | 01c2739bf27dc86cc291395bfb365693eeba65d678516783fc7a49ef604a9c36 |
File details
Details for the file twikit-1.0.8-py3-none-any.whl
.
File metadata
- Download URL: twikit-1.0.8-py3-none-any.whl
- Upload date:
- Size: 21.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dff2eac49114319c3227278a6622f3225d21f99fa8b6f12f0c5baac7347ae999 |
|
MD5 | 1915e4d96e0c2443a14aefaed2b591fa |
|
BLAKE2b-256 | cdb5cae9e652bcf02ce1f3c80015d60dec952c8d1b512f486d2e62bdb2410640 |