Skip to main content

Aiohttp web service for querying several databases easily

Project description

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.

Project details


Release history Release notifications | RSS feed

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.1.0.tar.gz (2.7 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.1.0-cp313-cp313-musllinux_1_2_x86_64.whl (12.4 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

querysource-4.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (12.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

querysource-4.1.0-cp312-cp312-musllinux_1_2_x86_64.whl (12.5 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

querysource-4.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (12.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

querysource-4.1.0-cp311-cp311-musllinux_1_2_x86_64.whl (12.3 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

querysource-4.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (12.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

querysource-4.1.0-cp310-cp310-musllinux_1_2_x86_64.whl (11.5 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

querysource-4.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (11.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

File details

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

File metadata

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

File hashes

Hashes for querysource-4.1.0.tar.gz
Algorithm Hash digest
SHA256 96da3598bccc5bec39ae96e770803cc9ddcbcb7318352048a556c52754a74271
MD5 0aa84b6bc79980088c414aa7451c887c
BLAKE2b-256 c5ab875cde35e367b9cbeb5228c00e8e39d3441e177f501b04668fe3ca318f00

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.1.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2ddbb7cf9315e20603f406f64b97c152fbdf38a3fc2dda5db040efc267fc31a5
MD5 4161fb9b2c68bcd4cf5ac413dc5aff19
BLAKE2b-256 e5a15472da3ffa014e82699318b39cd23c23df09747e510fb4186b942e55c863

See more details on using hashes here.

File details

Details for the file querysource-4.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for querysource-4.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d81116052626e157f4c4df79b44bcd0f875237f4f541b0567a24c3f610bd58db
MD5 b30c2e06fb670c9af05723dae74035ad
BLAKE2b-256 27be41792001811188c611e857502095b9429082874f8c238b80c5767017dbdf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.1.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 abb454f31060a228fc323a0b5e1010be45eb03847714b079372eeb53b9f38529
MD5 fc012e38e1c07cafd860b0f88458e61d
BLAKE2b-256 6c7858410b3027aae5e7247c0b61eb52f7f5ab0a9b5f5ea3786b491cbb477c70

See more details on using hashes here.

File details

Details for the file querysource-4.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for querysource-4.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 70f7af2022aa052be5d291bf93a07e923101be7b6d165b8a693b8f658e239240
MD5 3d0e90363e67bc4b344a4b9164114296
BLAKE2b-256 1f9be233bedf8da517bc86601fc868ff2ee4a421513f30c060487f108e2e910a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.1.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 6311f21ac55518a1bac3eea5dda46a1ba8501a62ee0a02d2ddde705eeb7f4911
MD5 d382b9c90a6d77ee4e6947bd06ca27fc
BLAKE2b-256 9f341cfb2c43e5b21b92d5f802a3e95239c30d7a675077192f89c9e52c86d718

See more details on using hashes here.

File details

Details for the file querysource-4.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for querysource-4.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 88eb6da0dc8da0787fa081ab0fd01be63860e78d0b13e3daeac37d7bd80ecfd1
MD5 3ff37993131edd7ae688fde1b0cc5b55
BLAKE2b-256 896c7e02779bf0ae6aea69648f15ac3f9b3972e7878b9fe0b0c2141458c88efc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.1.0-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 76f3e6ebccfb8aff15c707a0db22b9872315c31e15aa77c6a3b739d44aeafa68
MD5 2bc4b21e3645d74d0beabdc00fbbfb9f
BLAKE2b-256 8e63cbbc927fdf27b021f3f91fe904d941cca9cb0f8e35955f13bf66d26af89c

See more details on using hashes here.

File details

Details for the file querysource-4.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for querysource-4.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 04716967b2e2f09753ac9f38f15240626a9ed2968a58fcef8ba8b330d00dd0c3
MD5 17e1d68d4f57ae62b64a2174b7a146bc
BLAKE2b-256 06482a8266aac9826af885f2b9ec5b33767fbc451544aaeb6c78fb379674be65

See more details on using hashes here.

Supported by

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