Skip to main content

SQL-like declarative schema definitions for Google Sheets

Project description

SpreedSQL

SQL-like declarative schema definitions for Google Sheets.

SpreedSQL lets you define Google Sheets schemas the same way you define database schemas with SQL DDL, but for spreadsheets.

Quick Start

from spreed_sql import Spreadsheet, Tab, Column, DataType, OnEdit, Filter, execute_schema

schema = Spreadsheet(name_template="CRM_{name}")

schema.tab("Clientes",
    Column("Nombre", DataType.TEXT, required=True),
    Column("Email", DataType.EMAIL),
    Column("Estado", DataType.ENUM, values=["Activo", "Inactivo"]),
    Column("Monto", DataType.CURRENCY),
    triggers=[
        OnEdit(column="Estado", webhook_url="https://api.example.com/webhook"),
        OnSchedule(webhook_url="https://api.example.com/cron", cron_expression="0 9 * * *"),
    ],
    filter=Filter(enabled=True),
)

sheet_id, url, apps_script = execute_schema(schema, admin_email="admin@company.com", name="MiEmpresa")

Features

  • Declarative schemas — Define tabs, columns, types, and validations in Python
  • Auto-validation — ENUM dropdowns, email/URL validation, required fields
  • Formulas & computed columns — ARRAYFORMULA, auto-timestamps, calculated fields
  • Auto-filters & sorting — Enable filters and default sorts per tab
  • Pivot tables — Define pivot tables that auto-generate via QUERY()
  • Apps Script generation — Auto-generate onEdit() triggers from schema
  • Schema validation — Lint existing sheets against your schema definition
  • Format rules — Conditional formatting (color cells by value)
  • Hidden columns — Internal IDs invisible to end users

Installation

pip install -e ../SpreedSQL

API Reference

See spreed_sql/models.py for all available classes and options.

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

spreed_sql-0.1.1.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

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

spreed_sql-0.1.1-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file spreed_sql-0.1.1.tar.gz.

File metadata

  • Download URL: spreed_sql-0.1.1.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for spreed_sql-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1799ecea48577f514ef955c9609e0f8d8b2e900da60f3e96fffb30e62cc8df62
MD5 65710781a397207faa4bdb29b1ecede8
BLAKE2b-256 142fdc75ccdde1849afa19a78d5a774b6cb0ca3f3615aedaf21a5dd4fb7e9033

See more details on using hashes here.

File details

Details for the file spreed_sql-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: spreed_sql-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for spreed_sql-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 405e93018edcfb5cea3cc7a40f2c22d541a4b9f9e3f93a606b6356bde3a5c089
MD5 a3afbc8dbce781b1897ead4ef27039f1
BLAKE2b-256 ccf5f36e30424284e5af773616ddc749a1037bbef7ea1d39aff4342ea9d4f28b

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