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.6.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.6-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.6-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.6-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.6-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.6-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.6-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.6-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.6-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.6.tar.gz.

File metadata

  • Download URL: querysource-4.5.6.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.6.tar.gz
Algorithm Hash digest
SHA256 0735f6ddb307b2b01cb5a294e5b69af56fd0f6b0bf3f620e38f0e625ece795f0
MD5 cd21b18b92d04dab4d55e3de7888714b
BLAKE2b-256 9b3838e472973076f07bf5f0cc7fb633c099cc8759901fa049006203f51b3290

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.6-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 4fb774ffc11839b38fd4401968bc8cbd942dc0bbb6b4ab84cd99ec8348f2f4bc
MD5 4b53561633b2a748f61abf234803f51c
BLAKE2b-256 7e4aeac0da2728342efa8192e61e1ec74ea414f42f9566d5fdf5ee3371d1ef68

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.6-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 749634a52b15f9c7200a8e6c80bc32fac84df3922a4f8ec0512b96607b35e1fd
MD5 9b2b7daeebb9e911b6c2eae53fa4aa69
BLAKE2b-256 17aee63607182ea14c4f6de38db484c96cf25898e4c5ced7d0bbf1728f7776a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.6-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 27078b00dae6a4d04ca154bb4fc600758dfb44de4bb4174fa8777e7b10f7feb0
MD5 efaa7ca202f46248a5f54dbd3d2acc70
BLAKE2b-256 c5ccb24c73739657630e79efe692a7c61fc413e54081424c8a8f752d35cf9009

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.6-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e3bdba2ea14b429e61aaad0caa194f212955abfcf954481e1407641c5cf9f679
MD5 2ce2e96dafc6b372ab6438e4716be9f3
BLAKE2b-256 36b8e81f8ebae92a8d5b62299b09bbbcb72994927d01274b1ffd41bab820c725

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.6-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 21c0d2c162ca9a92c3511b529d9808f465d633ca06b9f8374aa53c1ab3e1c1a6
MD5 a07565121db8e889dd353e39c0086e72
BLAKE2b-256 332f67e82345087374d7d316e51b3105b8186c5aaabe0fe453eabd904f18d638

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.6-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 166ce4dcd1b662a2bf422b693adce7c1ac656660857af77e7212d8c8e711a944
MD5 5dd15d5d68f8968ca4af33ffa3793c13
BLAKE2b-256 28ed02ccf8db08f62df5e9856636f96fba642dd7c823a8bb4c9cb3dceb57c6de

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.6-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3b102d7095f2ed7d0735bf08e456b22cc3e37e2961192c41f3638d3551b84f07
MD5 4f01a4110021c64ade6020291d7b6820
BLAKE2b-256 e6d0aadbc06d5e0058653dd81e5ddb36ea4020aa8b3d10a3f266cedf4ba86c03

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.6-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d7a52a9cf08cefd3d56d7722fe02d7736d9ddfbe64a8a8cf319756e6ae02494e
MD5 708012939c70f014631b6f64fade1d67
BLAKE2b-256 6f816087f4396cca8075c31939dafe630e5ee597aec8c8c90d6f90c1b9702292

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