unixsr
Unix Style Request (UNIXSR) — Axios with a Unix vocabulary HTTP client for Python 3.10+.
Built on top of httpx. Fully typed (py.typed). Supports both synchronous operations and an async companion namespace (aio).
Install
# Recommended: in a virtual environment
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install unixsr
Quick Start
from unixsr import *
# Basic HTTP requests
res = cat("https://api.site.com/users")
print(res.status, res.data)
touch("https://api.site.com/users", {"name": "Ada"})
sed("https://api.site.com/users/42", {"active": False})
rm("https://api.site.com/users/42")
Commands Reference
| Command | HTTP Verb | Description | Body? |
|---|---|---|---|
cat |
GET | Read a remote resource | no |
touch |
POST | Create or submit | yes |
mv |
PUT | Replace or move | yes |
sed |
PATCH | Edit in place | yes |
rm |
DELETE | Remove remote resource | no |
stat |
HEAD | Metadata only (headers) | no |
man |
OPTIONS | Query capabilities | no |
request |
CUSTOM | Generic Axios config escape hatch | config |
Flags
Structured keyword form or curl-like command-line string:
# Structured keyword arguments
cat("https://api.site.com/me", H="Authorization: Bearer TOKEN", m=5)
# Command-line string
cat("-H 'Authorization: Bearer TOKEN' -m 5 https://api.site.com/me")
Response Pipes (real | operator)
from unixsr import cat, grep, cut, head
names = cat("https://api.site.com/users") | grep(active=True) | cut("name") | head(5)
Scoped Client (cd) & Traps (trap)
from unixsr import cd
api = cd("https://api.site.com", H="Authorization: Bearer TOKEN")
def log_request(config):
print("Requesting:", config.get("url"))
return config
h = api.trap("request", log_request)
me = api.cat("/me")
api.untrap(h)
Asynchronous Support
from unixsr import aio
res = await aio.cat("https://api.site.com/users")
print(res.data)
License
MIT
Metadata
Release files for unixsr 0.0.5
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 |
|---|---|---|---|---|
| unixsr-0.0.5.tar.gz | 18.5 kB | Without provenance | Details for unixsr-0.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| unixsr-0.0.5-py3-none-any.whl | Python 3 | none | any | Details for unixsr-0.0.5-py3-none-any.whl |
Total release size: 43.4 kB
Release files / unixsr-0.0.5.tar.gz
| Download URL | unixsr-0.0.5.tar.gz |
|---|---|
| Size | 18.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
522f123a32e9dba07add15deaa3a3c9ff390626f9d71edd522712f9a108c3184
|
|
BLAKE2b-256 checksum How to use checksums |
d9425e98510ddf10727a99450f45a49ca5c78e9f53e9f960e26fee87f5ab8a71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / unixsr-0.0.5-py3-none-any.whl
| Download URL | unixsr-0.0.5-py3-none-any.whl |
|---|---|
| Size | 24.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
32e2c9d1b6692bd4f3739614b318ce71a758d66c04610466a4bc33d12c522820
|
|
BLAKE2b-256 checksum How to use checksums |
ae394cd9ca4ebe1b5b5ed4715d3f5e8d924e8d51f09ab4925c25dbbd637d7a70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for unixsr 0.0.5
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.