Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Python 3k wrapper for the Twitter API

Project Description

Wyvern is a Python 3 client for the Twitter REST API v1.1. At this time, only connections based on a full set of OAuth credentials (consumer_key, consumer_secret, access_token, access_token_secret) are supported; credentials can be obtained by setting up an application on


A Wyvern client is setup using:

from wyvern import Wyvern

w = Wyvern(consumer_key, consumer_secret, access_token, access_token_secret,
           headers=None, proxies=None, version=1.1)

Calls to the API have the following format:

response = w.method_name(**method_params)

Where method_name is a method corresponding to the Twitter API endpoint being queried, and method_params is a list of keyword-arg pairings corresponding to the required and optional parameters of the given endpoint, as well as to any variable values the endpoint may contain (such as :id).

Users can find the correct method for the endpoint(s) they with to use either by examining or by calling:


As of this point, endpoints involving media (upload and download) are not supported, nor are OAuth endpoints or the Streaming API. Media support should be coming soon, and streaming will be tackled after that.


The file is provided to ensure that the setup works; to run it, place a config.txt file in its directory and call python3 The config file must have the format:

consumer_key0: <fill-in>
consumer_secret0: <fill-in>
access_token0: <fill-in>
access_token_secret0: <fill-in>

consumer_key1: <fill-in>
consumer_secret1: <fill-in>
access_token1: <fill-in>
access_token_secret1: <fill-in>

... 2, 3, 4 ...

consumer_key5: <fill-in>
consumer_secret5: <fill-in>
access_token5: <fill-in>
access_token_secret5: <fill-in>

In this, applications 0 and 1 must have read/write/direct message access, applications 2 and 3 must have read/write access, and applications 4 and 5 must have read access. It’s a somewhat convoluted process, but for security reasons I’m not going to release my personal config info. Sorry guys.

Even if you’re not willing to go through the process of setting up the accounts, the test code contains a lot of good examples on how to use Wyvern.


Wyvern is distributed under the MIT License - see LICENSE.txt for more info.


Depending on your Python setup, Wyvern can be installed by using one of:

(pip | pip3) install wyvern

It can also be installed by cloning the git repo:

git clone git://
cd wyvern
sudo python3 install

Release History

This version
History Node


Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(8.4 kB) Copy SHA256 Hash SHA256
Source None Feb 26, 2013

Supported By

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 Google Google Cloud Servers DreamHost DreamHost Log Hosting