An asynchronous Twitter API client for Python 3.5+
Project description
An asynchronous Twitter API client for Python 3.5+
Installation
To install this module simply run:
pip install peony-twitter[all]
This will install all the modules required to make peony run out of the box. You might feel like some of them are not fit for your needs. Check Advanced installation for more information about how to install only the modules you will need.
Getting started
You can easily create a client using the class PeonyClient. Make sure to get your api keys and access tokens from Twitter’s application management page and/or to Authorize your client
import asyncio
# NOTE: the package name is peony and not peony-twitter
from peony import PeonyClient
loop = asyncio.get_event_loop()
# create the client using your api keys
client = PeonyClient(consumer_key=YOUR_CONSUMER_KEY,
consumer_secret=YOUR_CONSUMER_SECRET,
access_token=YOUR_ACCESS_TOKEN,
access_token_secret=YOUR_ACCESS_TOKEN_SECRET)
# this is a coroutine
req = client.api.statuses.update.post(status="I'm using Peony!!")
# run the coroutine
loop.run_until_complete(req)
Documentation
Read Peony’s documentation.
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
peony-twitter-0.9.3.tar.gz
(23.4 kB
view hashes)
Built Distribution
Close
Hashes for peony_twitter-0.9.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bc93d369789adaa1f141f73d9400969de1783dea081e71470940dacbc3618d4 |
|
MD5 | 6799ebe19be57b6506b2beed54566286 |
|
BLAKE2b-256 | 86d61c43701add8644e0522052604663876cab9c86e8aa4b11332d7c3ec4c536 |