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.1
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.1.tar.gz | 3.7 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| querysource-5.1.1-cp313-cp313-musllinux_1_2_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.1.1-cp313-cp313-manylinux_2_28_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.1.1-cp312-cp312-musllinux_1_2_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.1.1-cp312-cp312-manylinux_2_28_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.1.1-cp311-cp311-musllinux_1_2_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.1.1-cp311-cp311-manylinux_2_28_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.1.1-cp310-cp310-musllinux_1_2_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.1.1-cp310-cp310-manylinux_2_28_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux glibc 2.28+ x86-64 | Details |
Total release size: 97.5 MB
Release files / querysource-5.1.1.tar.gz
| Download URL | querysource-5.1.1.tar.gz |
|---|---|
| Size | 3.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
686b5292fb9596a9bcf0d72cd007068ec92aaffa6b20ae37b16fef38f723b389
|
|
BLAKE2b-256 checksum How to use checksums |
7383f361c15323d4fce1a6199c88aca4af11092cf610c4adcaba53e3a0a4506a
|
| 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.1-cp313-cp313-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.1.1-cp313-cp313-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 12.0 MB |
| Tags | CPython 3.13 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
9d4e0474b96ad2849d530bb68bbff7e63a37aa5fd76ae3f57ab2ad4fab57d801
|
|
BLAKE2b-256 checksum How to use checksums |
f55f4e04d42d7bdbc6078bf5b96d1525352863df604018d666eb1b727dc5e507
|
| 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.1-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.1.1-cp313-cp313-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 12.0 MB |
| Tags | CPython 3.13 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
77249cb2d97344e8c406bfdd3f771db518f966eb384ce87d8f59b18395238c76
|
|
BLAKE2b-256 checksum How to use checksums |
079e8f6c19a759529105b852766e91f5f428538997e3ca9f12af329f3810b3c6
|
| 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.1-cp312-cp312-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.1.1-cp312-cp312-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 12.0 MB |
| Tags | CPython 3.12 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
016c9dddf88e1db27d15362b268beee86352ff077663d8d3098448636fcb87a3
|
|
BLAKE2b-256 checksum How to use checksums |
31e5ef40248661dea63b8a018ec84946b60c6a02c2006a5d0c3ba5659ec0418b
|
| 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.1-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.1.1-cp312-cp312-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 12.1 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
079d44a4b66944a5aef3702091c701ffe4dae8d6d82984fda84081a292e3832a
|
|
BLAKE2b-256 checksum How to use checksums |
3161d62bccdf56d1a9bcb39990e7c58fd7101dbf12f652882d76bd6b19533cfd
|
| 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.1-cp311-cp311-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.1.1-cp311-cp311-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 11.9 MB |
| Tags | CPython 3.11 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
9f3f95169f885789ce63a9aa00d569b4dc020ce3f2722ad8f6724e65e5e82f27
|
|
BLAKE2b-256 checksum How to use checksums |
27e46bc774c93a0e484b22436b34166d8dcba13c99d8f43b28f43101fedd1a2c
|
| 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.1-cp311-cp311-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.1.1-cp311-cp311-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 11.8 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
70da3eee1bdbd9e622675f289a929c2a7b333bdff70c0f8d63397121f772b58a
|
|
BLAKE2b-256 checksum How to use checksums |
3cf4bc4ada01a07b98c2239e2e3639f33666f3ec9b79b4806abe489a0828111b
|
| 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.1-cp310-cp310-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.1.1-cp310-cp310-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 11.0 MB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
e39f5f3ed343b2c80569e0cb7f52662dc4494778abba5a1ab0f516ee3027df42
|
|
BLAKE2b-256 checksum How to use checksums |
a799773e533569b1b7cdf8f5f1a6657c487e9d849cabf0edd9685bfc1ade1282
|
| 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.1-cp310-cp310-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.1.1-cp310-cp310-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 11.0 MB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
b53fc7787667f81e0f27c45b1a7c1c5ec205e2c8f6334ea9750b48c70eeb53d8
|
|
BLAKE2b-256 checksum How to use checksums |
26cebf473868716ae66f50c16ea250ec40c3e4d99caee221ef4d95ec22b57a88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|