Skip to main content

Write tweets to database

Project description

[![Downloads](https://pypip.in/d/TweetBase/badge.png)](https://crate.io/packages/TweetBase) [![Downloads](https://pypip.in/v/TweetBase/badge.png)](https://crate.io/packages/TweetBase)

Download tweets into a CouchDB database

Features

  • Flexible: works with any Twitter endpoint (REST API or Streaming API).

  • Geocode lookup for the Twitter user location using Google’s Map geocode service.

  • Uses CouchDB for storage.

Installation

Usage

The first time the script is executed the database is created. For example, to store tweets in a database called “tw_test” and to stream tweets that contain “pizza”, run this command:

python -m TweetBase.TweetBase

-couchurl http://127.0.0.1:5984 -dbname tw_test -endpoint statuses/filter -parameters track=pizza

The TweetBase script downloads tweets and stores them into the specified database. Tweet meta data is stored separately from the user meta data. This is done so user data is only stored once in the database. The two types of records are differentiated by the “type” field, which is either TWITTER_STATUS or TWITTER_USER.

The same time that a new database is created, some views are also created. These views are:

  • get_tweets

  • get_users

  • count_type

In the client_examples folder you will find a Python example and a JavaScript example that uses these views to retrieve data.

Dependencies

  • TwitterAPI

  • TwitterGeoPics

  • couchdb

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

TweetBase-0.2.3.tar.gz (5.4 kB view details)

Uploaded Source

File details

Details for the file TweetBase-0.2.3.tar.gz.

File metadata

  • Download URL: TweetBase-0.2.3.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for TweetBase-0.2.3.tar.gz
Algorithm Hash digest
SHA256 4c0d6fb864487ec196ca4eef318ae227a5feb82cace24beb31672b843c884d28
MD5 9e03a13ff6aed20c8ca2b433c3576fdd
BLAKE2b-256 e03b2678fb53606909bdd3539c32e586d6d7d0f709ea55bb35faee00e1374171

See more details on using hashes here.

Supported by

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