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
- Python >= 3.9
- asyncio (https://pypi.python.org/pypi/asyncio/)
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.
Metadata
Release files for querysource 5.2.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| querysource-5.2.5.tar.gz | 3.6 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| querysource-5.2.5-cp314-cp314-musllinux_1_2_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.2.5-cp314-cp314-manylinux_2_28_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.2.5-cp313-cp313-musllinux_1_2_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.2.5-cp313-cp313-manylinux_2_28_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.2.5-cp312-cp312-musllinux_1_2_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.2.5-cp312-cp312-manylinux_2_28_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.2.5-cp311-cp311-musllinux_1_2_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.2.5-cp311-cp311-manylinux_2_28_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.28+ x86-64 | Details |
Total release size: 36.3 MB
Release files / querysource-5.2.5.tar.gz
| Download URL | querysource-5.2.5.tar.gz |
|---|---|
| Size | 3.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
06318032da1d2e9d3fbdb4f762f7f4c40299027dabf63e5354047dc005b225d4
|
|
BLAKE2b-256 checksum How to use checksums |
923f503141f03bcfa22d97506e40b182fd665ea99cff7a2b5c73cdc211dabef4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / querysource-5.2.5-cp314-cp314-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.2.5-cp314-cp314-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | CPython 3.14 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
b146ba78f092336879463e27ad26e2e130e5b6cb771777bf2a827bd6da888ceb
|
|
BLAKE2b-256 checksum How to use checksums |
9253c4c6e3623641681ee3f4effba772e6bd40225115910f9871015674c86c7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / querysource-5.2.5-cp314-cp314-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.2.5-cp314-cp314-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 4.0 MB |
| Tags | CPython 3.14 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
24a6a1c99a8e61012cad0b237245003ed8099394e3d29ebe8b908293b16842d4
|
|
BLAKE2b-256 checksum How to use checksums |
0ea867d6f98478b215221c2d4710813ff15c5ad62544689d363fcb1b84047551
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / querysource-5.2.5-cp313-cp313-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.2.5-cp313-cp313-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | CPython 3.13 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
8ee24ae4861bf1a902ab667fa4ef02da241acfa843b2f722f7a17f0159ad8093
|
|
BLAKE2b-256 checksum How to use checksums |
d7edb3382d26452c6c5e02fb7a7a60c548f405fa7dc848841b57ee450fabcd15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / querysource-5.2.5-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.2.5-cp313-cp313-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 4.0 MB |
| Tags | CPython 3.13 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
b77728900ddb7a5bc5cbc642e67ff2ec963f865420148f5e22130a1a9bb8334d
|
|
BLAKE2b-256 checksum How to use checksums |
950c862832a839c4c8f0f6196debfa4987883de51ba0bddb549a0370c9805db9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / querysource-5.2.5-cp312-cp312-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.2.5-cp312-cp312-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | CPython 3.12 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
0af2c95e039845ffd94c19daba4e44518ad7d44e0d7b830624aea84b4a09d9d2
|
|
BLAKE2b-256 checksum How to use checksums |
9ff604d92fa889d3cf57dfffbc2e6caf83f9780a7e148379deab9379c063802f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / querysource-5.2.5-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.2.5-cp312-cp312-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 4.0 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
394079b4122cc25c214e3503afec0b9eb57217b6cc21c3c2e34d98abc1045dcd
|
|
BLAKE2b-256 checksum How to use checksums |
5a942afec179890387987f8ff6a095ca06e4c855abb812eb3b234ad8153ee819
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / querysource-5.2.5-cp311-cp311-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.2.5-cp311-cp311-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 4.2 MB |
| Tags | CPython 3.11 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
2fa41c610dd715914215626d292772ebe504102628defdb1777ba4ce662abff3
|
|
BLAKE2b-256 checksum How to use checksums |
571372dacf6025002dff48951b6eef34e2ef70605b6fd2068e1d7157f361c177
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / querysource-5.2.5-cp311-cp311-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.2.5-cp311-cp311-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
05a2b72e400973bf7f2e06c3a8a1a3174cf1b294fe4fee85eea0ca9482f3f7fb
|
|
BLAKE2b-256 checksum How to use checksums |
3db803369dee6a69eeaae7ba1ce5e00ed3b54f3ac2aa26651bae2ff7d5bb26ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|