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.2
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.2.tar.gz | 3.5 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| querysource-5.2.2-cp314-cp314-musllinux_1_2_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.2.2-cp314-cp314-manylinux_2_28_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.2.2-cp313-cp313-musllinux_1_2_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.2.2-cp313-cp313-manylinux_2_28_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.2.2-cp312-cp312-musllinux_1_2_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.2.2-cp312-cp312-manylinux_2_28_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.2.2-cp311-cp311-musllinux_1_2_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.2.2-cp311-cp311-manylinux_2_28_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.28+ x86-64 | Details |
Total release size: 35.9 MB
Release files / querysource-5.2.2.tar.gz
| Download URL | querysource-5.2.2.tar.gz |
|---|---|
| Size | 3.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c888fd9ce6bf89bd5fbc12c6ac64d5191ffb2149cc126bd1bb7c13c8744e7db0
|
|
BLAKE2b-256 checksum How to use checksums |
20a9c65f16186843c760e403c1e3de791cc5bf80ea8bc4561d4591831540c0dd
|
| 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.2-cp314-cp314-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.2.2-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 |
f778a4727897788822486ab8d4122a6e4d99d08b4b0a24c9e6669274ae73f242
|
|
BLAKE2b-256 checksum How to use checksums |
3177d92437f6970e2511d923bac23620a5a71f787ee6dfb354fb0f7f5c1c144d
|
| 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.2-cp314-cp314-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.2.2-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 |
c0bcdc6c894b20a8bca74315370a1ebb0abd34a778848f7bdf3677abe18fb559
|
|
BLAKE2b-256 checksum How to use checksums |
883de9b0ae981f6b1f8d31d523bb943ab60e2342d38a0e48622bf361abdef3b8
|
| 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.2-cp313-cp313-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.2.2-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 |
ffc9ccb73018384323f3aa16c4a7434c732b24c02ee2631e56dc2e792ed8364c
|
|
BLAKE2b-256 checksum How to use checksums |
0a90af2e0775e4bbb46e62154bd103dd466d21aa1d91e94f3138a3a9d8859751
|
| 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.2-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.2.2-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 |
721d3a3b2ac53198c335bb6737acc8867977484276daa0d1e4e79a306bef9ecd
|
|
BLAKE2b-256 checksum How to use checksums |
42535b39fe0a51bc599b3c15e6273858a09bd7ed95f9fd06fb4222f7f79436df
|
| 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.2-cp312-cp312-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.2.2-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 |
520b22ac01b08f3b76b4acaed54bcb5d719b00d07891790236fe8957b9b82649
|
|
BLAKE2b-256 checksum How to use checksums |
6fd7505cbaa5a63866a99202667dcb632a2a819d297edf252381a18de94215f0
|
| 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.2-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.2.2-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 |
08cede5db21aa20ede13174d35ae608dbca64b89c57ea0fa52fa72d8796394fc
|
|
BLAKE2b-256 checksum How to use checksums |
62b3a0d341670a0f1cf57f1b712dd523894c0155fac0e1104e73d1e06eee2c35
|
| 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.2-cp311-cp311-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.2.2-cp311-cp311-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | CPython 3.11 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
0335efa39f22e5092fd05083b3828a9cd6b202e3884546705cfc8e56afa34207
|
|
BLAKE2b-256 checksum How to use checksums |
6bab85d85c685bed1f1cb0704b1f294bef6ff38c18e483c8bc167388b4de055e
|
| 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.2-cp311-cp311-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.2.2-cp311-cp311-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 4.0 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
8b85b3695845ecebb0fd7b645ed517d4b7b3da7a92b8e640772930cc52e21a58
|
|
BLAKE2b-256 checksum How to use checksums |
e174e76b6c0230ed3d610eebaa6a99b527aa0ea72b42c078cf752ca596d01fcb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|