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.4
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.4.tar.gz | 4.0 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| querysource-5.1.4-cp313-cp313-musllinux_1_2_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.1.4-cp313-cp313-manylinux_2_28_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.1.4-cp312-cp312-musllinux_1_2_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.1.4-cp312-cp312-manylinux_2_28_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.1.4-cp311-cp311-musllinux_1_2_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.1.4-cp311-cp311-manylinux_2_28_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.1.4-cp310-cp310-musllinux_1_2_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.1.4-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.4.tar.gz
| Download URL | querysource-5.1.4.tar.gz |
|---|---|
| Size | 4.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a0a5e6c80a0b1d0679d0c6def984a69e069f034044252a16b7acaced32af5f7c
|
|
BLAKE2b-256 checksum How to use checksums |
46e13e29e30b92bfdc3e4d44d7c4d8c52977d942b638db1ddf9df24d870c2036
|
| 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.4-cp313-cp313-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.1.4-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 |
b918fc0b9b062d0bba9489a19daa11a5442fb65a6896ba8419560ed226f23ee4
|
|
BLAKE2b-256 checksum How to use checksums |
8265b827ab36211c773d38b1ac787b49438e0e5cff87b15826d63bc83ab6ff0e
|
| 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.4-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.1.4-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 |
b8b16c554fd663bc2f3103a7633841573465c89d5d3a0b7766699dd7e93a902b
|
|
BLAKE2b-256 checksum How to use checksums |
f556528541c9a90c883d1dc8bdf98cbca82e3fd8db1d60c564a18b6d32edba6a
|
| 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.4-cp312-cp312-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.1.4-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 |
07f0a80f5d68992beb6a4fe7aa4ef612649128407a29e230eacf4ca7bfcb374b
|
|
BLAKE2b-256 checksum How to use checksums |
95659ae49e9ab5c022858e0e561b823338c67e6593e763433b504c08c3b03784
|
| 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.4-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.1.4-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 |
2c13c169350cb61f06c47d456e7f1f746510d7038b9f96768201425048b4f7ce
|
|
BLAKE2b-256 checksum How to use checksums |
6b06c30ee5c69654328fc14edfaf05f34f43c2c968bdff51f57416e4c2b05c72
|
| 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.4-cp311-cp311-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.1.4-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 |
e62a108280baed910f8cbc930893d6fceead385cc2b530ee95a4c506f9342074
|
|
BLAKE2b-256 checksum How to use checksums |
0ba8c950a4b0f2501baa4a77c976bb8f6518df36575d129e220167ae3fd85a49
|
| 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.4-cp311-cp311-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.1.4-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 |
aace38421f57a91cf0c9f27b858cd14488db7b04b16ff840ee39693062628505
|
|
BLAKE2b-256 checksum How to use checksums |
59441565497727b714a72efffa479fb1b4c7cf68b82c41e1e3f24002a3b57181
|
| 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.4-cp310-cp310-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.1.4-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 |
55e474bbad826b070647a58a71267d65d110ad1742eded069ac03b00d45fa449
|
|
BLAKE2b-256 checksum How to use checksums |
db24fd1b9087dbf75621090dabd73cf55718c895bc3d63877d50406583b6fc75
|
| 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.4-cp310-cp310-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.1.4-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 |
ac170d9c82913b407b838b335dea41196c68aad65fa89039cfd72f1388c6d399
|
|
BLAKE2b-256 checksum How to use checksums |
4d80344cb0d674483409126f7853ccc86428ef2f7f903e868351251c330aebdd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|