Pastebin.com as a python file object
A small python library with little dependencies to use pastebin.com as file like objects Don't take it serious it's just a project to have some fun
TODO
- Add support for none buffered files
- Add encoding options
- Add missing tests
install
git
pip install .
pypi
pip install pastebinfs
Example
user_key = pastebinfs.sync.pastebin_auth(api_key, username, password)
with pastebinfs.sync.pastebin_open("test.txt", "w", api_key, user_key) as f:
f.write("hello pastebin this is a test")
with pastebinfs.sync.pastebin_open("test.txt", "r", api_key, user_key) as f:
print(f.read()) # yields "hello pastebin this is a test"
print(pastebinfs.os.stat("test.txt", api_key, user_key))
# st_birthtime == 1297953260 # last update time
# st_key == '0b42rwhf' # paste key (this changes on every write)
# st_mode == 1 # paste visibility mode (unlisted)
# st_size == 29 # paste size (note in binary mode the size will be len(base64(input)))
Metadata
Release files for pastebinfs 0.4
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 |
|---|---|---|---|---|
| pastebinfs-0.4.tar.gz | 8.8 kB | Without provenance | Details for pastebinfs-0.4.tar.gz |
Release files / pastebinfs-0.4.tar.gz
| Download URL | pastebinfs-0.4.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
99746d38676d069c2253827b83b2658bb5ee7cf633e316824c68e50c0d653cec
|
|
BLAKE2b-256 checksum How to use checksums |
9dc6f374ea03729a5a36edb88c6ac5abcc46df8c77496f6f166d87e4de2f8199
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Security for pastebinfs 0.4
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.