%global _empty_manifest_terminate_build 0 Name: python-aiocouch Version: 2.2.2 Release: 1 Summary: 🛋 An asynchronous client library for CouchDB 2.x and 3.x License: BSD 3-clause URL: https://github.com/metricq/aiocouch Source0: https://mirrors.nju.edu.cn/pypi/web/packages/7b/3a/9eecc2498e55b42048f8f90bcde34b6ae31bdbc909a31cbe1e74cbf6f325/aiocouch-2.2.2.tar.gz BuildArch: noarch Requires: python3-aiohttp Requires: python3-Deprecated Requires: python3-typing-extensions Requires: python3-isort Requires: python3-black Requires: python3-pytest Requires: python3-pytest-asyncio Requires: python3-pytest-cov Requires: python3-packaging Requires: python3-mypy Requires: python3-types-Deprecated Requires: python3-sphinx Requires: python3-sphinx-autodoc-typehints Requires: python3-sphinxcontrib-trio Requires: python3-sphinx Requires: python3-sphinx-autodoc-typehints Requires: python3-sphinxcontrib-trio Requires: python3-aiomonitor Requires: python3-click Requires: python3-click-log Requires: python3-click-completion Requires: python3-pytest Requires: python3-pytest-asyncio Requires: python3-pytest-cov Requires: python3-packaging Requires: python3-mypy Requires: python3-types-Deprecated %description [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) [![PyPI version](https://badge.fury.io/py/aiocouch.svg)](https://badge.fury.io/py/aiocouch) ![Python package](https://github.com/metricq/aiocouch/workflows/Python%20package/badge.svg) [![codecov](https://codecov.io/gh/metricq/aiocouch/branch/master/graph/badge.svg)](https://codecov.io/gh/metricq/aiocouch) [![Documentation Status](https://readthedocs.org/projects/aiocouch/badge/?version=latest)](https://aiocouch.readthedocs.io/en/latest/?badge=latest) # aiocouch An asynchronous client library for CouchDB 2.0 based on asyncio using aiohttp ## Key features - All requests are asynchronus using aiohttp - Supports CouchDB 2.x and 3.x - Support for modern Python ≥ 3.7 ## Library installation ``` pip install aiocouch ``` ## Getting started The following code retrieves and prints the list of `incredients` of the *apple_pie* `recipe`. The `incredients` are stored as a list in the *apple_pie* `aiocouch.document.Document`, which is part of the `recipe` `aiocouch.database.Database`. We use the context manager `aiocouch.CouchDB` to create a new session. ```python from aiocouch import CouchDB async with CouchDB( "http://localhost:5984", user="admin", password="admin" ) as couchdb: db = await couchdb["recipes"] doc = await db["apple_pie"] print(doc["incredients"]) ``` We can also create new recipes, for instance for some delicious cookies. ```python new_doc = await db.create( "cookies", data={"title": "Granny's cookies", "rating": "★★★★★"} ) await new_doc.save() ``` For further details please refer to the documentation, which is available [here on readthedocs.org](https://aiocouch.readthedocs.io/). ## Run examples - Setup the CouchDB URL and credentials using the environment variables - Install dependencies using `pip install --editable '.[examples]'` - run for instance `python examples/getting_started.py` ## Run tests - Install dependencies using `pip install --editable '.[tests]'` - Setup the CouchDB URL and credentials using the environment variables (`COUCHDB_HOST`, `COUCHDB_USER`, `COUCHDB_PASS`) - run `pytest --cov=aiocouch` ## Generate documentation - Install dependencies using `pip install '.[docs]'` - switch to the `docs` directory: `cd docs` - run `make html` %package -n python3-aiocouch Summary: 🛋 An asynchronous client library for CouchDB 2.x and 3.x Provides: python-aiocouch BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-aiocouch [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) [![PyPI version](https://badge.fury.io/py/aiocouch.svg)](https://badge.fury.io/py/aiocouch) ![Python package](https://github.com/metricq/aiocouch/workflows/Python%20package/badge.svg) [![codecov](https://codecov.io/gh/metricq/aiocouch/branch/master/graph/badge.svg)](https://codecov.io/gh/metricq/aiocouch) [![Documentation Status](https://readthedocs.org/projects/aiocouch/badge/?version=latest)](https://aiocouch.readthedocs.io/en/latest/?badge=latest) # aiocouch An asynchronous client library for CouchDB 2.0 based on asyncio using aiohttp ## Key features - All requests are asynchronus using aiohttp - Supports CouchDB 2.x and 3.x - Support for modern Python ≥ 3.7 ## Library installation ``` pip install aiocouch ``` ## Getting started The following code retrieves and prints the list of `incredients` of the *apple_pie* `recipe`. The `incredients` are stored as a list in the *apple_pie* `aiocouch.document.Document`, which is part of the `recipe` `aiocouch.database.Database`. We use the context manager `aiocouch.CouchDB` to create a new session. ```python from aiocouch import CouchDB async with CouchDB( "http://localhost:5984", user="admin", password="admin" ) as couchdb: db = await couchdb["recipes"] doc = await db["apple_pie"] print(doc["incredients"]) ``` We can also create new recipes, for instance for some delicious cookies. ```python new_doc = await db.create( "cookies", data={"title": "Granny's cookies", "rating": "★★★★★"} ) await new_doc.save() ``` For further details please refer to the documentation, which is available [here on readthedocs.org](https://aiocouch.readthedocs.io/). ## Run examples - Setup the CouchDB URL and credentials using the environment variables - Install dependencies using `pip install --editable '.[examples]'` - run for instance `python examples/getting_started.py` ## Run tests - Install dependencies using `pip install --editable '.[tests]'` - Setup the CouchDB URL and credentials using the environment variables (`COUCHDB_HOST`, `COUCHDB_USER`, `COUCHDB_PASS`) - run `pytest --cov=aiocouch` ## Generate documentation - Install dependencies using `pip install '.[docs]'` - switch to the `docs` directory: `cd docs` - run `make html` %package help Summary: Development documents and examples for aiocouch Provides: python3-aiocouch-doc %description help [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) [![PyPI version](https://badge.fury.io/py/aiocouch.svg)](https://badge.fury.io/py/aiocouch) ![Python package](https://github.com/metricq/aiocouch/workflows/Python%20package/badge.svg) [![codecov](https://codecov.io/gh/metricq/aiocouch/branch/master/graph/badge.svg)](https://codecov.io/gh/metricq/aiocouch) [![Documentation Status](https://readthedocs.org/projects/aiocouch/badge/?version=latest)](https://aiocouch.readthedocs.io/en/latest/?badge=latest) # aiocouch An asynchronous client library for CouchDB 2.0 based on asyncio using aiohttp ## Key features - All requests are asynchronus using aiohttp - Supports CouchDB 2.x and 3.x - Support for modern Python ≥ 3.7 ## Library installation ``` pip install aiocouch ``` ## Getting started The following code retrieves and prints the list of `incredients` of the *apple_pie* `recipe`. The `incredients` are stored as a list in the *apple_pie* `aiocouch.document.Document`, which is part of the `recipe` `aiocouch.database.Database`. We use the context manager `aiocouch.CouchDB` to create a new session. ```python from aiocouch import CouchDB async with CouchDB( "http://localhost:5984", user="admin", password="admin" ) as couchdb: db = await couchdb["recipes"] doc = await db["apple_pie"] print(doc["incredients"]) ``` We can also create new recipes, for instance for some delicious cookies. ```python new_doc = await db.create( "cookies", data={"title": "Granny's cookies", "rating": "★★★★★"} ) await new_doc.save() ``` For further details please refer to the documentation, which is available [here on readthedocs.org](https://aiocouch.readthedocs.io/). ## Run examples - Setup the CouchDB URL and credentials using the environment variables - Install dependencies using `pip install --editable '.[examples]'` - run for instance `python examples/getting_started.py` ## Run tests - Install dependencies using `pip install --editable '.[tests]'` - Setup the CouchDB URL and credentials using the environment variables (`COUCHDB_HOST`, `COUCHDB_USER`, `COUCHDB_PASS`) - run `pytest --cov=aiocouch` ## Generate documentation - Install dependencies using `pip install '.[docs]'` - switch to the `docs` directory: `cd docs` - run `make html` %prep %autosetup -n aiocouch-2.2.2 %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-aiocouch -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Mon May 15 2023 Python_Bot - 2.2.2-1 - Package Spec generated