Skip to main content

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

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

querysource-4.5.1.tar.gz (3.2 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

querysource-4.5.1-cp313-cp313-musllinux_1_2_x86_64.whl (13.8 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

querysource-4.5.1-cp313-cp313-manylinux_2_28_x86_64.whl (13.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

querysource-4.5.1-cp312-cp312-musllinux_1_2_x86_64.whl (13.9 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

querysource-4.5.1-cp312-cp312-manylinux_2_28_x86_64.whl (13.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

querysource-4.5.1-cp311-cp311-musllinux_1_2_x86_64.whl (13.7 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

querysource-4.5.1-cp311-cp311-manylinux_2_28_x86_64.whl (13.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

querysource-4.5.1-cp310-cp310-musllinux_1_2_x86_64.whl (12.9 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

querysource-4.5.1-cp310-cp310-manylinux_2_28_x86_64.whl (12.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

File details

Details for the file querysource-4.5.1.tar.gz.

File metadata

  • Download URL: querysource-4.5.1.tar.gz
  • Upload date:
  • Size: 3.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for querysource-4.5.1.tar.gz
Algorithm Hash digest
SHA256 6abff8704c5aaeaa89f9e0af4aaf0886d2c7656a12550457c5f46d36ff57469e
MD5 cda2400cf25de0c3535f3b146232d5f3
BLAKE2b-256 595e7ad1792a65a0f6958eaa65a815a1b1bec222e3068606b53229f2eca52d18

See more details on using hashes here.

File details

Details for the file querysource-4.5.1-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for querysource-4.5.1-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 8ea9c8db9e0f47a5f2adb0d1d1e67718537d0f55a55fc4fcc4854550a5fdc565
MD5 16649700ccef1951b3d8e2535ba547a9
BLAKE2b-256 e34b219afda1977a512a8c8c71327674663ec3b8eee3d5e7feceb61f29d67371

See more details on using hashes here.

File details

Details for the file querysource-4.5.1-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for querysource-4.5.1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e9c8d8fdc7c97334de47fbc79468fb02bb4ead0c9b062f38c0107fdaa29a9e58
MD5 c60db4c65d2c6885e7f19f56651a7b87
BLAKE2b-256 9b924c934482d12a5c818a669bd4c306efd3439d1c9993126628de0923e7ef10

See more details on using hashes here.

File details

Details for the file querysource-4.5.1-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for querysource-4.5.1-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e93437cbd881092413dd2d49078d218523e545c781d2becb6b194a7cfe47f053
MD5 c883811dcc6fe4d9f3e253bb70e5b7ab
BLAKE2b-256 344dad3b4f55d58342e332d7d5c843060b2061c7ebd8ee33d7d954ea5840ce60

See more details on using hashes here.

File details

Details for the file querysource-4.5.1-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for querysource-4.5.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1e82e90aec8efff65c0bb9563786cc7463b22d1640f4d9d25a5afe0abb5c0f81
MD5 3b495144cfc72bb864d36dfe6e97a284
BLAKE2b-256 6de45b54ac41bf0b4ecc7ca2f95276725a20b4f014e296c5a30ad8c6fb40b376

See more details on using hashes here.

File details

Details for the file querysource-4.5.1-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for querysource-4.5.1-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ebd02e59f9d9f6a15cce48b47b8f559b1e237fed5066e88b2c3895903dd58959
MD5 7e90cba4d5cca57606be66504672c27c
BLAKE2b-256 e1db8cfa3eca755d41d80abe7c43b149728b004d6e2dfe2c46b864910a6b81e1

See more details on using hashes here.

File details

Details for the file querysource-4.5.1-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for querysource-4.5.1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 807d6581bf09c62af22c790a763d664b60020d5b3db0e669f6d6e8eca797566d
MD5 fddb522a22080a3034e253c2fd581903
BLAKE2b-256 9ffe91204d479c623685741b8c3117883c35256db4bf92b91163282dd13eb2da

See more details on using hashes here.

File details

Details for the file querysource-4.5.1-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for querysource-4.5.1-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f43f2573550dcd55772588b011177b278fc215a19680bff6ec4d8189c1f62f78
MD5 b7bd33f6bcfda76001774bb247bef0c2
BLAKE2b-256 b5e128469f05474a2c4c2ebf49ae53ff00881592b26a5ca1b108db9b7d90db99

See more details on using hashes here.

File details

Details for the file querysource-4.5.1-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for querysource-4.5.1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a1b3505d1bc2835f4dd23bdc7fb39c6349b566ba0e2fb5afe2436e49f1ca4448
MD5 88f148f4843f9d2ecc6b1111dcdbcacb
BLAKE2b-256 1b5ed6904aed0e5166f986fb65d4d385ee9d905894e964d488e01d84bfae8874

See more details on using hashes here.

Release history Release notifications | RSS feed

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page