%global _empty_manifest_terminate_build 0
Name: python-apiron
Version: 7.1.0.post1
Release: 1
Summary: apiron helps you cook a tasty client for RESTful APIs. Just don't wash it with SOAP.
License: MIT
URL: https://github.com/ithaka/apiron
Source0: https://mirrors.nju.edu.cn/pypi/web/packages/9f/b0/cd9a4346c66e97e2779cc5f61ab875719e1c315db8348f6a338846c10fc0/apiron-7.1.0.post1.tar.gz
BuildArch: noarch
Requires: python3-requests
Requires: python3-urllib3
Requires: python3-importlib-metadata
Requires: python3-sphinx
Requires: python3-sphinx-autodoc-typehints
Requires: python3-sphinx-autobuild
%description
# apiron
[](https://pypi.org/project/apiron/#history)
[](https://pypi.org/project/apiron/)
[](https://github.com/ithaka/apiron/actions)
[](https://apiron.readthedocs.io)
[](code-of-conduct.md)
`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:
```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.
%package -n python3-apiron
Summary: apiron helps you cook a tasty client for RESTful APIs. Just don't wash it with SOAP.
Provides: python-apiron
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-apiron
# apiron
[](https://pypi.org/project/apiron/#history)
[](https://pypi.org/project/apiron/)
[](https://github.com/ithaka/apiron/actions)
[](https://apiron.readthedocs.io)
[](code-of-conduct.md)
`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:
```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.
%package help
Summary: Development documents and examples for apiron
Provides: python3-apiron-doc
%description help
# apiron
[](https://pypi.org/project/apiron/#history)
[](https://pypi.org/project/apiron/)
[](https://github.com/ithaka/apiron/actions)
[](https://apiron.readthedocs.io)
[](code-of-conduct.md)
`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:
```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.
%prep
%autosetup -n apiron-7.1.0.post1
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-apiron -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Mon May 29 2023 Python_Bot - 7.1.0.post1-1
- Package Spec generated