A library for rendering HTML tables and Excel files from SQLAlchemy models.
Project description
WebGrid
Introduction
WebGrid is a datagrid library for Flask and other Python web frameworks designed to work with SQLAlchemy ORM entities and queries.
With a grid configured from one or more entities, WebGrid provides these features for reporting:
-
Automated SQL query construction based on specified columns and query join/filter/sort options
-
Renderers to various targets/formats
- HTML output paired with JS (jQuery) for dynamic features
- Excel (XLSX)
- CSV
-
User-controlled data filters
- Per-column selection of filter operator and value(s)
- Generic single-entry search
-
Session storage/retrieval of selected filter options, sorting, and paging
Installation
Install via pip or uv:
# Just the package
pip install webgrid
uv pip install webgrid
# or, preferably in a uv project:
uv add webgrid
Some basic internationalization features are available via extra requirements:
pip install webgrid[i18n]
uv pip install webgrid[i18n]
# or, preferably in a uv project:
uv add webgrid --extra i18n
Getting Started
For a quick start, see the Getting Started guide in the docs.
Links
Dev
Copier Template
Project structure and tooling mostly derives from the Coppy, see its documentation for context and additional instructions.
This project can be updated from the upstream repo, see Updating a Project.
Project Setup
From zero to hero (passing tests that is):
-
Ensure host dependencies are installed
-
Start docker service dependencies (if needed):
❯ docker compose config --services mssql pg ❯ docker compose up -d ... -
Sync project virtualenv w/ lock file:
uv sync -
Configure pre-commit:
pre-commit install -
Install mssql driver if intending to run mssql tests
mise odbc-driver-install -
View sessions then run sessions:
❯ nox --list # all sessions ❯ nox # selected sessions ❯ nox -e ...
Versions
Versions are date based. A bump action exists to help manage versions:
# Show current version
mise bump --show
# Bump version based on date, tag, and push:
mise bump
# See other options
mise bump -- --help
PyPI Publishing
PyPI publishing is automated in the nox.yaml GitHub action:
- "v" tags will publish to pypi.org (production)
- Anything else that triggers the Nox GH action will publish to test.pypi.org
Auth for test.pypi.org is separate from production so users who should be able to manage the PyPI project need to be given access in both systems.
Documentation
The RTD project will automatically build on pushes to master.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file webgrid-0.20250807.2.tar.gz.
File metadata
- Download URL: webgrid-0.20250807.2.tar.gz
- Upload date:
- Size: 266.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
314f84e75c47381c7088a8af8c2c79b71307985623a6dd76b22ab46246d04285
|
|
| MD5 |
febc3797d9ad326108083819db093a45
|
|
| BLAKE2b-256 |
408fabb10af4d0f8945258f9db4b254bf265c489f7d0ae1f88467c892cfdb8b7
|
Provenance
The following attestation bundles were made for webgrid-0.20250807.2.tar.gz:
Publisher:
nox.yaml on level12/webgrid
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
webgrid-0.20250807.2.tar.gz -
Subject digest:
314f84e75c47381c7088a8af8c2c79b71307985623a6dd76b22ab46246d04285 - Sigstore transparency entry: 361055502
- Sigstore integration time:
-
Permalink:
level12/webgrid@8e5156213b87739c2d0670816d7b5c9d584a19bf -
Branch / Tag:
refs/tags/v0.20250807.2 - Owner: https://github.com/level12
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
nox.yaml@8e5156213b87739c2d0670816d7b5c9d584a19bf -
Trigger Event:
push
-
Statement type:
File details
Details for the file webgrid-0.20250807.2-py3-none-any.whl.
File metadata
- Download URL: webgrid-0.20250807.2-py3-none-any.whl
- Upload date:
- Size: 103.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93bbcd4b8db32361631547bd4a5d7d064d3ec47103f3f0bc2946f8494984aa78
|
|
| MD5 |
fe1f976b7b446726684e4c843994da22
|
|
| BLAKE2b-256 |
bb181848fa42a20bb76aa1d2537c77cd5f3e3174ac75d0305df60f34666055f1
|
Provenance
The following attestation bundles were made for webgrid-0.20250807.2-py3-none-any.whl:
Publisher:
nox.yaml on level12/webgrid
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
webgrid-0.20250807.2-py3-none-any.whl -
Subject digest:
93bbcd4b8db32361631547bd4a5d7d064d3ec47103f3f0bc2946f8494984aa78 - Sigstore transparency entry: 361055537
- Sigstore integration time:
-
Permalink:
level12/webgrid@8e5156213b87739c2d0670816d7b5c9d584a19bf -
Branch / Tag:
refs/tags/v0.20250807.2 - Owner: https://github.com/level12
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
nox.yaml@8e5156213b87739c2d0670816d7b5c9d584a19bf -
Trigger Event:
push
-
Statement type: