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.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.1.3.tar.gz | 4.0 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| querysource-5.1.3-cp313-cp313-musllinux_1_2_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.1.3-cp313-cp313-manylinux_2_28_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.1.3-cp312-cp312-musllinux_1_2_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.1.3-cp312-cp312-manylinux_2_28_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.1.3-cp311-cp311-musllinux_1_2_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.1.3-cp311-cp311-manylinux_2_28_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.1.3-cp310-cp310-musllinux_1_2_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.1.3-cp310-cp310-manylinux_2_28_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux glibc 2.28+ x86-64 | Details |
Total release size: 35.6 MB
Release files / querysource-5.1.3.tar.gz
| Download URL | querysource-5.1.3.tar.gz |
|---|---|
| Size | 4.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
da171a31267a48a7a988ff05f8a31dfec7d0bc48ea78b825b9ab69f6584996b2
|
|
BLAKE2b-256 checksum How to use checksums |
70b1dc316778d9c30dfb124b01126e738a9ab90c85a8ce9de647afb4e4933544
|
| 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.3-cp313-cp313-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.1.3-cp313-cp313-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 4.0 MB |
| Tags | CPython 3.13 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
6709338039f0fff3aba0e4db79abd2f227accde83694e14cdbf2bf8409c2d5e4
|
|
BLAKE2b-256 checksum How to use checksums |
e9cd7b5dd1d9c5ace7bb82384ca08f30284ab818a3188ac310b89c1d5a831b7d
|
| 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.3-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.1.3-cp313-cp313-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.9 MB |
| Tags | CPython 3.13 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
3be9d71aef67bbf5f135d20032dab8848104ac93392ca5f9e55a65e1967c20ba
|
|
BLAKE2b-256 checksum How to use checksums |
ce793b49acc01f65cb821da43d0e862ebb38e2667efc5441bde59a9fa3e0531e
|
| 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.3-cp312-cp312-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.1.3-cp312-cp312-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 4.0 MB |
| Tags | CPython 3.12 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
10ac3a5e21ae4197d3c1eacdfe4f3c7563f5ff55e5f903b988929cf31130bfd1
|
|
BLAKE2b-256 checksum How to use checksums |
3f6be2d7bd2cf3e93f470bf691a6d9b5a4cc1c961f03c6017d6a9d2373d6bd3c
|
| 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.3-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.1.3-cp312-cp312-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.9 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
00815762ae70a1b87ac0e1174d366a5fb65aff17e0c23ba98dc705fc06ec6022
|
|
BLAKE2b-256 checksum How to use checksums |
3916e2c5f77cf22bd76fed7caa28a710042cb35266381708f352929573367ea5
|
| 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.3-cp311-cp311-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.1.3-cp311-cp311-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 4.0 MB |
| Tags | CPython 3.11 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
73ed06a7fa6d616380f16b8dfd318ab33cf7d39b2476a8cdf73c20c9ca97d865
|
|
BLAKE2b-256 checksum How to use checksums |
2496f976e038777fe8d6abb9bf2c2c0cc27ea25b0db9d77974489b2f974e5ac2
|
| 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.3-cp311-cp311-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.1.3-cp311-cp311-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.9 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
0711f41ca28d61249af1b55d148492378d629cb29069558837ae07fd268b2c7b
|
|
BLAKE2b-256 checksum How to use checksums |
2f3f54d8386c40865d12332f6a418f21c5a9e0ecaa25ce0232d0bc1849f72bae
|
| 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.3-cp310-cp310-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.1.3-cp310-cp310-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 4.0 MB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
a4c73c93e0128ee2faa45077cdd40b8903715a33f434bfc330975200d43525be
|
|
BLAKE2b-256 checksum How to use checksums |
4967bf4b0e18ded5298d7a77c345beee6661347ea08138b0eb90c6f967993c90
|
| 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.3-cp310-cp310-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.1.3-cp310-cp310-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.9 MB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
1c0bef2f23a6ff9c990a1d59acc1c5c77044214c88b3b6ca683e5ae78a793436
|
|
BLAKE2b-256 checksum How to use checksums |
8c4a739c028f2e64365e069c3f6cff6f94cf8e1a58128ff01135e3d37650a995
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|