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.0.tar.gz (3.1 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.0-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.0-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.0-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.0-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.0-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.0-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.0-cp310-cp310-musllinux_1_2_x86_64.whl (12.8 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

querysource-4.5.0-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.0.tar.gz.

File metadata

  • Download URL: querysource-4.5.0.tar.gz
  • Upload date:
  • Size: 3.1 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.0.tar.gz
Algorithm Hash digest
SHA256 ca5e1517b7e0015a6b8980721e844ca9e45b5b97bcd03b840d8e448ac26e0ae6
MD5 8d9d1c91f402f9f71b64a006b0f79465
BLAKE2b-256 214a5a013707a814328ce5e842cf5c69e0f6ce4592e9d9441b7879d61d6454d2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 46b44ec6cd7e06cea842f4be3d1d5d549416afd4d2ff84b6ab1053cc2d29085e
MD5 c440e06c4a1c39d7494dac476bac720d
BLAKE2b-256 691c1f42b792a909bbde84a5d7374e834647c5f35d4463c1df0f13b84fde83b8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 59de591c179b2ad402e8916e41854d2c0b1dc72533788c029d029fb28a099895
MD5 2c13b2bc93e947d5a56380aa94b220ed
BLAKE2b-256 c34fc01886b1a962492e4702fd57e61afca76341fdf919ccdb92b0f754b86c85

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d3460e624a79f3926040b0d87675643490a2b73ee9e424b54736c78f4ae6d459
MD5 e2c7be79658240796d070b11b485f901
BLAKE2b-256 fcb6331f81aa0241be5a6d85c5d94d4c03a8789f0108d9fac81eaa42ee5754c2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 86864047738463b438b55104fa9c7ccdf9d457edc28b3f2fa84fb60a4138e4be
MD5 89ed23399e59ce329d6e7479f70c9cfd
BLAKE2b-256 25fdf3a7fa1e4dd10306fe8bf318dd3729fa54b582bc18f35f907c3133ef6842

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e403346f44fa809380502a52721a5fe9bb38bc9170118a0171b0a90d58f425ed
MD5 2c1db4eba0234fee92fea2a4913dd917
BLAKE2b-256 b06e5a9ac96783f3a69e8a8537654583f3c9f0a2af5281c805996ee6bbad7dab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 eec614f1ce7a42e9cd2057eab00b7a59c4b40d6f75af59fd709b0cc039572990
MD5 c496ed0a92b9f57eb59948d91748936e
BLAKE2b-256 0f89abf47ab69e03f900ea148daa803a34d41650f518032b08c976aa382ed000

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.0-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3cc8b9cfeda97ce186f9474a9666f2546c581b016b349343f75728bdbe3d3487
MD5 ab24e1929b3cc2858ba4d45e1a35c059
BLAKE2b-256 9ac91ee854aace51e704eafb7d6806bc9ff83643776135d0c03b9ee9868b3ff2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.5.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 01c42c78549711499be418941267d87cbe52e74a1bcbbe01380153fd9c90c6f4
MD5 69ba0466c48440e322a3fe9ed051f229
BLAKE2b-256 2216ee9ba19c89a07633d5303b8affdc96bd296dc8c0a913b9e917f5d8329ed6

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