Skip to main content

A lightweight Postman-like client for Jupyter notebooks and Python projects.

Project description

postnote

PyPI version Python Versions

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 curl preview 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, RequestSettings

settings = RequestSettings(
    base_url="https://domain.com",
    api_port=443,
    api_version="v1",
    resource_name="users",
    headers={
        "Content-Type": "application/json",
        "X-Client-Key": "your-key",
        "X-Client-Secret": "your-secret",
    },
)

client = Request(settings)

# 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

postnote-0.5.1.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

postnote-0.5.1-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file postnote-0.5.1.tar.gz.

File metadata

  • Download URL: postnote-0.5.1.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for postnote-0.5.1.tar.gz
Algorithm Hash digest
SHA256 a5407d8ebd8a7b965b12e57a38351eaf7b20d29e6e9ec096e2f1703172fdc241
MD5 7324a0695dc34f53d5ad595767869b73
BLAKE2b-256 0f589c2cf9dd9aff41ba96c1edb55935712a0f8f5d0dd9d27c52e16cd08e8a01

See more details on using hashes here.

Provenance

The following attestation bundles were made for postnote-0.5.1.tar.gz:

Publisher: publish-pypi.yml on daviguides/postnote

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file postnote-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: postnote-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for postnote-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 698d0f4e4530cbed49c0b76a9f6d23634b3e94ffc4b9b2380b89bef353192c8a
MD5 2e882723144febbba8dd1d507e6c8fc3
BLAKE2b-256 e87c66801e1d4fd4d208207ce4f94d18c3258a15e2be9c7e7d963e3d4074fab1

See more details on using hashes here.

Provenance

The following attestation bundles were made for postnote-0.5.1-py3-none-any.whl:

Publisher: publish-pypi.yml on daviguides/postnote

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page