A client for interacting with CouchDB 3 based on aiohttp
Project description
Async I/O for CouchDB built on aiohttp
This project is based on the (seemingly) unmaintained aiocoucdb but is not a drop-in replacement for that project.
Example
Using aiocouchdb3 is pretty easy.
import aiocouchdb3 as couchdb
user_jwt = get_user_jwt()
async with couchdb.connect() as client:
async with client.with_token(user_jwt) as session:
for db in await session.all_dbs:
print(await db.info)
Features
- Allows authentication for both username/password and JWT
Contribute
Thanks for considering adding your skills to improve this library.
Please review the Contributor Covenant Code of Conduct.
You must comply with it to contribute to aiocouchdb3.
Set up your local development environment
Check .python-version for the minimum version
of Python supported by aiocouchdb3. Install that and use it to create a
Poetry environment.
Install dependencies with
poetry install --all-extras
You must provide both mocked and integration tests when contributing. Get a CouchDB v3 instance up and running. (If you use Docker, see the following section about using Docker to run a properly configured CouchDB v3 instance.)
Running tests
There are two kinds of tests in the project found the ./tests directory.
-
./tests/mockedcontain proper unit tests isolated from the execution environment. -
./tests/integrationcontain integration tests that rely on a running instance of CouchDB. To run these copy./test.envto./.test.envand provide values for the two empty keys in it (and modify the other two if you want to).# Copy this file to .test.env and provide values for your # instance of CouchDB COUCHDB_USER = COUCHDB_PASSWORD = COUCHDB_DB_BASE_URL = http://locahost:5984 COUCHDB_JWT_SECRET = devsecret
There's a Docker compose file in
testsavailable for you to use if you want to use that.docker compose --env-file .test.env -f tests/docker-compose/docker-compose.yaml up
Run the tests with
poetry run pytest
If you want to run the tests while you're developing
poetry run ptw .
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 aiocouchdb3-0.1.5.tar.gz.
File metadata
- Download URL: aiocouchdb3-0.1.5.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: poetry/2.1.3 CPython/3.13.5 Linux/5.15.154+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5cdfaafee86c81d3cf83866dba60410919bd4763bd4604e1b7c222f0e4ce5db
|
|
| MD5 |
9395f5d4ca791a4cca3af2e17ee9e916
|
|
| BLAKE2b-256 |
3c7b3d44790c92120688b7e576079e83e63b560dff83880a6d4e8be5c7f93c59
|
File details
Details for the file aiocouchdb3-0.1.5-py3-none-any.whl.
File metadata
- Download URL: aiocouchdb3-0.1.5-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: poetry/2.1.3 CPython/3.13.5 Linux/5.15.154+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e82564f34f2a396d6d68b7a6655c1689e0cc5f37ffba054a0f4688564c04236d
|
|
| MD5 |
1eff7d81d26ee2cbee2545fb75cf78b0
|
|
| BLAKE2b-256 |
7b5b5f1e5a86321ee42d676ea0fd0186483ea195262b3222c1ba86a559e28bd5
|