rentrylib
A python library for interfacing with the paste-site https://rentry.org
Install
From PyPi: python -m pip install rentrylib
From GitHub: python -m pip install git+https://github.com/yntha/rentrylib
Usage
Create a new page with a custom URL and a custom edit code. Note that these are all optional parameters:
page = rentrylib.RentryPage(
text="Hello World! :)",
custom_url='h3LLoW0RLd',
edit_code='h*ll*w*rld'
)
Edit the page:
response = page.edit({
'text': 'Some new content.',
'edit_code': "This shouldn't be used!",
'new_edit_code': 'new password!!',
'new_url': 'anewurl'
})
Delete this page:
response = page.edit({'delete': True})
# or
response = page.delete()
Misc:
# Get the page URL
# str
page_url = page.site
# Get the page `edit_code`
# str
edit_code = page.code
# Fetch the raw content of this page
# str
content = page.raw
# Fetch the content of this page as a PNG image.
# bytes
image = page.png
# Fetch the content of this page as a PDF document.
# bytes
document = page.pdf
Metadata
Release files for rentrylib 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rentrylib-1.0.0.tar.gz | 8.4 kB | Without provenance | Details for rentrylib-1.0.0.tar.gz |
Release files / rentrylib-1.0.0.tar.gz
| Download URL | rentrylib-1.0.0.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
686923c519bd417d3559b509b0c0f355a823f028d0d8dddee6d9d32be253d249
|
|
BLAKE2b-256 checksum How to use checksums |
0920ad51960c4b7298c75c530face1a5080c300a78c0f3ae66d7814313347630
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for rentrylib 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.