Skip to main content

apiron

PyPI version Supported Python versions Build status Documentation Status Contributor Covenant

apiron helps you cook a tasty client for RESTful APIs. Just don't wash it with SOAP.

Pie in a cast iron skillet

Gathering data from multiple services has become a ubiquitous task for web application developers. The complexity can grow quickly: calling an API endpoint with multiple parameter sets, calling multiple API endpoints, calling multiple endpoints in multiple APIs. While the business logic can get hairy, the code to interact with those APIs doesn't have to.

apiron provides declarative, structured configuration of services and endpoints with a unified interface for interacting with them.

Defining a service

A service definition requires a domain and one or more endpoints with which to interact:

from apiron import JsonEndpoint, Service

class GitHub(Service):
    domain = 'https://api.github.com'
    user = JsonEndpoint(path='/users/{username}')
    repo = JsonEndpoint(path='/repos/{org}/{repo}')

Interacting with a service

Once your service definition is in place, you can interact with its endpoints:

response = GitHub.user(username='defunkt')
# {"name": "Chris Wanstrath", ...}

response = GitHub.repo(org='github', repo='hub')
# {"description": "hub helps you win at git.", ...}

To learn more about building clients, head over to the docs.

Contributing

We are happy to consider contributions via pull request, especially if they address an existing bug or vulnerability. Please read our contribution guidelines before getting started.

License

This package is available under the MIT license. For more information, view the full license and copyright notice.

Copyright 2018-2025 Ithaka Harbors, Inc.

Metadata

Release files for apiron 9.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apiron 9.1.0
File Size Uploaded
apiron-9.1.0.tar.gz 17.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for apiron 9.1.0
File Interpreter ABI Platform
apiron-9.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 31.8 kB

Release files / apiron-9.1.0.tar.gz

Download URL apiron-9.1.0.tar.gz
Size 17.7 kB
Tags Source
SHA-256 checksum
How to use checksums
18d73aecc280af61c23eb2c0031c482a386e8ace5fa8d8d27dac234c02c0d294
BLAKE2b-256 checksum
How to use checksums
7c584e9158648251ddb54519d3b716014e76d3f9843e189819fa356b5ac16e1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 15, 2025.

Transparency log

Release files / apiron-9.1.0-py3-none-any.whl

Download URL apiron-9.1.0-py3-none-any.whl
Size 14.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
86ffdbb9c5396279b3b13dd99136a06bc810c7e046173134abadd537af72f06a
BLAKE2b-256 checksum
How to use checksums
3602631c842ca690fce7618c678c5ebf048a37ba956a8d2d15cbe2cc0bfa8008
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 15, 2025.

Transparency log
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