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.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.2.4.tar.gz | 3.6 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| querysource-5.2.4-cp314-cp314-musllinux_1_2_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.2.4-cp314-cp314-manylinux_2_28_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.2.4-cp313-cp313-musllinux_1_2_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.2.4-cp313-cp313-manylinux_2_28_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.2.4-cp312-cp312-musllinux_1_2_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.2.4-cp312-cp312-manylinux_2_28_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.28+ x86-64 | Details |
| querysource-5.2.4-cp311-cp311-musllinux_1_2_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux musl 1.2+ x86-64 | Details |
| querysource-5.2.4-cp311-cp311-manylinux_2_28_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.28+ x86-64 | Details |
Total release size: 36.2 MB
Release files / querysource-5.2.4.tar.gz
| Download URL | querysource-5.2.4.tar.gz |
|---|---|
| Size | 3.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
163e57079c02ba04e8ce064141db4d5537634bd33fe859a3edf742613f74919b
|
|
BLAKE2b-256 checksum How to use checksums |
d0b0c7c68d9d695897aad232eb1e1e0055d7ccbf5ec82ef27b0ae763a0e2025b
|
| 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.4-cp314-cp314-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.2.4-cp314-cp314-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | CPython 3.14 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
d7dea905f6031ed43b74ae95fdd3564213da4bd3f09ff9048b1f219ece639ea5
|
|
BLAKE2b-256 checksum How to use checksums |
b4cd282d03ea32ca46f9809d02d77f941a743e5c39fd5ae8746a753a38ba68a4
|
| 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.4-cp314-cp314-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.2.4-cp314-cp314-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 4.0 MB |
| Tags | CPython 3.14 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
f070d4d4d0b6b579ca29477b96b1edec621fb330a6554f6e1bf342eec2e575c4
|
|
BLAKE2b-256 checksum How to use checksums |
e265d01d348a4257c9c5bfe36e2fa5dc28e5cb8227b608ca68ad770ec22aff44
|
| 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.4-cp313-cp313-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.2.4-cp313-cp313-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | CPython 3.13 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
7b8a5aeaa72c70add3fdfe0538f60f669efd07c361d7fab7202d6494760aa5b2
|
|
BLAKE2b-256 checksum How to use checksums |
a884418f4d5114eba18ce9ab46413574569a7489dc8a30410eb21c0e10695422
|
| 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.4-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.2.4-cp313-cp313-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 4.0 MB |
| Tags | CPython 3.13 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
7d91e03173d235d2d15ae12cba6e8c08ba8254e05895031eb4a7ce1172d05e30
|
|
BLAKE2b-256 checksum How to use checksums |
2c3baa5ae92062dabca45de9f08e2fec968d08fc8193ea6fdba5c103108fca83
|
| 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.4-cp312-cp312-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.2.4-cp312-cp312-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | CPython 3.12 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
fd53594bb1c962d324f0264cadc1ccbfe78d6a433498fc2abc19b558b31c79de
|
|
BLAKE2b-256 checksum How to use checksums |
ac4d6226a4261a8493f1abda4626c01fcf77e33096ae1f34bd71660069be13a8
|
| 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.4-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.2.4-cp312-cp312-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 4.0 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
b0bbc4bcc169525b24e04b3853cce86ad18362b6e54173f82358fc70f9d5e3c1
|
|
BLAKE2b-256 checksum How to use checksums |
7ccec4421ee3c1a23572259433c8a9250e8249c5f4621d4f5f4370a835542b52
|
| 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.4-cp311-cp311-musllinux_1_2_x86_64.whl
| Download URL | querysource-5.2.4-cp311-cp311-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 4.2 MB |
| Tags | CPython 3.11 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
9f630c83ff8c7cebfd05669aea340aa52f0a114c15fddd5d70dab08b6f46dcbb
|
|
BLAKE2b-256 checksum How to use checksums |
43bdac31a50e80705ce832f7ba2567f5179468ed41c934fdb09fc993b39da484
|
| 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.4-cp311-cp311-manylinux_2_28_x86_64.whl
| Download URL | querysource-5.2.4-cp311-cp311-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
344ec40603dd6aee98a3d572c9d27a1fca92e1b9b369947b83d57196c7595690
|
|
BLAKE2b-256 checksum How to use checksums |
2a482aeae069858c2982117602eeb71ce324504e193690a1ab3b3798ca21e96b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|