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

File metadata

  • Download URL: querysource-4.5.4.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.4.tar.gz
Algorithm Hash digest
SHA256 63ba6760385512c66071b2e2ff38efdce92b049e4bec6e0254b82d6fb14d5236
MD5 e58faa5d8d9940a96fc4fb347e40c96e
BLAKE2b-256 d937a2bf882339e83cff7e9a44bca8b9e40eaa9b5ca6090ccc3d3b72df0681cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.4-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d82bd6c7d251f0e4b4ba85b417f96a6173278227263f181a4463c5657436a1b3
MD5 e63ffc779bb75e0650abaeff2d804efc
BLAKE2b-256 bab8d4b76199e62d4450e010204f072389410a59843b333d756468f8cef8a91b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.4-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 33fc25198f8aa8a3f610c485c7dc5afae1f51f02d680e33585fc91373fe52080
MD5 0cc71a7f609ac5cace93ffb387ae3d7a
BLAKE2b-256 7aca243bbd57826ffc7e0a37fae94743f3683390d058bc4499bb4e056f40cab3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.4-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2b4d21146a3a9d18a1aac41fcda5a558b01d309f5c13fa625a6476a0b5991471
MD5 b1a869c533766e9b1e40353fc5a41937
BLAKE2b-256 59aa066bd774c54f96491c1b26dd5a3d99a24634df33f1bc2880e0c8ec4fb50f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.4-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 11e5fe5b3bc05c1e5a3c24260e2a5d9689ac306215f73f3fd3e7372612ee1305
MD5 67e945ead518ed4d16c415d8bf89509e
BLAKE2b-256 b6053816e76a5a3537e0caaf27b7a00edd5f81f87c8232d729fb0aac125b84c0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.4-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 990ba6cb4e9802a169f3acc129655908deb01205733992bef3c4e102695936b4
MD5 f91032d4a9ebf1898d9922c2c66b299c
BLAKE2b-256 f07f8c80377ac89d507141e36d4a119a93a921f9d56801fc9d524b225efba483

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.4-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5ca59b994da4a2d7fe2b20f122093dfdaf5fac7d70caf6c1942a35431ebf00b0
MD5 cc6970568daa324b1dfdc379570674d9
BLAKE2b-256 cd67eef56b7cbfde09411d3b7a9a1b222c22d6c148ef16f18121e9186b384b89

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.4-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f9474260704b7b1a2bacb4ecc0192560df90ea545f2f958dd1173a9c0b3eae96
MD5 1e98156b1235f0005f8d22adab0d7ac0
BLAKE2b-256 9823fb8114a6d636465409b2f46c3aa58350a936abdfe11e3c7ac036e9c6571f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.4-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2d647e548410478f373f8463284a17876c17c47b062d46472c6321c72efa3493
MD5 659c0394e9f3728519817620d6d99cd5
BLAKE2b-256 ffb93a223b7bce396974ae6005ef19fdba6b06251aac04d747a50a6743e8db98

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