apiron helps you cook a tasty client for RESTful APIs. Just don't wash it with SOAP.
Project description
apiron
apiron helps you cook a tasty client for RESTful APIs. Just don't wash it with SOAP.
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.
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 apiron-9.1.0.tar.gz.
File metadata
- Download URL: apiron-9.1.0.tar.gz
- Upload date:
- Size: 17.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18d73aecc280af61c23eb2c0031c482a386e8ace5fa8d8d27dac234c02c0d294
|
|
| MD5 |
7106fcb0417d8e7c6bf54c20ef196d29
|
|
| BLAKE2b-256 |
7c584e9158648251ddb54519d3b716014e76d3f9843e189819fa356b5ac16e1f
|
Provenance
The following attestation bundles were made for apiron-9.1.0.tar.gz:
Publisher:
main.yml on ithaka/apiron
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
apiron-9.1.0.tar.gz -
Subject digest:
18d73aecc280af61c23eb2c0031c482a386e8ace5fa8d8d27dac234c02c0d294 - Sigstore transparency entry: 520690064
- Sigstore integration time:
-
Permalink:
ithaka/apiron@5d12993356e99b16db97090c71221aa9e66c7b3c -
Branch / Tag:
refs/tags/v9.1.0 - Owner: https://github.com/ithaka
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@5d12993356e99b16db97090c71221aa9e66c7b3c -
Trigger Event:
push
-
Statement type:
File details
Details for the file apiron-9.1.0-py3-none-any.whl.
File metadata
- Download URL: apiron-9.1.0-py3-none-any.whl
- Upload date:
- Size: 14.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86ffdbb9c5396279b3b13dd99136a06bc810c7e046173134abadd537af72f06a
|
|
| MD5 |
51bd054c7526943404f5b9aef07d0a55
|
|
| BLAKE2b-256 |
3602631c842ca690fce7618c678c5ebf048a37ba956a8d2d15cbe2cc0bfa8008
|
Provenance
The following attestation bundles were made for apiron-9.1.0-py3-none-any.whl:
Publisher:
main.yml on ithaka/apiron
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
apiron-9.1.0-py3-none-any.whl -
Subject digest:
86ffdbb9c5396279b3b13dd99136a06bc810c7e046173134abadd537af72f06a - Sigstore transparency entry: 520690095
- Sigstore integration time:
-
Permalink:
ithaka/apiron@5d12993356e99b16db97090c71221aa9e66c7b3c -
Branch / Tag:
refs/tags/v9.1.0 - Owner: https://github.com/ithaka
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@5d12993356e99b16db97090c71221aa9e66c7b3c -
Trigger Event:
push
-
Statement type: