Skip to main content

Async Support for various databases

Project description

AIO-Databases

The package gives you asycio support for a range of databases (SQLite, PostgreSQL, MySQL).

Tests Status PYPI Version Python Versions

Requirements

  • python >= 3.7

Installation

aio-databases should be installed using pip:

$ pip install aio-databases

You can install the required database drivers with:

$ pip install aio-databases[sqlite]
$ pip install aio-databases[postgresql]
$ pip install aio-databases[mysql]

Usage

    from aio_databases import Database

    db = Database('sqlite:///:memory:')

    await db.execute('select $1', '1')
    await db.executemany('select $1', '1', '2', '3')

    res = await db.fetchall('select (2 * $1) res', 2)
    assert res == [(4,)]

    res = await db.fetchone('select (2 * $1) res', 2)
    assert res == (4,)
    assert isinstance(res, db.backend.record_cls)

    res = await db.fetchval('select 2 * $1', 2)
    assert res == 4

Bug tracker

If you have any suggestions, bug reports or annoyances please report them to the issue tracker at https://github.com/klen/aio-databases/issues

Contributing

Development of the project happens at: https://github.com/klen/aio-databases

License

Licensed under a MIT License

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

aio-databases-0.0.10.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

aio_databases-0.0.10-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file aio-databases-0.0.10.tar.gz.

File metadata

  • Download URL: aio-databases-0.0.10.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for aio-databases-0.0.10.tar.gz
Algorithm Hash digest
SHA256 a6c1d707452b396d9ac7320535d17ac1867c1c9c98c380b3b7a8296b0f50d4d3
MD5 f8c80c0c381ccfa7fa39a466ba9a31e3
BLAKE2b-256 88c510fd3004aa38ba24b85398241019b35fd3747392bd193d673975c2da32e7

See more details on using hashes here.

File details

Details for the file aio_databases-0.0.10-py3-none-any.whl.

File metadata

  • Download URL: aio_databases-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for aio_databases-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 2430a65380e9a42746f8c57a44208b3856b753881b7b8740c4c17f46276383a4
MD5 19b98a01dfd2d10ee7cf791d113a23ea
BLAKE2b-256 f35fc86b83a3ae82fad0794280b044f826a49b689e388388c439e93d34fed634

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