skillfed

querysource

Aiohttp web service for querying several databases easily

querysource v4.5.11 110.3K downloads/30d#12,477 on PyPI16
Permissive license BSD-3-Clause Active released

What it is and what it does

QuerySource is an async Python library that abstracts away the complexity of connecting to and querying multiple databases and external APIs. Instead of writing separate connection logic for PostgreSQL, Redis, Salesforce, and other sources, you define a single QS object with your query and output format, then await the result. It uses the proxy design pattern to route queries to the appropriate backend handler.

The library carries substantial dependency weight—65 runtime packages including database drivers (psycopg2-binary, sqlalchemy), web automation tools (selenium, playwright), API clients (hubspot-api-client, simple_salesforce), and async utilities. This breadth reflects its goal to support many data sources out of the box, but means you inherit all those dependencies even if you only use a subset of backends. It targets Python 3.10.1 and above, is actively maintained (last commit 2026-08-07), and carries no known vulnerabilities.

Use it for:

  • Build a data pipeline that pulls from PostgreSQL, Redis, and Salesforce without managing separate connection pools.
  • Create an async web service that queries multiple databases and APIs through a single unified interface.
  • Prototype rapid data integrations by leveraging pre-built connectors for common sources like ShopperTrack and ZipCodeAPI.
  • Extend QuerySource with custom data sources by inheriting BaseProvider or BaseAPI and registering the new handler.
  • Execute parameterized queries across heterogeneous backends and normalize results into a common format (e.g., pandas).

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

QuerySource provides a unified async interface to query multiple databases (PostgreSQL, MySQL, Redis, Oracle, InfluxDB, CouchDB, Druid, SQL Server) and external APIs (Salesforce, ShopperTrack, ZipCodeAPI) through a single proxy-based abstraction layer.

Yes, if you need to query multiple heterogeneous data sources (databases and APIs) in an async context and can absorb the 65-dependency footprint. The active maintenance, recent release, permissive license, and zero known vulnerabilities support adoption. No, if you only need a single database driver or want a minimal dependency footprint—the proxy abstraction is not worth the overhead for single-source use cases.

Install

querysource on PyPI

pip

pip install querysource

uv

uv add querysource

poetry

poetry add querysource

Installing querysource

Before you install

Medium install friction due to 65 runtime dependencies including database drivers (psycopg2-binary, sqlalchemy), web clients (selenium, playwright, httpx), and specialized connectors (hubspot-api-client, simple_salesforce). Recent release (9 days old) and active maintenance signal confidence in the codebase.

License in practice

BSD-3-Clause is permissive and imposes minimal restrictions; you may use, modify, and distribute QuerySource in commercial projects provided you retain the license notice and disclaimer.

Quickstart

from querysource.queries.qs import QS

query = QS(
    query='SELECT * FROM tests',
    output_format='pandas'
)
result, error = await query.query()

Requires Python >= 3.10.1 and < 3.14; async/await context required; database or API credentials must be configured separately.

Verify before relying

  • How to configure connections for specific databases or APIs (documentation link provided but content not verified).
  • Whether all 65 runtime dependencies are always required or if they are optional per data source.
  • Performance characteristics and query latency across different backend types.
  • Extent of type hints coverage (marked 'Typed' but depth unknown).

Package facts

License BSD-3-Clause (permissive)
Python support supports the current Python release (<3.14,>=3.10.1)
Install friction medium — platform-specific wheel
Runtime dependencies 65 — LivePopularTimes, hubspot-api-client, httpx, h2, oauth2client, google-analytics-data, google-api-python-client, google-auth-oauthlib, sqloxide, aiocsv, lxml, xlsxwriter, odswriter, odfpy, xlrd, reportlab, APScheduler, bs4, simple_salesforce, psycopg2-binary, sqlalchemy, selenium, snapshot-selenium, webdriver-manager, playwright, proxylists, async-notify, navconfig, navigator-api, jsonschema
Maintenance actively maintained — 9 days since the last release
Last repo commit
First released
Downloads 110,264/month — #12,477 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: querysource-4.5.11-cp310-cp310-manylinux_2_28_x86_64.whl; querysource-4.5.11-cp310-cp310-musllinux_1_2_x86_64.whl; querysource-4.5.11-cp311-cp311-manylinux_2_28_x86_64.whl; querysource-4.5.11-cp311-cp311-musllinux_1_2_x86_64.whl; querysource-4.5.11-cp312-cp312-manylinux_2_28_x86_64.whl; querysource-4.5.11-cp312-cp312-musllinux_1_2_x86_64.whl; querysource-4.5.11-cp313-cp313-manylinux_2_28_x86_64.whl; querysource-4.5.11-cp313-cp313-musllinux_1_2_x86_64.whl

Keywords: querysource, database, query, aiohttp, web service

Development Status :: 4 - BetaEnvironment :: Web EnvironmentFramework :: AsyncIOIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Software Development :: Build ToolsTopic :: Software Development :: Libraries :: Application FrameworksTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

unified database query interfacemulti-database abstraction layerasync database connectorquery multiple data sourcesdatabase proxy patternsalesforce postgresql redis queryasync data source aggregation
async-query-abstractionmulti-backend-connector

More Python Modules packages