Skip to main content

Aiohttp web service for querying several databases easily

Project description

QuerySource

QuerySource is a powerful Python library designed to streamline access to multiple databases and external APIs through a single, unified interface. Utilizing the proxy design pattern, QuerySource allows developers to seamlessly integrate various data sources into their projects without worrying about the complexities of managing multiple connections.

Features

  • Unified interface for querying multiple databases (Redis, PostgreSQL, MySQL, Oracle, SQL Server, InfluxDB, CouchDB, Druid)
  • Support for external APIs (Salesforce, ShopperTrack, ZipCodeAPI, etc.)
  • Easy-to-use API for executing queries
  • Extensible design, allowing for easy addition of new data sources

Installation

$ pip install querysource
---> 100%
Successfully installed querysource

Requirements

Basic Usage

QuerySource can be used in several ways, one is using QS object itself:

from querysource.queries.qs import QS

query = QS(
    query='SELECT * FROM tests',
    output_format='pandas'
)
result, error = await query.query()

Extending QuerySource

To add support for a new data source, create a new class inheriting from the BaseProvider or BaseAPI class and implement the required methods (prepare_connection, query, close). Then, register the new data source in the QuerySource class by adding it to the appropriate dictionary (_supported_databases or _supported_apis).

Contributing

We welcome contributions to QuerySource! If you'd like to contribute, please follow these steps:

  • Fork the repository
  • Create a new branch for your feature or bugfix
  • Implement your changes
  • Add tests covering your changes
  • Create a pull request against the original repository

Contribution guidelines

  • Writing tests
  • Code review
  • Other guidelines

License

QuerySource is released under the BSD License. See the LICENSE file for more details.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

querysource-4.3.0.tar.gz (3.0 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

querysource-4.3.0-cp313-cp313-musllinux_1_2_x86_64.whl (13.5 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

querysource-4.3.0-cp313-cp313-manylinux_2_28_x86_64.whl (13.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

querysource-4.3.0-cp312-cp312-musllinux_1_2_x86_64.whl (13.6 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

querysource-4.3.0-cp312-cp312-manylinux_2_28_x86_64.whl (13.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

querysource-4.3.0-cp311-cp311-musllinux_1_2_x86_64.whl (13.4 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

querysource-4.3.0-cp311-cp311-manylinux_2_28_x86_64.whl (13.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

querysource-4.3.0-cp310-cp310-musllinux_1_2_x86_64.whl (12.5 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

querysource-4.3.0-cp310-cp310-manylinux_2_28_x86_64.whl (12.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

File details

Details for the file querysource-4.3.0.tar.gz.

File metadata

  • Download URL: querysource-4.3.0.tar.gz
  • Upload date:
  • Size: 3.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for querysource-4.3.0.tar.gz
Algorithm Hash digest
SHA256 93de16092a5fe20d43be65ad7fba06109788f96eb72d4795925c21d3bb05a7f3
MD5 b43b7153d23d7089c4b8b73f4b9f279a
BLAKE2b-256 191825ac08e6f334fc5b3dc6eadc5d6cade08ce729980d89418089e1b0c09f5c

See more details on using hashes here.

File details

Details for the file querysource-4.3.0-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for querysource-4.3.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 0ae512a34cfd565af3d4eed77153cfea1cdfcbbc64c72913754cab7c21a914ba
MD5 e4d2c5f5d9b65a7d579b17f7329ac2b5
BLAKE2b-256 60ed73c7aeb5be3f3381c17e71eccaee274a39a0c7a67fd2a31f65f56a5f0d08

See more details on using hashes here.

File details

Details for the file querysource-4.3.0-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for querysource-4.3.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1718517ad1da0ab4a8cb85c5fa0f927a190b4401e4b7ab85579f5cb73b5ea86c
MD5 6b0686a8dd7bcf66840c1ba2b3124388
BLAKE2b-256 e1bb773821f266ca73a31ed9b1a4d91b712ac995b6501d5383d7bc02a446d657

See more details on using hashes here.

File details

Details for the file querysource-4.3.0-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for querysource-4.3.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 fd8265845fd933e5657dac8c8f5118fb5c3c5534ed6474a8ffdb802ac34be621
MD5 faf4d77b461622e05f6e88aa590f91ef
BLAKE2b-256 36b16cc0c28fbb1a5d12d0b2e22b931e738a3347350e9ae7d04a6165b7df76c0

See more details on using hashes here.

File details

Details for the file querysource-4.3.0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for querysource-4.3.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 574bd0d7dd2a686c4dc49a3cbeb471937481fb622778a8065ce6e3204f4b530c
MD5 86e6636e32dc0e2895883c015d31ceb6
BLAKE2b-256 b4f8cc522138fefb48ec7a597e8615dfb945a6e78bb423ca6a12d1cf49c7409a

See more details on using hashes here.

File details

Details for the file querysource-4.3.0-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for querysource-4.3.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 7d33cfa9adb8c273ae4d9b696b663b20f3d650fb8fb2615e4a02389b22814f5b
MD5 1fe205fadf949a976677e09aaa153ca9
BLAKE2b-256 c3fd9f6e627d0f54d5bd45bef1bb50ef5f73039c13f046d01631c2a0396c085a

See more details on using hashes here.

File details

Details for the file querysource-4.3.0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for querysource-4.3.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d3976d4665eb0225cd715a386fa32779f209379cf4b60ebd085da480d35b29ff
MD5 b747e889762f21c4f65ee5629a34bd72
BLAKE2b-256 c78b2e79eeada06b48023fa5eb7c4e7b31f6074ff32ccacb556a539a5d49104f

See more details on using hashes here.

File details

Details for the file querysource-4.3.0-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for querysource-4.3.0-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 9c1e85d79f8796252280fdfe97259b58833c49fe5b1c2b9b0a6d4443a74d4569
MD5 bfb15720bd56ab07cfd194e712551e76
BLAKE2b-256 e544eb40a95397b1cbde819606b20edabc0ae532079e83da4c82b943e8ecf7ca

See more details on using hashes here.

File details

Details for the file querysource-4.3.0-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for querysource-4.3.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e32c0c4193d2d265e1175bef6afeb6261d9174c0d6fd35baaf74606f833a3fd1
MD5 eac6bb2fb1e50b9b71e30c7c3e4c5931
BLAKE2b-256 6c318bf520c2adcbfd3a50961e1babcaabb7a10bc3bbd043275136af353f58bd

See more details on using hashes here.

Supported by

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