Skip to content

Releases: radude/rentry

Rework to importable client & pip install

Choose a tag to compare

@radude radude released this 15 Jul 13:41

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 rentry

Still 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:

  • fetch gets an entry's full details (text, metadata, dates) as JSON
  • delete deletes an entry
  • update changes an entry's edit code, url or modify code
  • -a/--auth-code passes a rentry-auth access code to raw

Other changes

  • Metadata can be given as a JSON object, not just newline-separated KEY = value pairs
  • 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.

2024 Feature Complete Update

Choose a tag to compare

@radude radude released this 20 Dec 13:51

This release brings the Rentry API up to date with all new features released in 2024. It adds two new endpoints: delete and fetch, full support for metadata (either as string or JSON) and the ability to update single values without re-supplying all options.

Modernisation Update

Choose a tag to compare

@radude radude released this 01 Dec 21:20

Updated to work on install and to add dotenv for easier setup

1.0.1

Choose a tag to compare

@radude radude released this 16 Jan 07:43
ef8d47b
Update README.md