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.
Release files for querysource 5.1.0
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.1.0.tar.gz | 3.6 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| querysource-5.1.0-cp313-cp313-musllinux_1_2_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.1.0-cp313-cp313-manylinux_2_28_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.1.0-cp312-cp312-musllinux_1_2_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.1.0-cp312-cp312-manylinux_2_28_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.1.0-cp311-cp311-musllinux_1_2_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.1.0-cp311-cp311-manylinux_2_28_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.1.0-cp310-cp310-musllinux_1_2_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.1.0-cp310-cp310-manylinux_2_28_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux glibc 2.28+ x86-64 | Details |
Total release size: 94.3 MB
Release files / querysource-5.1.0.tar.gz
| Download URL | querysource-5.1.0.tar.gz |
|---|---|
| Size | 3.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
124aecb4fe04fc23b0c05c8c45d532cc9096c53fc2545350a505fb576271c614
|
|
BLAKE2b-256 checksum How to use checksums |
41b2d84bb96e9f27ca120d051e44fa563143fd46c080334a698ce7dbaba7aa50
|
| 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.1.0-cp313-cp313-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.1.0-cp313-cp313-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 11.6 MB |
| Tags | CPython 3.13 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
920b02a0e42a3d8fe0060364d4805802d8f90a81ad1e33db6b293767b339622e
|
|
BLAKE2b-256 checksum How to use checksums |
948c29cd83f42463854af43df7eda01e72a859214a8f0beb1735c7f3b1a0e3b0
|
| 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.1.0-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.1.0-cp313-cp313-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 11.6 MB |
| Tags | CPython 3.13 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
ae052619b3a17ad27d128084e3d2c099cd9c2e4c8a1482328dfa80502e4b118d
|
|
BLAKE2b-256 checksum How to use checksums |
02366ca59bf846531da5f03e6421e841c653a383dd712e9962030cd3dcd2cb2b
|
| 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.1.0-cp312-cp312-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.1.0-cp312-cp312-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 11.6 MB |
| Tags | CPython 3.12 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
ac06f24ad137b3705217c7c0c0b64eda493f5ef41f6e2714eef59d40e3e53ce1
|
|
BLAKE2b-256 checksum How to use checksums |
286a9b0b43923847713c3c270eeb10fb023f696eab4bb61bcd64ce30ab0e7e36
|
| 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.1.0-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.1.0-cp312-cp312-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 11.7 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
6d4423f5b06bf8a3e3c136c0c47e9c8d2ba0ffdb1a71cbb3305eae3af684c85c
|
|
BLAKE2b-256 checksum How to use checksums |
0506f96b1687b272712cc5740f22345bc0d0d67773382d7694eda15c4e993858
|
| 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.1.0-cp311-cp311-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.1.0-cp311-cp311-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 11.5 MB |
| Tags | CPython 3.11 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
7c18fb3868aa27f271dc5d9cf63dd63427ea3fc9d39054a928493d94993b8564
|
|
BLAKE2b-256 checksum How to use checksums |
263eb658c96f64999b14f966acd83d9d3a475f7bd2d6448763797d7db299d5a6
|
| 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.1.0-cp311-cp311-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.1.0-cp311-cp311-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 11.4 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
607b85d4d4590e4df01baacea36b15b7780f35ec128f170677e28e2396da649f
|
|
BLAKE2b-256 checksum How to use checksums |
e2622d3b1741e9c201ab682b5f3beca629e5bd50b89ee434f6b2d2223214f749
|
| 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.1.0-cp310-cp310-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.1.0-cp310-cp310-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 10.6 MB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
7eede6097a2bfd2161aec1895ee96b8a768066a277b0298d1238bed6d2775daa
|
|
BLAKE2b-256 checksum How to use checksums |
b660a9ea705c034a44d702e0ef4b1f231fde959f2098656a961305843a6bea29
|
| 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.1.0-cp310-cp310-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.1.0-cp310-cp310-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 10.6 MB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
a8d4b9a59137b642c2c4865e5d58e43bd4b621cfa497b29f8f46fe7b971c43ca
|
|
BLAKE2b-256 checksum How to use checksums |
39c41e28d14d58494e25b9e586aaa7ff040f4ef6b65a822fd5b1c1d549616718
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|