Skip to main content

twipper - is a Twitter API wrapper for both free and premium plans developed on Python

Project description

twipper - Twitter Wrapper written in Python

Python Version PyPi Version Package Status Build Status Build Status Documentation Status Downloads

Introduction

twipper is an acronym that stands for Twitter wrapper; so the package is made in order to cover Twitter API endpoints defined as Python functions for both Free and Premium plans, which they both include batch and stream processing functions.

Installation

In order to get this package working you will need to install it using pip by typing on the terminal:

$ python -m pip install twipper --upgrade

Or just install the current release or a specific release version such as:

$ python -m pip install twipper==0.1.6

Usage

As twipper is a Twitter Wrapper written in Python its main purpose is to wrap all the available endpoints listed on the Twitter API for both versions (Free and Premium), so to use them from a simple function call. So on the main step is to validate Twitter API credentials since they are mandatory in order to work with the Twitter API.

import twipper

cred = twipper.Twipper(consumer_key='consumer_key',
                       consumer_secret='consumer_secret',
                       access_token='access_token',
                       access_token_secret='access_token_secret')

Now once the Twipper credentials object has been properly created we can use it in order to work with the Twitter API using Python. In the case that we want to retrieve data from Twitter based on a query, e.g. we want to search cat tweets to analyze its content to launch a cat campaign for our brand (random example because everybody loves cats).

from twipper.batch import search_tweets

tweets = search_tweets(access=cred,
                       query='cats',
                       page_count=1,
                       filter_retweets=True,
                       verified_account=False,
                       language='en',
                       result_type='popular',
                       count=10)

So on, using batch functions you can retrieve historical tweets from the last 7-30 days matching the introduced query, in this case the query is cats due to our cat campaign, remember it. Anyways, params can be adjusted to our desires and/or needs as described on the API Reference.

Contribute

As this is an open source project it is open to contributions, bug reports, bug fixes, documentation improvements, enhancements and ideas.

Also there is an open tab of issues where anyone can contribute opening new issues if needed or navigate through them in order to solve them or contribute to its solving.

Disclaimer

This package has been created in order to cover Premium Twipper API functions since tweepy, the most used Python package working as a Twitter API wrapper. Anyways, twipper also covers both Free and Premium functions, which include batch processing and stream processing.

Conclude that this is the result of a research project, so this package has been developed with research purposes and no profit is intended.

Project details


Download files

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

Source Distribution

twipper-0.1.6.tar.gz (13.3 kB view details)

Uploaded Source

File details

Details for the file twipper-0.1.6.tar.gz.

File metadata

  • Download URL: twipper-0.1.6.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.7.5

File hashes

Hashes for twipper-0.1.6.tar.gz
Algorithm Hash digest
SHA256 94fea7767635a2661cee6ed807d2856e091b09d6faa8aca22ab65f800dc94993
MD5 e57a01fbd204d03139d03823aa7b31d6
BLAKE2b-256 914333b260984f3dc1031727d2eda9dfe664bba4df8a3fa6df2a1ccd12632e2d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page