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

File metadata

  • Download URL: querysource-4.1.12.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.12.tar.gz
Algorithm Hash digest
SHA256 98520de7585f873acfaf0ad17791eef0e7bf1774e165ab437f54587f9d91b669
MD5 c79c11b55504ee421d34d0256777e0a7
BLAKE2b-256 5755536b39dcfa543a5b7ad2a92e4e204242fca90ad9095754df88746157b967

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.1.12-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b88e9a7eb9114c757c773e189988ce17a1978840206ad98a17a0abf978febe2b
MD5 17e79abb3eb81f614c8e6b8a5275ffde
BLAKE2b-256 e9e265f2f554de4ff2adc8c101003eb7d3dd36f0c8792d6eb2bd0ae897efe556

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.1.12-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9c54b1fa93899361320743a9b3952675bbb49d6b105dba72ba384cd3433221b3
MD5 7995d01cadc2e4d3254081fa535f23ea
BLAKE2b-256 f76140bd06cc7e4689dace01331c48ed4cd473269285530fb9a48a547202a7cc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.1.12-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2be5a2b45a20b19ee505e79f706d0299688e1f178f76ec3c44bfddb23d556432
MD5 fe54a4b9a57b76b5f85200f31928f8a4
BLAKE2b-256 4086137ca7b90d2c5ab721555ed4d84f418ab07932d79edca6203519124f6ca3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.1.12-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3468462e326fc385475551bee287d80be10de2b47a091cf73ae5078584849e93
MD5 5fba649052b4f991856d445cfa4481cd
BLAKE2b-256 6edfbd2d841b8000ab957b1e6e4e62e28d6ed776307f46cec8db71ab181b4652

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.1.12-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 bd639069a843f27c1df550e49749a34edbc7ad793590ca653f971dea8f4eb135
MD5 68ab48620d521c67bb8f568dfc02a6aa
BLAKE2b-256 a9a492ae1f8786f5b0fa0eefd2efb3a6348735e343ae60d41d200883db38a04e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.1.12-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6796f793b7c2bd4b1150f987b20d884172985a15395c1978f5b9dbe5ae73eb04
MD5 3f69615b2e2362267eca3720342e7678
BLAKE2b-256 dd38278f48e53c0565004d16be4848f31bc43283d4875ecbe0e16f94914af9bc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.1.12-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 fe6da420999f2d2e97137fd659acaeaa17deb38872d0b155c8a120ae48906789
MD5 d2b007d60dd75a14822c1a834a160295
BLAKE2b-256 5136dacae77ce5e0641bdb6476111d9932f3d87854895c0b4b7fb41cf21c1290

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.1.12-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b4b4e85a50d06d1b16724e0775cf983ae0e3e7622148b622a2fcccb35a9f9087
MD5 25c0f16624a5d22b2a94d3d64aaeece3
BLAKE2b-256 3e1ebae9be0d61c98919be30d02e3d3daa3c3387d4ce802141eda1af44b5f6ee

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