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.9.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.9-cp313-cp313-musllinux_1_2_x86_64.whl (11.4 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

querysource-4.5.9-cp313-cp313-manylinux_2_28_x86_64.whl (11.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

querysource-4.5.9-cp312-cp312-musllinux_1_2_x86_64.whl (11.5 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

querysource-4.5.9-cp312-cp312-manylinux_2_28_x86_64.whl (11.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

querysource-4.5.9-cp311-cp311-musllinux_1_2_x86_64.whl (11.3 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

querysource-4.5.9-cp311-cp311-manylinux_2_28_x86_64.whl (11.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

querysource-4.5.9-cp310-cp310-musllinux_1_2_x86_64.whl (10.4 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

querysource-4.5.9-cp310-cp310-manylinux_2_28_x86_64.whl (10.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

File details

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

File metadata

  • Download URL: querysource-4.5.9.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.9.tar.gz
Algorithm Hash digest
SHA256 7c0aab1a761f2ff328fba45f3f7a195320e46c08c3f167b6dbbf641d48387f50
MD5 01a6affbefc5606a6342423c77712492
BLAKE2b-256 cfb652ea659bad76626a1ad531683e8d33afd93d4433af63466b640877821a95

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.9-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 6d4811ddd6c9b4da837c4b3b24875b447f4baaddd5f24aea0d1988a92fa1bc6a
MD5 20824ef1a238de7683cb61679e31b4bf
BLAKE2b-256 8f68a6bea3600e838c335794d3cbfdcc58eb0fac45804a55c20a7986e1d14587

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.9-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 364b50e5c35f53dfc2ee9110172404b7f3719a781b4dff2b8d3f1f1c152ee3cd
MD5 d0739eb0f080d759fe52b5d63c16c223
BLAKE2b-256 e13238d04fb1f9eef8b566c30615f181817258dff78982c2b62365120b31b99b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.9-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b17ab40809daab82ee63055a8263e534f8296c70d7da90e5340273f2ab4511b0
MD5 d45d8612e50a52264a3726cf91f372c1
BLAKE2b-256 0d552445349d38070d7edf51fbac63e8f8dabd96677efdcb94d1881139478dac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.9-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f97155812f13945bc873b95e927c3e07700112290ece6ddc7bf8e31b1c1482f3
MD5 f4e1acf2b07d4dee216c8c832469ac76
BLAKE2b-256 a210f57abe61fa7e4826415ca0be48d85ab572d7a580984dabb30ce832ee6fd4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.9-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 7f3fa7a52bed0db280c3fb0aa775fb62a36c3b52cee4536ee8465c2a5fc1ef6d
MD5 b408b30f3195f2f80559149271921ce2
BLAKE2b-256 8e9f4d088324b9ca28c2dcd82a2b5b937ba072b7193b7d83ebffd3d0c6a71340

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.9-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bcaf0036bf104cdbe86c2daf939457f2bf8e8ba8033bfabfffed3dc1c8f9d6cc
MD5 1446c2f712d177223a0dc20dd9ff0dc1
BLAKE2b-256 9b5c4a6045f6cc908baffad087a650410ccdde1d69d97a8e4db2d681cf1aa17b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.9-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 63e57aa492ba1cfd86a0433a72d11287789dc1d32db996267d8abc555b4d37d0
MD5 40af35e5b443cecbba3669cdb370b45c
BLAKE2b-256 e25f1632c94f0639f26eab63b3b064741f8b8d2a6b72ba45d4e6c9ec753ea590

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.9-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2403d2511be515c4eff0a6c5dc8230de8815e675caf2692ac14f11eecfbd9b15
MD5 9dd4a3044c6a28c813a82398ec336213
BLAKE2b-256 027297b2409f27b74697845a876159f3a3b41b926027d04edc1bbacba5e495b3

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