aioworkers-databases-0.1.1
توضیحات
Databases plugin for aioworkers
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | aioworkers-databases-0.1.1 |
| نام | aioworkers-databases |
| نسخه کتابخانه | 0.1.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Alexander Bogushov |
| ایمیل نویسنده | abogushov@gmail.com |
| آدرس صفحه اصلی | https://github.com/aioworkers/aioworkers-databases |
| آدرس اینترنتی | https://pypi.org/project/aioworkers-databases/ |
| مجوز | Apache Software License 2.0 |
# aioworkers-databases
[](https://github.com/aioworkers/aioworkers-databases/actions?query=workflow%3ACI)
[](https://pypi.org/project/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`:
```yaml
db:
cls: aioworkers_databases.database.Database
dsn: sqlite:///db.sqlite
logging:
version: 1
disable_existing_loggers: false
root:
level: ERROR
handlers: [console]
handlers:
console:
level: DEBUG
class: logging.StreamHandler
loggers:
aioworkers_databases:
level: ERROR
handlers: [console]
propagate: true
```
Run `aioworkers`:
```shell
aioworkers -c config.yaml -i
```
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
```
نیازمندی
| مقدار | نام |
|---|---|
| >=0.18,<0.19 | aioworkers |
| >=0.4.0,<0.5.0 | databases |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6.1,<4.0 | Python |
نحوه نصب
نصب پکیج whl aioworkers-databases-0.1.1:
pip install aioworkers-databases-0.1.1.whl
نصب پکیج tar.gz aioworkers-databases-0.1.1:
pip install aioworkers-databases-0.1.1.tar.gz