Skip to main content

Universal Python connector for APIs - Query any data source with SQL

Project description

WaveQL

WaveQL Logo

The Universal SQL Connector for Modern APIs
Query ServiceNow, Salesforce, Jira, and more using standard SQL.

PyPI License Python Version Async Support


WaveQL is the Universal SQL Connector for your modern data stack.

It unifies SaaS APIs (ServiceNow, Salesforce, Jira), Databases (Postgres, MySQL), and Files (CSV, Excel/XLSX, Parquet) under a single, standard SQL interface.

Instead of writing custom scripts for every data source, use WaveQL to:

  • Query live API data using SQL.
  • Join complex data sources (e.g., "Join ServiceNow Incidents with a local Excel sheet of VIP users").
  • Stream changes in real-time.

Built for data engineers and developers, it translates your SQL queries into optimized API calls (pushing down predicates like WHERE and ORDER BY) and handles authentications automatically.

Why WaveQL?

  • Universal Adapter System: Connect to ServiceNow, Salesforce, Jira, or generic REST APIs with a unified interface.
  • Intelligent Query Pushdown: We don't just fetch all data. WHERE clauses are translated into native API filters (e.g., JQL, SOQL) for maximum performance.
  • Change Data Capture (CDC): Real-time streaming of table changes (Inserts, Updates) directly from your SaaS apps.
  • Cross-Source JOINs: Seamlessly join data between your local CSVs, a Jira backlog, and ServiceNow incidents using our DuckDB-powered engine.
  • Async Built-in: Built on httpx and anyio for high-concurrency, non-blocking applications.
  • Data Science Ready: Native integrations with Pandas, PyArrow, and SQLAlchemy (works with Superset!).

Installation

pip install waveql

Or install from source:

git clone https://github.com/mitayan0/WaveQL.git
cd WaveQL
pip install -e .

Quick Start

1. Querying ServiceNow

import waveql

# Connect securely
conn = waveql.connect(
    "servicenow://instance.service-now.com",
    username="admin",
    password="your-password"
)

# Execute standard SQL
cursor = conn.cursor()
cursor.execute("""
    SELECT number, short_description, priority 
    FROM incident 
    WHERE state = 1 AND priority <= 2
    ORDER BY number DESC
    LIMIT 10
""")

# Work with results
for row in cursor:
    print(f"[{row.number}] {row.short_description}")

# Or get a Pandas DataFrame instantly
df = cursor.fetchall().to_df()
print(df.head())

2. Async Support & CDC

Building a modern event-driven app?

import asyncio
from waveql import connect_async

async def main():
    async with await connect_async("servicenow://...") as conn:
        # 1. Async Query
        cursor = conn.cursor()
        await cursor.execute("SELECT count(*) FROM incident")
        print(await cursor.fetchone())
        
        # 2. Stream Changes (CDC)
        async for change in conn.stream_changes("incident"):
            print(f"Update on {change.key}: {change.operation}")

asyncio.run(main())

3. The Power of "Join Global"

Combine data from APIs, Files, and Databases in one query.

# 1. Register a local Excel file
conn.execute("CREATE TABLE vip_users AS SELECT * FROM 'vips.xlsx'")

# 2. Join ServiceNow Incidents with the Excel file
# Find high-priority incidents affecting VIP users
cursor.execute("""
    SELECT 
        sn.number as ticket,
        sn.short_description,
        vip.name as vip_name,
        vip.department
    FROM servicenow.incident sn
    JOIN vip_users vip ON sn.caller_id = vip.user_id
    WHERE sn.priority = 1
""")

for row in cursor:
    print(f"VIP Alert: {row.vip_name} has ticket {row.ticket}")

Supported Adapters

Adapter URI Scheme Features
ServiceNow servicenow:// Table API, Aggregates (SUM/COUNT/AVG), CDC, CRUD
Salesforce salesforce:// SOQL Pushdown, Bulk API support, CRUD
Jira jira:// JQL Pushdown, Pagination, CRUD
REST rest:// Generic JSON querying
File file:// CSV, Parquet, JSON (via DuckDB)

SQL Syntax Support

WaveQL supports ANSI SQL with full compatibility for schema-qualified and quoted identifiers:

-- All of these are equivalent and fully supported:
SELECT * FROM incident
SELECT * FROM servicenow.incident
SELECT * FROM "servicenow"."incident"
SELECT * FROM servicenow."incident"

Supports: SELECT, INSERT, UPDATE, DELETE, JOIN, GROUP BY, ORDER BY, LIMIT, OFFSET

Authentication

WaveQL takes the headache out of auth headers.

  • Basic Auth: Simple username/password.
  • API Key: Custom headers or query params.
  • OAuth2: Full flow support including token refresh.
from waveql.auth import AuthManager

# OAuth2 Example
auth = AuthManager(
    oauth_token_url="https://login.salesforce.com/services/oauth2/token",
    oauth_client_id="your_client_id",
    oauth_client_secret="your_client_secret"
)
conn = waveql.connect("salesforce://login.salesforce.com", auth_manager=auth)

Contributing

We love contributions! Whether it's a new adapter, a bug fix, or a docs improvement, please join us.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

waveql-0.1.3.tar.gz (4.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

waveql-0.1.3-py3-none-any.whl (103.8 kB view details)

Uploaded Python 3

File details

Details for the file waveql-0.1.3.tar.gz.

File metadata

  • Download URL: waveql-0.1.3.tar.gz
  • Upload date:
  • Size: 4.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for waveql-0.1.3.tar.gz
Algorithm Hash digest
SHA256 0c1024cd6acd7ec5af0f32eb6221e289565e680db8e43ee2ed7557d34b663540
MD5 bfde0f4990b291a70b4200c1982545e6
BLAKE2b-256 b2bd4797c0629b62e43ca1b8a405bfd8ae2d9837c30282def5f4aa9b783447d8

See more details on using hashes here.

File details

Details for the file waveql-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: waveql-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 103.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for waveql-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8af447d4ec243d902472a10dff2ccd5495a5eee4cebcc1c580d5e9b25248340a
MD5 9cc9899419ea7033d99396b7e175180a
BLAKE2b-256 98ade7164dc10617f6e28da121441654178bd78c76ba433666e247bfc804eccc

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