Repository navigation
rentry 2.0.0
pip install rentry now gives you both a command-line tool and an importable
Python library. Rentry used to be a single file you downloaded by hand. That
still works if you prefer it, but the package is the main path now.
Install
pip install rentryStill no dependencies.
New: the rentry_client library
from rentry_client import RentryClient
client = RentryClient()
page = client.new(text='hello world', metadata={'PAGE_TITLE': 'Hello'})
print(page['url'], page['edit_code'])Every method returns the parsed API response as a dict.
New commands
1.x covered new, edit and raw. 2.0.0 adds:
fetchgets an entry's full details (text, metadata, dates) as JSONdeletedeletes an entryupdatechanges an entry's edit code, url or modify code-a/--auth-codepasses a rentry-auth access code toraw
Other changes
- Metadata can be given as a JSON object, not just newline-separated
KEY = valuepairs - The /api endpoints are CSRF-exempt, so no csrf token, cookies or Referer header are needed
examples/reorganised into one runnable script per use case- Releases now build and publish from CI
Breaking: SECRET_* metadata is preserved by default
Code that removed a SECRET_* option (SECRET_EMAIL_ADDRESS,
SECRET_RAW_ACCESS_CODE, SECRET_VERIFY) by omitting it from a full-replace edit
will now find that option quietly kept instead. To change or remove one, pass
update_secret_metadata as the string 'true'. Adding a brand-new SECRET_*
option never needs the flag.
This one fails silently rather than erroring, so check anything that relies on
omission to clear a secret.
CLI compatibility
The 1.x command-line interface is unchanged: new/edit/raw, the -h/-u/-p
flags, stdin piping, output format, exit codes, and the default of
https://rentry.co with zero configuration. Everything above is additive.