Name | apiron JSON |
Version |
8.0.0.post1
JSON |
| download |
home_page | None |
Summary | apiron helps you cook a tasty client for RESTful APIs. Just don't wash it with SOAP. |
upload_time | 2024-10-28 17:34:46 |
maintainer | None |
docs_url | None |
author | None |
requires_python | None |
license | Copyright 2018-2022 Ithaka Harbors, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# apiron
[![PyPI version](https://badge.fury.io/py/apiron.svg)](https://pypi.org/project/apiron/#history)
[![Supported Python versions](https://img.shields.io/pypi/pyversions/apiron.svg)](https://pypi.org/project/apiron/)
[![Build status](https://github.com/github/docs/actions/workflows/main.yml/badge.svg)](https://github.com/ithaka/apiron/actions)
[![Documentation Status](https://readthedocs.org/projects/apiron/badge/?version=latest)](https://apiron.readthedocs.io)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v1.4%20adopted-ff69b4.svg)](code-of-conduct.md)
`apiron` helps you cook a tasty client for RESTful APIs. Just don't wash it with SOAP.
<img src="https://github.com/ithaka/apiron/raw/dev/docs/_static/cast-iron-skillet.png" alt="Pie in a cast iron skillet" width="200">
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:
```python
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:
```python
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](https://apiron.readthedocs.io).
## Contributing
We are happy to consider contributions via pull request,
especially if they address an existing bug or vulnerability.
Please read our [contribution guidelines](./.github/CONTRIBUTING.md) before getting started.
## License
This package is available under the MIT license.
For more information, [view the full license and copyright notice](./LICENSE).
Copyright 2018-2022 Ithaka Harbors, Inc.
Raw data
{
"_id": null,
"home_page": null,
"name": "apiron",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "\"Ithaka Harbors, Inc.\" <opensource@ithaka.org>",
"download_url": "https://files.pythonhosted.org/packages/6f/e1/cf00c3f8599de8aa8975a28c41f8f80769bfe24e824a643b4e2a2db9363b/apiron-8.0.0.post1.tar.gz",
"platform": null,
"description": "# apiron\n\n[![PyPI version](https://badge.fury.io/py/apiron.svg)](https://pypi.org/project/apiron/#history)\n[![Supported Python versions](https://img.shields.io/pypi/pyversions/apiron.svg)](https://pypi.org/project/apiron/)\n[![Build status](https://github.com/github/docs/actions/workflows/main.yml/badge.svg)](https://github.com/ithaka/apiron/actions)\n[![Documentation Status](https://readthedocs.org/projects/apiron/badge/?version=latest)](https://apiron.readthedocs.io)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v1.4%20adopted-ff69b4.svg)](code-of-conduct.md)\n\n`apiron` helps you cook a tasty client for RESTful APIs. Just don't wash it with SOAP.\n\n<img src=\"https://github.com/ithaka/apiron/raw/dev/docs/_static/cast-iron-skillet.png\" alt=\"Pie in a cast iron skillet\" width=\"200\">\n\nGathering data from multiple services has become a ubiquitous task for web application developers.\nThe complexity can grow quickly:\ncalling an API endpoint with multiple parameter sets,\ncalling multiple API endpoints,\ncalling multiple endpoints in multiple APIs.\nWhile the business logic can get hairy,\nthe code to interact with those APIs doesn't have to.\n\n`apiron` provides declarative, structured configuration of services and endpoints\nwith a unified interface for interacting with them.\n\n\n## Defining a service\n\nA service definition requires a domain\nand one or more endpoints with which to interact:\n\n```python\nfrom apiron import JsonEndpoint, Service\n\nclass GitHub(Service):\n domain = 'https://api.github.com'\n user = JsonEndpoint(path='/users/{username}')\n repo = JsonEndpoint(path='/repos/{org}/{repo}')\n```\n\n\n## Interacting with a service\n\nOnce your service definition is in place, you can interact with its endpoints:\n\n```python\nresponse = GitHub.user(username='defunkt')\n# {\"name\": \"Chris Wanstrath\", ...}\n\nresponse = GitHub.repo(org='github', repo='hub')\n# {\"description\": \"hub helps you win at git.\", ...}\n```\n\nTo learn more about building clients, head over to [the docs](https://apiron.readthedocs.io).\n\n\n## Contributing\n\nWe are happy to consider contributions via pull request,\nespecially if they address an existing bug or vulnerability.\nPlease read our [contribution guidelines](./.github/CONTRIBUTING.md) before getting started.\n\n## License\n\nThis package is available under the MIT license.\nFor more information, [view the full license and copyright notice](./LICENSE).\n\nCopyright 2018-2022 Ithaka Harbors, Inc.\n",
"bugtrack_url": null,
"license": "Copyright 2018-2022 Ithaka Harbors, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "apiron helps you cook a tasty client for RESTful APIs. Just don't wash it with SOAP.",
"version": "8.0.0.post1",
"project_urls": {
"Changelog": "https://github.com/ithaka/apiron/blob/main/CHANGELOG.md",
"Documentation": "https://apiron.readthedocs.io",
"Issues": "https://github.com/ithaka/apiron/issues",
"Repository": "https://github.com/ithaka/apiron"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3eae1d52edce2b72425ec5f2e97c71c120bb7512f0aee01962d209262b9668ea",
"md5": "864aece7830ab4ac310a57034a02c7b2",
"sha256": "0f1e9af9d81de99d99c51af25fff52dab653a526cd1aef1acca26f136a60ca8e"
},
"downloads": -1,
"filename": "apiron-8.0.0.post1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "864aece7830ab4ac310a57034a02c7b2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 14104,
"upload_time": "2024-10-28T17:34:45",
"upload_time_iso_8601": "2024-10-28T17:34:45.055410Z",
"url": "https://files.pythonhosted.org/packages/3e/ae/1d52edce2b72425ec5f2e97c71c120bb7512f0aee01962d209262b9668ea/apiron-8.0.0.post1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6fe1cf00c3f8599de8aa8975a28c41f8f80769bfe24e824a643b4e2a2db9363b",
"md5": "3c6aac8ab4ae11f5b64bf0d53b166c6a",
"sha256": "595fc97a88fb9a052f374714331052129f09e85483ac2983bf564714137f6af2"
},
"downloads": -1,
"filename": "apiron-8.0.0.post1.tar.gz",
"has_sig": false,
"md5_digest": "3c6aac8ab4ae11f5b64bf0d53b166c6a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 17460,
"upload_time": "2024-10-28T17:34:46",
"upload_time_iso_8601": "2024-10-28T17:34:46.602858Z",
"url": "https://files.pythonhosted.org/packages/6f/e1/cf00c3f8599de8aa8975a28c41f8f80769bfe24e824a643b4e2a2db9363b/apiron-8.0.0.post1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-28 17:34:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ithaka",
"github_project": "apiron",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "apiron"
}