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.2.0.tar.gz (2.8 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.2.0-cp313-cp313-musllinux_1_2_x86_64.whl (13.4 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

querysource-4.2.0-cp313-cp313-manylinux_2_28_x86_64.whl (13.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

querysource-4.2.0-cp312-cp312-musllinux_1_2_x86_64.whl (13.5 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

querysource-4.2.0-cp312-cp312-manylinux_2_28_x86_64.whl (13.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

querysource-4.2.0-cp311-cp311-musllinux_1_2_x86_64.whl (13.3 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

querysource-4.2.0-cp311-cp311-manylinux_2_28_x86_64.whl (13.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

querysource-4.2.0-cp310-cp310-musllinux_1_2_x86_64.whl (12.4 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

querysource-4.2.0-cp310-cp310-manylinux_2_28_x86_64.whl (12.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

File details

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

File metadata

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

File hashes

Hashes for querysource-4.2.0.tar.gz
Algorithm Hash digest
SHA256 586b7e6e628e694dfc05ce6486e8250904ec165cedc42a2e717058fa58dd3424
MD5 f9af9070beb94ef7299ed178d76abf74
BLAKE2b-256 2be7e39aea537571f2a923d714d215959f4ead0858ec61454415c67cd477979e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.2.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c5b8daaff8794db9aab322c9a0f4b9d743f0bf3883bd45c38779ed8061605453
MD5 6c6671674107b20bf6928dd568ce90ed
BLAKE2b-256 ad5f9a24889ed4c8140158f8e7155fd9af5360b519b4c46b7ed6bdc68ad19359

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.2.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 94135d03f736ee5174437dd4c83b85c3a9e81898bec20e54c34dccf482e1f71e
MD5 72b31686b1090d380123f2eb58953f95
BLAKE2b-256 6634549d1a2af86fd5f70f82264be4c311aafb89a395f46a752b7279a26af3a3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.2.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 fea2eb3dc85b62706dea16549b19710f1ca04ad78318107968630668800910a6
MD5 e9e67ac818ddfd9c10a8927d1dda12f9
BLAKE2b-256 76802109e097caaba0bc46835b1ea63e14d18779d514f54cfa66d57aaa04cc83

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.2.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c8105683c5a8e9f6cf233182d5ffe32c06afe21270219362db9b9f977e0289c1
MD5 86cf1e8ad06a2b76c1c4761b20034478
BLAKE2b-256 671159d35a6d7ce6e4d8f5968deb23b1eacaf557db9dcd312fe7ff72f96e9dca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.2.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 928071ffaa0f005da0b35e3a225b41dcbbce882e6bc2a9f84f70824081bea2aa
MD5 b26a4c4a919f1911603cbff132c6c3af
BLAKE2b-256 bf6268add68220d88ae297f8ee8b781625435c5a2e150ac2d2368c1e6c8f411d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.2.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c8bd7fd980269059362e604d81d33b261a3ab8d1b6ac926777b46dbf0bd2fe3f
MD5 03c0945ba88a4b62b8eb9d7d91155cb3
BLAKE2b-256 e93f4c86330f236f9b55adad48bc96c8e9a699766aedb8e88cc43aa64a9e9361

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.2.0-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c0329469f51587e61c185b790ca90d097966e674adfd2a45a24164634bffa6ea
MD5 409c2d77500c7d16c2d63f26fb9dc00a
BLAKE2b-256 aae824fff25438e17778813b669cc4bbf0331ac9626a91204261d38ff3ec4f9a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.2.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 eace63aee0ed789cca752e9ec0ffd7665a4483ed72b560de9bc88cc55d508013
MD5 cd6093168818bfb64dfb7e508b0fabfe
BLAKE2b-256 fe2f743a6742bb4496199c2949f6fcb1a8c0124ea75915eec349dd6b5ba38492

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