Skip to main content

Want to use twisted’s adbapi in tornado but does not know how? Try toradbapi.

This is just wrapper for twisted.enterprise.adbapi.ConnectionPool to use with tornado. So documentation for __init__ args you can find at twisted docs

Available methods in toradbapi.ConnectionPool:

  • run_query

  • run_operation

  • run_interaction

They all have similar interface as twisted’s corresponding methods. They return instance of Future, so can be yielded inside coroutine.

Example usage:

from tornado import gen
from toradbapi import ConnectionPool

pool = ConnectionPool('MySQLdb', db='test')

@gen.coroutine
def get_entities():
    entities = yield pool.run_query('SELECT * FROM `entity`')
    raise gen.Return(entities)

Demo project is under demo.py file. Also there are more examples in tests.py.

Only Python 2.7 supported for now.

Metadata

Release files for toradbapi 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for toradbapi 0.1.3
File Size Uploaded Provenance Actions
toradbapi-0.1.3.tar.gz 4.7 kB Without provenance Details for toradbapi-0.1.3.tar.gz

Release files / toradbapi-0.1.3.tar.gz

Download URL toradbapi-0.1.3.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
70df5c284a871e9e4bb1bcbc48128f796033dc89e086b1da02d1d848fe5a40ca
BLAKE2b-256 checksum
How to use checksums
c90bd1f45b2c20847483531e86dc5383104586dd268f4ab8e4601c408ed5f749
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for toradbapi 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page