Skip to main content

pyramid-client-builder

PyPI version Python versions License: MIT

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:

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyramid_client_builder-0.14.7.tar.gz (165.8 kB view details)

Uploaded Source

Built Distribution

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

pyramid_client_builder-0.14.7-py3-none-any.whl (77.2 kB view details)

Uploaded Python 3

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

Hashes for pyramid_client_builder-0.14.7.tar.gz
Algorithm Hash digest
SHA256 6f091bf529c0360bf35d75f733244bb3585928f89db8497b5fa420b39117d78e
MD5 ad3d54cafd74e52fa08bb7800715c88c
BLAKE2b-256 b21704656bf36591cb7b0d395e9c3512cc6f388cacc20cb5046b94495d17d778

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyramid_client_builder-0.14.7.tar.gz:

Publisher: ci.yml on cartaorobbin/pyramid-client-builder

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

File details

Details for the file pyramid_client_builder-0.14.7-py3-none-any.whl.

File metadata

File hashes

Hashes for pyramid_client_builder-0.14.7-py3-none-any.whl
Algorithm Hash digest
SHA256 368883c6ac28aaeb04b4fcef0fa03c1a52ac83bcc860cfa731450fe33e7f7bdc
MD5 79985f68ab359647e4f457fa4b1aa522
BLAKE2b-256 0df000a5348b7323fda4e073923895bb6e09aefa1049e9a56497d50d5c0075c0

See more details on using hashes here.

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

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

Release history Release notifications | RSS feed

This release

0.14.7 This release

2 files

0.14.6

2 files

0.14.5

2 files

0.14.4

2 files

0.14.3

2 files

0.14.2

2 files

0.14.1

2 files

0.14.0

2 files

0.13.1

2 files

0.13.0

2 files

0.12.0

2 files

0.11.0

2 files

0.10.3

2 files

0.10.2

2 files

0.10.1

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.1

2 files

0.6.0

2 files

0.5.5

2 files

0.5.3

2 files

0.5.1

2 files

0.5.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page