twcollect

Simple CLI to collect data from the Twitter stream API


License
MIT
Install
pip install twcollect==0.1.0

Documentation

TwCollect

PyPI-Server Project generated with PyScaffold

A simple CLI to collect data from the Twitter stream API

Installation

pip install twcollect

Usage

First, we need to specify the Twitter Bearer token to connect to the Twitter Stream API. This needs to be specified in a YAML file (called credentials.yml by default) with the following format:

twitter_token: "<TWITTER_BEARER_TOKEN>"

The collection can be started by calling the twcollect module.

python -m twcollect output_folder

Or by using the Docker image (note we are mounting the credentials.yml and output_folder in the container):

docker run --rm -v $(pwd)/credentials.yml:/credentials.yml -v $(pwd)/output_folder/:/output_folder/ ghcr.io/smassonnet/twcollect:<VERSION> /output_folder

Note that you need to replace <VERSION> by the latest available version of twcollect.

Please see the help for more options:

python -m twcollect --help

Note

This project has been set up using PyScaffold 4.3.1. For details and usage information on PyScaffold see https://pyscaffold.org/.