A Twitter Academic API Client
Project description
twacapic
Twitter Academic API Client
In development. Expect breaking changes and destructive bugs when updating to the latest version.
Installation
Install via pip:
pip install twacapic
Usage
usage: twacapic [-h] [-u USERLIST] [-g GROUPNAME]
optional arguments:
-h, --help show this help message and exit
-u USERLIST, --userlist USERLIST
path to list of user IDs, one per line. Required for
first run only. Can be used to add users to a group
-g GROUPNAME, --groupname GROUPNAME
name of the group to collect. Results will be saved in
folder `results/GROUPNAME/`. Can be used to poll for
new tweets of a group. Default: "users"
Example
At the moment twacapic can only collect the latest 100 tweets of a list of users and then poll for new tweets afterwards if called again with the same group name.
twacapic -g USER_GROUP_NAME -u PATH_TO_USER_CSV
USER_GROUP_NAME
should be the name of the results folder that is meant to be created and will contain raw json responses from Twitter.
PATH_TO_USER_CSV
should be a path to a list of Twitter user IDs, without header, one line per user ID.
Afterwards you can poll for new tweets of a user group by running simply:
twacapic -g USER_GROUP_NAME
Enjoy!
Dev Install
- Install poetry
- Clone repository
- In the directory run
poetry install
- Run
poetry shell
to start development virtualenv - Run
twacapic
to enter API keys. Ignore the IndexError. - Run
pytest
to run all tests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for twacapic-0.1.4.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf070bcfb2e62a5a93417dab7996b369d6ac8dd71950e8948f88bdfd225629b5 |
|
MD5 | 14a0c3ea0224aa96a2f50ce1fa245f86 |
|
BLAKE2b-256 | dcad591f9a7e2ea99c64479959feb8764eb5fa483542fe7798f11f78e691dcaa |