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.0
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.0.tar.gz | 4.5 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| querysource-5.2.0-cp313-cp313-musllinux_1_2_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.2.0-cp313-cp313-manylinux_2_28_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.2.0-cp312-cp312-musllinux_1_2_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.2.0-cp312-cp312-manylinux_2_28_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.2.0-cp311-cp311-musllinux_1_2_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.2.0-cp311-cp311-manylinux_2_28_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.28+ x86-64 | Details |
Total release size: 28.5 MB
Release files / querysource-5.2.0.tar.gz
| Download URL | querysource-5.2.0.tar.gz |
|---|---|
| Size | 4.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
156b3203f01db9dde5aedf17a472846a0d79caee30892425bca0ceda6ca34d66
|
|
BLAKE2b-256 checksum How to use checksums |
980f5c631c39224482a09a9030be43e4e959efe0eea3230fffc4a699ccab3280
|
| 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.0-cp313-cp313-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.2.0-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 |
a861dcd19ef650abd3495871f4df1dc3d37698bad937c5faaedffbde4a8f7ce7
|
|
BLAKE2b-256 checksum How to use checksums |
74de97c90ffb8c0fce59ff358c1a013a5b8e6d34cbe2be1f26079aa497b38a20
|
| 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.0-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.2.0-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 |
283bcafb46022467b152d12d4a1dd5ff61c51a1d6d88c8babdeea7b8456c1960
|
|
BLAKE2b-256 checksum How to use checksums |
e620f5c7d3e20744dc3e2606d62785e01d66510c8963d060d9e4430c23ce0215
|
| 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.0-cp312-cp312-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.2.0-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 |
f1dfa6dd5b99e50880b3d0a8987a33fd46b2aebb8d6f4543f067c7110930a89b
|
|
BLAKE2b-256 checksum How to use checksums |
2a05bf9783e3bab05533fa01b0e43f45ac6d07a30ce84d074a4dff488023b855
|
| 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.0-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.2.0-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 |
181d1ac41ffa9341f0f6b29b731f2d6588da1dd48eca1abdfaea5c084a71802c
|
|
BLAKE2b-256 checksum How to use checksums |
06e3f96b9b219dba4c8cf0809b53bfb6d2a66a75d233efc030b9fa30138a8922
|
| 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.0-cp311-cp311-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.2.0-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 |
839ab5cf4b1ac989bd9d91b013ce5f52881ffbdf29d652a693dff7626059bd88
|
|
BLAKE2b-256 checksum How to use checksums |
bebfec7fc5c002384fdca174672b78cfddac94bd4f8a938d9552365a47d12ac3
|
| 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.0-cp311-cp311-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.2.0-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 |
8437fc50be6df409a1243f5288d3d299d851afbb39bad20de7d39474233fbf57
|
|
BLAKE2b-256 checksum How to use checksums |
f837cf9f82865746c3f04b69cf47f2aa03fe127930ed7f9a0591088c5534d498
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|