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.1.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.1.2.tar.gz | 3.7 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| querysource-5.1.2-cp313-cp313-musllinux_1_2_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.1.2-cp313-cp313-manylinux_2_28_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.1.2-cp312-cp312-musllinux_1_2_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.1.2-cp312-cp312-manylinux_2_28_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.1.2-cp311-cp311-musllinux_1_2_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.1.2-cp311-cp311-manylinux_2_28_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.1.2-cp310-cp310-musllinux_1_2_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.1.2-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.2.tar.gz
| Download URL | querysource-5.1.2.tar.gz |
|---|---|
| Size | 3.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7a7a630afbafcd89109143f5999d22b03bbef2bb54c953c983ecb36bb1bf217c
|
|
BLAKE2b-256 checksum How to use checksums |
95c86db5a7532cc2b08bb47fdfbfe3cd56c51484e4c8a7a8edc3409d4048551d
|
| 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.2-cp313-cp313-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.1.2-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 |
6a5b89a013db826ad05e71864c0f0ea14f6850bd4e90c0f0bcb468410d0d4c71
|
|
BLAKE2b-256 checksum How to use checksums |
4b91717f118d78e81c7257832dee029c5f287283dac1d6d8cdaafd89acaf1e65
|
| 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.2-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.1.2-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 |
a3904c37686e48f8bfedeeefe9fceacd46e92fcbd1536580638b7fb8d93a4755
|
|
BLAKE2b-256 checksum How to use checksums |
ec3699422c407e85bec87f6845a8a40bcfe76ed42fbdeabebab36465996e6c54
|
| 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.2-cp312-cp312-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.1.2-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 |
62d5326431f4fd77d3584d6d1c6a64991fa07384b5258e5507135684e5402d3c
|
|
BLAKE2b-256 checksum How to use checksums |
63c23781dfb8e3628c8fd333467bf715b978eb575c32a11be1409b016e3e05e2
|
| 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.2-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.1.2-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 |
797b279d1e54d5a7dfaaca74aea663f505e35d8e3e9b3a10bb2ca6c783e53ab1
|
|
BLAKE2b-256 checksum How to use checksums |
09998fa99423a03bde55bfa04114a7d69037e39b62328be56323bb6c240b34bf
|
| 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.2-cp311-cp311-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.1.2-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 |
25de5e7c5c5c84b646e0d01f5275b8f0f585bb39ed4d2d7a42296cf66712681f
|
|
BLAKE2b-256 checksum How to use checksums |
5e75e207cc5934c617db2b76db4501f0a37d7789e358436ce4510ec66298e894
|
| 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.2-cp311-cp311-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.1.2-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 |
e2f0a68e06ff1f425ac475f535f3fd7611546467fad83c035d88d3a7e4b83c47
|
|
BLAKE2b-256 checksum How to use checksums |
ccfb701a01fd203ca1f5e5dc707ef21f35da08f2b5ac6e3fb85e2160fc0465d5
|
| 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.2-cp310-cp310-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.1.2-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 |
69f73022286c14fa4cea4115b649155ab16dea3b019e2669a1a95427d9c97fec
|
|
BLAKE2b-256 checksum How to use checksums |
a32e617cd7a783b1de4bef86e88c044a9792654eb1ac47d8dfe7fbdbc41e9e09
|
| 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.2-cp310-cp310-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.1.2-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 |
f86c8900f72fc602caa88569bca73a911aaf0d3f631dc50e120a93308c28549e
|
|
BLAKE2b-256 checksum How to use checksums |
6b13d142cd48517440aa314b637c550f96a7b7736eea802246fcd979b40bd4ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|