Command-line client for pste, a self-hosted paste server inspired by sprunge
Project description
pste
Command-line client for pste-server, a self-hosted paste server inspired by sprunge.
Installation
pip install pste
# or
pipx install pste
Configuration
Set PSTE_URL to the bookmark URL printed by pste-admin key add on the server — the same URL you'd save in a browser to use the web form:
export PSTE_URL="https://pste.example.com/?key=your-api-key"
Usage
# Create a paste from stdin
echo "hello world" | pste
pste < file.txt
cat file.txt | pste
# Create with options
echo "hello" | pste -s # single-view (deleted after first read)
echo "hello" | pste -e 7d # expires in 7 days
echo "hello" | pste -e 2W # expires in 2 weeks
pste -l python < script.py # explicit syntax highlighting language
pste -l < script.py # auto-detect language (Pygments, >0.5 confidence)
# Fetch a paste (by ID or full URL)
pste AB1234
pste https://pste.example.com/AB1234
pste https://pste.example.com/AB1234?python # ?lang is stripped; always fetches plain text
Language flag behaviour
| Invocation | What is sent | URL returned |
|---|---|---|
pste (no -l) |
nothing | plain URL |
pste -l python |
lang=python |
https://host/AB1234?python |
pste -l (no value) |
auto_detect=1 |
https://host/AB1234?python if detected, else plain URL |
When a ?<lang> URL is returned, opening it in a browser shows Pygments-highlighted HTML with table line numbers (Ctrl-A selects only the code) and a Copy button. Fetching via pste always strips the ?lang and returns plain text.
Expiry format
-e/--expire accepts an integer followed by a unit:
H— hoursD— daysW— weeksM— minutes
Examples: 24H, 7D, 2W, 30M
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pste-0.2.0.tar.gz.
File metadata
- Download URL: pste-0.2.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c4ade1677ef7f259776689a19fc6175e231040320dbf01548efbcb633093847
|
|
| MD5 |
e7ebc08a498f6bae131d54d878d1c943
|
|
| BLAKE2b-256 |
1c53dbcbc603425289084134918f20e53b1636668cb122656fd486449fc2695e
|
Provenance
The following attestation bundles were made for pste-0.2.0.tar.gz:
Publisher:
pypi.yml on crognlie/pste
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pste-0.2.0.tar.gz -
Subject digest:
3c4ade1677ef7f259776689a19fc6175e231040320dbf01548efbcb633093847 - Sigstore transparency entry: 1934417477
- Sigstore integration time:
-
Permalink:
crognlie/pste@b6a233321e41f3ae0bd26139f921e9aa894c8451 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/crognlie
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@b6a233321e41f3ae0bd26139f921e9aa894c8451 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pste-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pste-0.2.0-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ab750eed1f2d6609edae57f4de8f625424e5afb0f46a76363fa0a53bac110da
|
|
| MD5 |
156627f0498776eb18bf2ca443f8dd8e
|
|
| BLAKE2b-256 |
dda328c7fc2c2c03c57095159ea4a37cf511a4fba49316126bdefae868e948f8
|
Provenance
The following attestation bundles were made for pste-0.2.0-py3-none-any.whl:
Publisher:
pypi.yml on crognlie/pste
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pste-0.2.0-py3-none-any.whl -
Subject digest:
8ab750eed1f2d6609edae57f4de8f625424e5afb0f46a76363fa0a53bac110da - Sigstore transparency entry: 1934417500
- Sigstore integration time:
-
Permalink:
crognlie/pste@b6a233321e41f3ae0bd26139f921e9aa894c8451 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/crognlie
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@b6a233321e41f3ae0bd26139f921e9aa894c8451 -
Trigger Event:
push
-
Statement type: