This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

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.

Authorize your client

You can use peony.oauth_dance to authorize your client:

>>> from peony.oauth_dance import oauth_dance
>>> tokens = oauth_dance(YOUR_CONSUMER_KEY, YOUR_CONSUMER_SECRET)
>>> from peony import PeonyClient
>>> client = PeonyClient(**tokens)

This should open a browser to get a pin to authorize your application.

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.

Release History

Release History

This version
History Node

0.9.3.1

History Node

0.9.3

History Node

0.9.2.3

History Node

0.9.2.2

History Node

0.9.2.1

History Node

0.9.2

History Node

0.9.1.1

History Node

0.9.1

History Node

0.9.0

History Node

0.8.1.2

History Node

0.8.1.1

History Node

0.8.1

History Node

0.8.0

History Node

0.7.6

History Node

0.7.5

History Node

0.7.4.2

History Node

0.7.4.1

History Node

0.7.4

History Node

0.7.3

History Node

0.7.2.1

History Node

0.7.2

History Node

0.7.1.1

History Node

0.7.1

History Node

0.7.0

History Node

0.6.6

History Node

0.6.5

History Node

0.6.4.2

History Node

0.6.4.1

History Node

0.6.4

History Node

0.6.3.1

History Node

0.6.3

History Node

0.6.2

History Node

0.6.1

History Node

0.6

History Node

0.5.4

History Node

0.5.3

History Node

0.5.2

History Node

0.5.1

History Node

0.5

History Node

0.4

History Node

0.3

History Node

0.2.2

History Node

0.2.1

History Node

0.2

History Node

0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
peony_twitter-0.9.3.1-py3-none-any.whl (30.4 kB) Copy SHA256 Checksum SHA256 py3 Wheel Mar 29, 2017
peony-twitter-0.9.3.1.tar.gz (23.5 kB) Copy SHA256 Checksum SHA256 Source Mar 29, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting