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.5
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.5.tar.gz | 4.6 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| querysource-5.1.5-cp313-cp313-musllinux_1_2_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.1.5-cp313-cp313-manylinux_2_28_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.1.5-cp312-cp312-musllinux_1_2_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.1.5-cp312-cp312-manylinux_2_28_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.1.5-cp311-cp311-musllinux_1_2_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.1.5-cp311-cp311-manylinux_2_28_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.1.5-cp310-cp310-musllinux_1_2_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.1.5-cp310-cp310-manylinux_2_28_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux glibc 2.28+ x86-64 | Details |
Total release size: 36.7 MB
Release files / querysource-5.1.5.tar.gz
| Download URL | querysource-5.1.5.tar.gz |
|---|---|
| Size | 4.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ae61e2f97d37c7c0e4dd3d84aa6c38ee26d62da767811a39256d29363f25cd7b
|
|
BLAKE2b-256 checksum How to use checksums |
cc58323a6c25832dc5e63a486c59cb8660e5690e2e45d9ccbc4261c19fdb0c13
|
| 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.5-cp313-cp313-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.1.5-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 |
a2256f647fd4361ead2f09ec97a54739445ecb895436b8fa5f343a66c38b185c
|
|
BLAKE2b-256 checksum How to use checksums |
9190c08f6dc8b740f6a4b75dbe96c29628893079f10c8fc410803506ba5d19c2
|
| 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.5-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.1.5-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 |
824b2634d2807027716c2b076ae3afa2208c62ab2548f0cb0c124b21c1aab828
|
|
BLAKE2b-256 checksum How to use checksums |
df5e8f1227c263bd298d10ea22515808c66178396ff79cf5f70e794324307020
|
| 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.5-cp312-cp312-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.1.5-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 |
94c50306bb7510030d16d48618e3f6248880dbad10f8ae45c50ef1d4adbdb49d
|
|
BLAKE2b-256 checksum How to use checksums |
8b71e0316435715e0a61a60d41b1f83971a547da1dee2791e487818829bdddea
|
| 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.5-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.1.5-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 |
a8c736f3fd7e16e96a78ced2346db2f1295ce5c07a7ecc54eb5ce7e537e34eae
|
|
BLAKE2b-256 checksum How to use checksums |
3253c19a3208cdb79b3f7c410e68f0510fd66d39c96236cb4bb83a754e404980
|
| 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.5-cp311-cp311-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.1.5-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 |
c7ba36a813995ee4d7b97372252e189c52bf57db5e936466dd2246cb469c6e51
|
|
BLAKE2b-256 checksum How to use checksums |
d361ed1717ff5fb94642661a950058dc0d6a85e0bc17592bce6a545897e1f3af
|
| 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.5-cp311-cp311-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.1.5-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 |
5622787c4bfbd762a17bcfeab86ed08c9f3fa1d0287903798a082cb56fa2f93a
|
|
BLAKE2b-256 checksum How to use checksums |
d30ccb013e118a5807c9475c22678ceff33ae2cd3c832f1f50bf7ff18ff5ec2a
|
| 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.5-cp310-cp310-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.1.5-cp310-cp310-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
02932ce980123dca7a33343ffbcd07d94df7b0cf16a4830849a5cd2e3e561660
|
|
BLAKE2b-256 checksum How to use checksums |
897a5355fa959d3951bb3210fe422dd65d66aa50d66603ecd42279abe8a7d932
|
| 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.5-cp310-cp310-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.1.5-cp310-cp310-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 4.0 MB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
4ed02544743347e252a589097f2f75683265cd7fe4984c069082a5f7820c19c0
|
|
BLAKE2b-256 checksum How to use checksums |
becf6150ff3a7b220adf038892702e5d6c2019f1b563a1e99769b930a95f2800
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|