Metadata-Version: 2.1
Name: aioworkers-databases
Version: 0.1.0
Summary: Databases plugin for aioworkers
Home-page: https://github.com/aioworkers/aioworkers-databases
License: Apache Software License 2.0
Author: Alexander Bogushov
Author-email: abogushov@gmail.com
Requires-Python: >=3.6,<4.0
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: aioworkers (>=0.18,<0.19)
Requires-Dist: databases (>=0.4.0,<0.5.0)
Project-URL: Repository, https://github.com/aioworkers/aioworkers-databases
Description-Content-Type: text/markdown

# aioworkers-databases

[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/aioworkers/aioworkers-databases/CI)](https://github.com/aioworkers/aioworkers-databases/actions?query=workflow%3ACI)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/aioworkers-databases)](https://pypi.org/project/aioworkers-databases)
[![PyPI](https://img.shields.io/pypi/v/aioworkers-databases)](https://pypi.org/project/aioworkers-databases)

aioworkers plugin for [databases](https://github.com/encode/databases).

## Usage

Add your database config to aioworkers config:

```yaml
db:
  cls: aioworkers_databases.database.Database
  dsn: sqlite:///db.sqlite
```

Create `Context` for this config and use your db via context:

```python
await context.db.execute('CREATE TABLE some_table (id INT);')
```

## Development

Install requirements:

```shell
poetry install
```

Run tests:

```shell
pytest
```
