Databases plugin for aioworkers
Project description
aioworkers-databases
aioworkers plugin for databases.
Usage
Add your database config to aioworkers config.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
:
aioworkers -c config.yaml -i
Create Context
for this config and use your db via context:
await context.db.execute('CREATE TABLE some_table (id INT);')
Development
Install requirements:
poetry install
Run tests:
pytest
Project details
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
File details
Details for the file aioworkers-databases-0.1.1.tar.gz
.
File metadata
- Download URL: aioworkers-databases-0.1.1.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.5 CPython/3.8.8 Linux/5.4.0-1043-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42d2a1196ee6c2ec56e5aff67142085bdced42886a3574b03cce9e4f5988846d |
|
MD5 | cb79964861a3db278c614c4150b9e519 |
|
BLAKE2b-256 | 538c07a9446b00bb5720396c4635d077e847f4901f88c80734d0acfc9a21ea7b |
File details
Details for the file aioworkers_databases-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: aioworkers_databases-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.5 CPython/3.8.8 Linux/5.4.0-1043-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a4cb5019ec8f59656d4441e925547f1e49773f4400e3c63c48d6ebe6af9d1bd |
|
MD5 | c2bc4eeb316584182340ddc654ed561a |
|
BLAKE2b-256 | b612359f22e9f2aabbec0b486adcbb9a34d96a0e9bc056dce7dcfa785adca55a |