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.4.0.tar.gz (3.0 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.4.0-cp313-cp313-musllinux_1_2_x86_64.whl (13.5 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

querysource-4.4.0-cp313-cp313-manylinux_2_28_x86_64.whl (13.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

querysource-4.4.0-cp312-cp312-musllinux_1_2_x86_64.whl (13.6 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

querysource-4.4.0-cp312-cp312-manylinux_2_28_x86_64.whl (13.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

querysource-4.4.0-cp311-cp311-musllinux_1_2_x86_64.whl (13.4 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

querysource-4.4.0-cp311-cp311-manylinux_2_28_x86_64.whl (13.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

querysource-4.4.0-cp310-cp310-musllinux_1_2_x86_64.whl (12.5 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

querysource-4.4.0-cp310-cp310-manylinux_2_28_x86_64.whl (12.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

File details

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

File metadata

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

File hashes

Hashes for querysource-4.4.0.tar.gz
Algorithm Hash digest
SHA256 6e2d20293c22da6477c4d9fb0715a5df5b4a964fc72268ee709a14836b2aa20a
MD5 c7f4c5c361383e9ca791a13fac625466
BLAKE2b-256 ae3c6e568dd4825f8983abc3d763e9893295bff74a361ef565fab82a78611195

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.4.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 76f6930f38c6fb5a5db4eed3c5d6ce7fd2dfc75ee36f563b9733ef3912875182
MD5 4016ffc30175ca30e512c4c2552f2c91
BLAKE2b-256 02da9c98486b0c10d7fef4345bb8d3b98e38f96bdcf409fba397b296669f6f97

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.4.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1937aa509dea4b70b9dff5b0596e3afb126f9da3d857224d7430879f6e1e5a53
MD5 5fde72974afbebe904460fe02ff0038d
BLAKE2b-256 3c38e05a229a50f0dcd76d6aa3230c43e3dcba618eb0ac978ba0bb9429553392

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.4.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c2c83bf08728ebb7df2e76e9750eef049a860359c369abace39b375c8a82d4ce
MD5 8988c5e0595c220515899f528157e7f8
BLAKE2b-256 98ac485ecc21b94324a67b3c6ff2c152d4f0024449e6807d72e4eb131b9ee893

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.4.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9d92fedd77e42d1d8be118de9d47776bb8899fefce28dcc5197100f52b36afc4
MD5 75f70f6d1154ac82fd92020e740fc1c1
BLAKE2b-256 7619d7750a3d05b6817119b33c8d50c4acc89bdf5d567366949477fe2d478e0e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.4.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 995ab5bd847924a4360d88ec27afe8f3193d58841e8d3cbf3acb5651a2da914b
MD5 f2f375c67c438fab06335e6974869fe9
BLAKE2b-256 7d4a6ccd98d1f4fe660da324d8ffd9123433da1f1d23df9a5c04b8483f5329d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.4.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b26e5a937a704d7517e673f39723872b9c35df3c5a9365a0f7656920140d5415
MD5 f4cc2685706ae83b296d9c2363644903
BLAKE2b-256 fc1d76aee279584d8efc2cfaf4595b67f0f02102fbde4b9335e5cdcedb84d704

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.4.0-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ff803731b17065bc42820af0936713c3318deec0c7658282e65dd668a467dae3
MD5 ae10d141316158ead5e430ed84bc93e9
BLAKE2b-256 dabbf3a00342f37a43604ed6cdf2ff4d0ca00b95c323a205307a33aee75d302e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for querysource-4.4.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 744c8775fc4789842978e821d08be63b19611400c92a2929151ba6c353a0b8d4
MD5 cb2a0f49308bf9b508f7270475f4d663
BLAKE2b-256 308f6a3967c7a643363db77e28fbd8e5d0a77afaada1d4d672b0969d38048548

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