Skip to main content

Delete your old tweets and favorites using the Twitter API

Project description

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.

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

tidytwitter-0.2.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

tidytwitter-0.2.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file tidytwitter-0.2.0.tar.gz.

File metadata

  • Download URL: tidytwitter-0.2.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for tidytwitter-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ed959c30b46f916d3a469c1a7bb450dd17de6ccfe53cb06c635fd4a4b3a3e798
MD5 d2ddcb445f13c9a48ffe9ba3b44dbadd
BLAKE2b-256 f4f2893a9b01bdacd9b4e0182221687afebecbdfbcbbfe3f012a2f3eb89aff25

See more details on using hashes here.

File details

Details for the file tidytwitter-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: tidytwitter-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for tidytwitter-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 02ef6b22e647122fe1d48e7366d771555bdc251a893a337a751f115b406407f4
MD5 2918159ec0f6b2c76af64fe17eb8d9f7
BLAKE2b-256 704628143f36437aa226defa8ba1408d079507708ebe6568ac5da65f5e3f06a0

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