Skip to main content

Databases plugin for aioworkers

Project description

aioworkers-databases

GitHub Workflow Status PyPI - Python Version PyPI

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

aioworkers-databases-0.1.1.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

aioworkers_databases-0.1.1-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

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

Hashes for aioworkers-databases-0.1.1.tar.gz
Algorithm Hash digest
SHA256 42d2a1196ee6c2ec56e5aff67142085bdced42886a3574b03cce9e4f5988846d
MD5 cb79964861a3db278c614c4150b9e519
BLAKE2b-256 538c07a9446b00bb5720396c4635d077e847f4901f88c80734d0acfc9a21ea7b

See more details on using hashes here.

File details

Details for the file aioworkers_databases-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for aioworkers_databases-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3a4cb5019ec8f59656d4441e925547f1e49773f4400e3c63c48d6ebe6af9d1bd
MD5 c2bc4eeb316584182340ddc654ed561a
BLAKE2b-256 b612359f22e9f2aabbec0b486adcbb9a34d96a0e9bc056dce7dcfa785adca55a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page