A lightweight Postman-like client for Jupyter notebooks and Python projects.
Project description
postnote
postnote is a lightweight Postman-like client for Jupyter notebooks and Python projects.
Make HTTP requests inline, preview curl commands, and display JSON or Polars DataFrames seamlessly.
✨ Features
- Simple API for
GET,POST,PUT,PATCH,DELETE - Inline
curlpreview for easy copy/paste - Pretty Markdown + JSON display inside Jupyter
- Convert list responses directly into Polars DataFrames
- Support for JSON payloads, query params, and multipart file uploads
- Easy auth helpers (
Bearer,Basic)
🚀 Installation
pip install postnote
📖 Usage
Basic example
from postnote import Request
# create a client
client = Request(
base_url="https://domain.com",
api_port=443,
resource_name="users",
headers={
"Content-Type": "application/json",
"X-Client-Key": "your-key",
"X-Client-Secret": "your-secret",
},
)
# POST request with JSON payload
payload = {
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
}
resp = client.post(payload=payload)
# GET request with query params
resp = client.get(params={"page": 1, "limit": 10})
Convert to Polars
If the response contains a list, you can render it directly as a Polars DataFrame:
resp = client.get(params={"page": 1}, to_polars=True)
File upload (multipart/form-data)
files = [("file", open("avatar.png", "rb"))]
resp = client.post(payload={"note": "upload"}, files=files, endpoint="upload")
Quick auth
client.set_bearer("your_token_here")
# or
client.set_basic("username", "password")
🔧 Development
Clone the repo and install in editable mode:
git clone https://github.com/daviguides/postnote.git
cd postnote
pip install -e ".[dev]"
Run tests:
pytest
📜 License
MIT License © 2025 Davi Guides
Project details
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 postnote-0.2.0.tar.gz.
File metadata
- Download URL: postnote-0.2.0.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0caf5c56a6bfbeb410f62fcc4aa24fd926600caaa76915de0424b3ae7dd39e48
|
|
| MD5 |
6a6fe5e85c106695f1411f8709f13002
|
|
| BLAKE2b-256 |
9c28e7bceb6524b7745a547fd4022e1a70d7a58548f46e3d6bba071238744597
|
Provenance
The following attestation bundles were made for postnote-0.2.0.tar.gz:
Publisher:
publish-pypi.yml on daviguides/postnote
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
postnote-0.2.0.tar.gz -
Subject digest:
0caf5c56a6bfbeb410f62fcc4aa24fd926600caaa76915de0424b3ae7dd39e48 - Sigstore transparency entry: 439220264
- Sigstore integration time:
-
Permalink:
daviguides/postnote@29e897cdda3b56565a22210b55b9989177aeb505 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/daviguides
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@29e897cdda3b56565a22210b55b9989177aeb505 -
Trigger Event:
push
-
Statement type:
File details
Details for the file postnote-0.2.0-py3-none-any.whl.
File metadata
- Download URL: postnote-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78991a4d90e260f0e18e61c7b51408ba6a044fa015055a5a229585b4bd8f4479
|
|
| MD5 |
eb26dc582eb5006b1ccd0f780956ec56
|
|
| BLAKE2b-256 |
e89ff162762284400e5ff339d0ff186b8d62ac2c59faa51ab63ca2efae08fa66
|
Provenance
The following attestation bundles were made for postnote-0.2.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on daviguides/postnote
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
postnote-0.2.0-py3-none-any.whl -
Subject digest:
78991a4d90e260f0e18e61c7b51408ba6a044fa015055a5a229585b4bd8f4479 - Sigstore transparency entry: 439220297
- Sigstore integration time:
-
Permalink:
daviguides/postnote@29e897cdda3b56565a22210b55b9989177aeb505 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/daviguides
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@29e897cdda3b56565a22210b55b9989177aeb505 -
Trigger Event:
push
-
Statement type: