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.11.tar.gz (2.8 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.11-cp313-cp313-musllinux_1_2_x86_64.whl (13.4 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

querysource-4.1.11-cp313-cp313-manylinux_2_28_x86_64.whl (13.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

querysource-4.1.11-cp312-cp312-musllinux_1_2_x86_64.whl (13.4 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

querysource-4.1.11-cp312-cp312-manylinux_2_28_x86_64.whl (13.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

querysource-4.1.11-cp311-cp311-musllinux_1_2_x86_64.whl (13.3 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

querysource-4.1.11-cp311-cp311-manylinux_2_28_x86_64.whl (13.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

querysource-4.1.11-cp310-cp310-musllinux_1_2_x86_64.whl (12.4 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

querysource-4.1.11-cp310-cp310-manylinux_2_28_x86_64.whl (12.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

File details

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

File metadata

  • Download URL: querysource-4.1.11.tar.gz
  • Upload date:
  • Size: 2.8 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.11.tar.gz
Algorithm Hash digest
SHA256 64fcdbf8602b0fa5aac6e08a9be27960a26d926e3986c34c7379b1a76285633a
MD5 eaa772a1363ee7cf3800bee8e781115e
BLAKE2b-256 b0e79dc7eded141f7a074bc98430de25563b7695fd4bac57428b3295345ad58e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.1.11-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ab745900608de4c15c1d09b01644258346e73742310489a639536bbf562760fb
MD5 bf8b53bebe7276dc200e79f17d20ff00
BLAKE2b-256 34b36db0a99e41a9a0adf22a145a9f255d604166a27a4a1e9cac4576a337f947

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.1.11-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6bccb351fec4df6a8386ca6c04b963fbe10806c01566d62cb4fac26611a34d10
MD5 ada1afae022f508597bff35fbacf7e6b
BLAKE2b-256 f5339e8ac2341431f29452f950f1e7caca794e932cf4874aa9999ad62b89a0f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.1.11-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f81eb30b0545545ff3d20c682ad374897e75ae45dea23bda04e566cb9881ce72
MD5 8140a9707ca855eda7de8a52fd5c2624
BLAKE2b-256 8f94db935ad7b03dad4e3ba5b6766417c47d66788dc66cb97c683e2278c0ced6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.1.11-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ea9f39599b2050d665d6656d6b13aa4544383f46bf795db4bb43c89627cd07b3
MD5 30d44bc89f2a338fccd803e102ab7677
BLAKE2b-256 cf09b1b9ac4cb5abc27dc4511bb5917a015304bb818a4b270eef0514cc7c62d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.1.11-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 4efd990897f0cc3ed10f0e7105b5a22a1b2e5cbc5516722667f741a703dd9152
MD5 f97336fbf2e9e029a89efd398e7671d4
BLAKE2b-256 547e6c939cf52b5d50da0e2254994b6e065063883832762fe087c4e5f6017a4d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.1.11-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cf273ee8c879fc53d130f47bdd2645621904886987afd7de7c75ac83183e809a
MD5 8543477cb91e389062213a9b4da8057a
BLAKE2b-256 8e516dc314c87863b95ec930c56c91db14770bca49e5b6deeb5994a380170b29

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.1.11-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 7e3965c8755b39d61f24bbc895034206f4640b5e3fa15b8158b170ce7ea18af3
MD5 cf02e35ace5d54b7a7213618e593b1ad
BLAKE2b-256 2bc95958220c0ab373a1388d7fc809336e1157fcd1979f8b1af094d10358d991

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.1.11-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9cfab28f7cf65a6af4142225fc503edc0c3da2d10d80de042550587898abd5a5
MD5 f763ac99a621e033e2555f4580cd19c1
BLAKE2b-256 e062e82401c9cd29d307a062413000da93d7890292b925aba9cc88468630aa83

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