Python asynchronous module for interacting with Twitter using auth_token for Python 3.10+
Project description
Description
Python asynchronous module for interacting with Twitter using auth_token for Python 3.10+
Available methods:
- Follow to user
- Tweet creating
- Tweet replying
- Tweet liking
- Pin tweet
- Reply to tweet
- Retweet
Creating client instance
from pytwex.client import Client
### Creating with ct0 token
client = Client(auth_token='YOUR_AUTH_TOKEN',
ct0='YOUR_CT0_TOKEN',
proxy='YOUR_PROXY')
### Creating without ct0 token
async def create_client():
client = Client(auth_token='YOUR_AUTH_TOKEN',
proxy='YOUR_PROXY')
await client.get_ct0_token()
### You can update your username after creating client instance
...some async function...
await client.update_username()
print(client.user_name)
Follow user example
from pytwex.follow import follow
... some async function...
await follow(
client_session=YOUR_CLIENT_OBJECT,
follow_user_handler='elonmusk'
)
>>> True or False
Create tweet example
from pytwex.create_tweet import create_tweet
... some async function...
await create_tweet(
client_session=YOUR_CLIENT_OBJECT,
text='This is my text for tweet', #Non required
image_url='http://googletestimage.url/', #Non required
tweet_id_for_reply=16911350916896132 #Non required
)
>>> Returns published tweet id, for example 1691135091689611264
Developer
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
pytwex-0.1.4.tar.gz
(9.0 kB
view details)
File details
Details for the file pytwex-0.1.4.tar.gz.
File metadata
- Download URL: pytwex-0.1.4.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ababfabcfa00c833a326a0a19d01bf786586810fe5dcc281b24956497d08aa8f
|
|
| MD5 |
436a0e537b81493a48ca5374715a6640
|
|
| BLAKE2b-256 |
91c686410fb401893f95d94cef7ad9b8a39f00bbb667cbf77568059e946486cc
|