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.3
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.3.tar.gz | 3.5 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| querysource-5.2.3-cp314-cp314-musllinux_1_2_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.2.3-cp314-cp314-manylinux_2_28_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.2.3-cp313-cp313-musllinux_1_2_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.2.3-cp313-cp313-manylinux_2_28_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.2.3-cp312-cp312-musllinux_1_2_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.2.3-cp312-cp312-manylinux_2_28_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.2.3-cp311-cp311-musllinux_1_2_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.2.3-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.1 MB
Release files / querysource-5.2.3.tar.gz
| Download URL | querysource-5.2.3.tar.gz |
|---|---|
| Size | 3.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6ce0ef7007fa15418a522fe28bae17b4844c116e08b3497847b1db3d20859dcf
|
|
BLAKE2b-256 checksum How to use checksums |
aeaa63d516ba691aea58521a1cfad0c6d215f4042cca3ddfdbff60f7aa5d7fec
|
| 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.3-cp314-cp314-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.2.3-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 |
831f62c0290be4a4bc65002251eb9fc7c5c128015fa827c8315b0a732823d27b
|
|
BLAKE2b-256 checksum How to use checksums |
e5cdd68118e01f1982b90809616e1c0a423d03821fa534a34a16dd3c2a71002e
|
| 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.3-cp314-cp314-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.2.3-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 |
4d0ee677c651bec58da65c17bfcfc66de430ec68b7e34f04349f22b9a2b110d2
|
|
BLAKE2b-256 checksum How to use checksums |
8ecf426292c2f6d8efc98c309ceb4bb15567933952decab368694cf2f7dfbe16
|
| 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.3-cp313-cp313-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.2.3-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 |
2f97f129c1818927cbb4b51b3b38a83c19650c6afe46b71f74d890eeaeaefb81
|
|
BLAKE2b-256 checksum How to use checksums |
68be40f8af50b93830eeacf185faa5869bc1952af18d361aea29e83dfe4f91b2
|
| 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.3-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.2.3-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 |
9d229b20bfe696d0e01c8deb370928bd7f8ced73aa9bcd3587a1e10b9313f4aa
|
|
BLAKE2b-256 checksum How to use checksums |
ca93510b9e0cf1877db684977456024dea7b9c4498e926236c24f8dfe3f65d69
|
| 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.3-cp312-cp312-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.2.3-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 |
81d83119e21b4041d29a6c1e291c21f2d0d289f319eeb74e3dd5d79dd7758a39
|
|
BLAKE2b-256 checksum How to use checksums |
91b1d299de97d6821c37fe9a41f9dd67cf23f59a73eb3017ae5379450cb9d4fc
|
| 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.3-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.2.3-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 |
0989d40e5a13d1467eaafd2729eb3c6f0922b160b9f16010b01c18ee88465658
|
|
BLAKE2b-256 checksum How to use checksums |
adbf980d6502732f9042fd7d6c698d9c694ed2e51115ae4130a097681ff091cb
|
| 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.3-cp311-cp311-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.2.3-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 |
d0e964ea069812c85cbd249f9a87ac36fe1a0d0af8fa4fd9f317d91b36c770a7
|
|
BLAKE2b-256 checksum How to use checksums |
569d962af4219b69b26284c6976f7d2d8d09a22d0785fa2ffaf32276c4a24f41
|
| 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.3-cp311-cp311-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.2.3-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 |
89de7e1556fda4a0aae5d5febd4ed0436346ff206d53a1a4101bf23a8cdb731c
|
|
BLAKE2b-256 checksum How to use checksums |
0bba5a2c31cc63daaddbb433d7b256d0b71d12fb833b8d5242be8b400692ab36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|