Introspect Pyramid views and generate an HTTP client for the app
Project description
pyramid-client-builder
Introspect a Pyramid application and generate typed HTTP clients — like protoc for gRPC, but for your Pyramid REST API. Generates Python and Go clients in a single invocation.
What it does
pclient-build boots your Pyramid app from its INI file, discovers routes and Cornice services, and generates client packages for multiple languages and HTTP transports. Each variant is written to its own subdirectory.
Pyramid app (INI file)
→ introspect routes, views, schemas
→ generate all client variants:
python_requests/ (Python + requests)
python_httpx/ (Python + httpx)
go/ (Go + net/http)
Quick example
Generate clients from your payments service:
pclient-build development.ini --name payments --output ./generated/
Use the Python client:
from payments_client.client import PaymentsClient
client = PaymentsClient(base_url="http://localhost:6543")
# Methods are named from your URL paths
charges = client.list_charges()
charge = client.get_charge(id=42)
new_charge = client.create_charge(amount=1000, currency="usd")
client.cancel_charge(id=42)
# Versioned APIs get sub-clients
items = client.v1.list_items()
Use the Go client:
import "payments-client"
client := paymentsclient.NewClient(
"http://localhost:6543",
paymentsclient.WithAuthToken("your-token"),
)
charges, err := client.V1.ListCharges(nil)
charge, err := client.V1.GetCharge("42")
newCharge, err := client.V1.CreateCharge(&v1.ChargesRequestSchema{
Amount: 1000,
Currency: "usd",
})
Installation
pip install pyramid-client-builder
Or with uv:
uv add pyramid-client-builder
Documentation
Full documentation is available at the project docs site, including:
- Getting Started — installation and first client
- CLI Reference — all
pclient-buildoptions - Generated Output — what files are produced
- Usage Guide — standalone and Pyramid integration
- Features — naming, schemas, versioning
Development
git clone https://github.com/cartaorobbin/pyramid-client-builder.git
cd pyramid-client-builder
uv sync --dev
Run tests:
uv run pytest # single Python version
uv run tox # full matrix (3.10–3.13)
Lint and format:
uv run ruff check .
uv run black .
Build docs locally:
uv run mkdocs serve
License
MIT
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 pyramid_client_builder-0.14.7.tar.gz.
File metadata
- Download URL: pyramid_client_builder-0.14.7.tar.gz
- Upload date:
- Size: 165.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f091bf529c0360bf35d75f733244bb3585928f89db8497b5fa420b39117d78e
|
|
| MD5 |
ad3d54cafd74e52fa08bb7800715c88c
|
|
| BLAKE2b-256 |
b21704656bf36591cb7b0d395e9c3512cc6f388cacc20cb5046b94495d17d778
|
Provenance
The following attestation bundles were made for pyramid_client_builder-0.14.7.tar.gz:
Publisher:
ci.yml on cartaorobbin/pyramid-client-builder
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyramid_client_builder-0.14.7.tar.gz -
Subject digest:
6f091bf529c0360bf35d75f733244bb3585928f89db8497b5fa420b39117d78e - Sigstore transparency entry: 1255043460
- Sigstore integration time:
-
Permalink:
cartaorobbin/pyramid-client-builder@5da15410ddff72e2639413821d3d782179e53cc9 -
Branch / Tag:
refs/tags/v0.14.7 - Owner: https://github.com/cartaorobbin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@5da15410ddff72e2639413821d3d782179e53cc9 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pyramid_client_builder-0.14.7-py3-none-any.whl.
File metadata
- Download URL: pyramid_client_builder-0.14.7-py3-none-any.whl
- Upload date:
- Size: 77.2 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 |
368883c6ac28aaeb04b4fcef0fa03c1a52ac83bcc860cfa731450fe33e7f7bdc
|
|
| MD5 |
79985f68ab359647e4f457fa4b1aa522
|
|
| BLAKE2b-256 |
0df000a5348b7323fda4e073923895bb6e09aefa1049e9a56497d50d5c0075c0
|
Provenance
The following attestation bundles were made for pyramid_client_builder-0.14.7-py3-none-any.whl:
Publisher:
ci.yml on cartaorobbin/pyramid-client-builder
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyramid_client_builder-0.14.7-py3-none-any.whl -
Subject digest:
368883c6ac28aaeb04b4fcef0fa03c1a52ac83bcc860cfa731450fe33e7f7bdc - Sigstore transparency entry: 1255043544
- Sigstore integration time:
-
Permalink:
cartaorobbin/pyramid-client-builder@5da15410ddff72e2639413821d3d782179e53cc9 -
Branch / Tag:
refs/tags/v0.14.7 - Owner: https://github.com/cartaorobbin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@5da15410ddff72e2639413821d3d782179e53cc9 -
Trigger Event:
release
-
Statement type: