Skip to main content

tidytwitter

Delete your old tweets and favorites using the Twitter API.

tidytwitter tweets

deletes all of your tweets that are older than --days (default: 60) except those that you have favorited yourself or have more than --favorite-threshold favorites (default: 20).

tidytwitter favorites

deletes all of your favorties that are older than --days (default: 60) except those that are of your own tweets.

tidytwitter both

deletes both tweets and favorites.

See tidytwitter --help, tidytwitter tweets --help and tidytwitter favorites --help for more.

The idea to preserve self-favorited tweets is stolen with thanks from a script by Chris Albon.

Installation

pip install tidytwitter

Create a new project in your Twitter developer account and get the key, secret, access token and access token secret.

You can either export those as environment variables:

export TIDYTWITTER_API_KEY="your_api_key"
export TIDYTWITTER_API_SECRET="your_api_secret"
export TIDYTWITTER_ACCESS_TOKEN="your_access_token"
export TIDYTWITTER_ACCESS_TOKEN_SECRET="your_access_token_secret"

or pass them as command line options (--api-key, etc., see --help).

Shell completion

You can optionally enable shell completion by running the appropriate command for your shell:

eval "$(_TIDYTWITTER_COMPLETE=bash_source tidytwitter)" >> ~/.bashrc # bash
eval "$(_TIDYTWITTER_COMPLETE=zsh_source tidytwitter)" >> ~/.zshrc  # zsh
_TIDYTWITTER_COMPLETE=fish_source foo-bar > ~/.config/fish/completions/tidytwitter.fish  # fish

Automation with Github

See tidytwitter-cron.

Release files for tidytwitter 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tidytwitter 0.2.0
File Size Uploaded
tidytwitter-0.2.0.tar.gz 4.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tidytwitter 0.2.0
File Interpreter ABI Platform
tidytwitter-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.5 kB

Release files / tidytwitter-0.2.0.tar.gz

Download URL tidytwitter-0.2.0.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ed959c30b46f916d3a469c1a7bb450dd17de6ccfe53cb06c635fd4a4b3a3e798
BLAKE2b-256 checksum
How to use checksums
f4f2893a9b01bdacd9b4e0182221687afebecbdfbcbbfe3f012a2f3eb89aff25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

Release files / tidytwitter-0.2.0-py3-none-any.whl

Download URL tidytwitter-0.2.0-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
02ef6b22e647122fe1d48e7366d771555bdc251a893a337a751f115b406407f4
BLAKE2b-256 checksum
How to use checksums
704628143f36437aa226defa8ba1408d079507708ebe6568ac5da65f5e3f06a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page