Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Tronic/pastezi
Pastebin
https://github.com/Tronic/pastezi
pastebin public-domain python3 sanic
Last synced: 16 days ago
JSON representation
Pastebin
- Host: GitHub
- URL: https://github.com/Tronic/pastezi
- Owner: Tronic
- License: other
- Created: 2019-06-26T16:00:54.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-10T20:08:55.000Z (6 months ago)
- Last Synced: 2024-11-24T23:42:12.872Z (17 days ago)
- Topics: pastebin, public-domain, python3, sanic
- Language: JavaScript
- Size: 1.68 MB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-starred - Tronic/pastezi - Pastebin (python3)
README
# Pastezi
An attempt to create a pastebin site that does not suck. https://paste.zi.fi/
* The front page allows a new paste or loading existing ones by name
* Auto-copy of link after uploading a paste
* The usual keyboard shortcuts for save/open/copy/print
* Syntax hilight for editor and viewer
* Autodetection by file extension and content
* No extra cruft gets copied (even by Ctrl+A) or printed
* Implemented with [Sanic](https://sanic.readthedocs.io/) and [Redis](https://redis.io/) in async Python for insanely high performanceNo access control. Anyone may edit or delete pastes, if they have the URL. If no filename is provided, a random name is created.
Pastes are deleted after one year without views, or when re-uploaded with empty content.
## Scriptable API
A PUT request to site root creates a randomly named paste, while a PUT request to full URL (with filename) creates or modifies that paste. HTTP 201 Created is given if the paste didn't exist before. The URL of the paste will be returned (for viewing in browser or raw curl/wget/fetch).
curl https://paste.zi.fi/ -X PUT -d "text to paste"
curl https://paste.zi.fi/p/ -T your_file.txt
wget https://paste.zi.fi/p/your_file.txtNotice that binary files are not supported and that trailing newlines and such may get altered.