Changelog¶
Unreleased¶
Every PR that changes src/kloudmint/ adds its line here (what changed, and what hand-written code
it lets a client delete). At release time these move under the new version heading.
0.6.4¶
Added¶
export_requires_selection(opt-in, with tracked exports):Kloudmint(..., export_requires_selection=True)makes Export work only on ticked rows. The button is greyed out ("Export (select rows)") until rows are ticked, and the server refuses an export request without a selection (400, before anything is recorded), so typing the URL does not bypass it. Replaces custom code that stops users exporting a whole table. See Exports.md.- Selection survives pagination, plus "Select all matching rows" (tracked exports): rows ticked on one page
stay ticked while you page, search-sort or filter back and forth (kept in the browser per list, search and
filter), with a bar showing the count and a Clear selection link. Ticking the header box offers Select all N
matching rows, which exports the whole filtered list (
select_all=1) and also satisfiesexport_requires_selection. Replaces custom JavaScript that kept selections across pages.
0.6.3¶
Fixed¶
- Export now exports the ticked rows (with tracked exports on). SQLAdmin's Export links carried no selection, so ticking rows and clicking Export still exported every row. The links now carry the ticked row ids and the button reads "Export (N selected)"; with nothing ticked it exports every row matching the current search and filters, as before. The selection narrows the view's own query and filters (it cannot reach rows outside them), works for CSV, JSON, XLSX, composite primary keys and background exports, and is stored in the export record. A malformed selection, or more than 1000 ids, is a 400. Projects without tracked exports are unchanged. See Exports.md.
0.6.2¶
Added¶
-
Tracked exports (opt-in):
Kloudmint(file_export_model=, require_export_permission=, export_max_rows=)withcreate_file_export_model(Base)andFileExportAdminBase. Adds anexportpermission (a column in the role permission grid), a record of every export (who, which resource, exact filters, rows, success or failure and why), a read-only Exports screen where users see only their own (theallpermission shows everyone's), and makes export match the list on screen: search, SQLAdmin filters and sort are applied, the Export links carry the page's query string, and the button is hidden from roles withoutexport. Replaces hand-written export gating and export logging. Needs an Alembic migration for the new table and a synchronous engine. With none of the options a project behaves exactly as before. See Exports.md. -
Background exports (opt-in, builds on tracked exports):
Kloudmint(export_background=ExportBackground(threshold=...)). An export of more rows than the threshold is queued; the user lands on the Exports screen, a job writes the file in batches as that user (permission re-checked), stores it through your storage backend, and the user downloads it from the Exports screen through an authenticated route. Files expire (expires_days) andpurge_expired(admin)deletes them; a dead worker's export is marked failed; an optionalnotifyhook runs on success. Runners:ThreadRunner(default),CeleryRunner(task), or your own. Replaces exports that time out on big tables and hand-built "email me a link" jobs. Small exports are unchanged. - Excel (xlsx) export: opt-in per view with
export_types = ["csv", "json", "xlsx"]and the new optional extrapip install kloudmint[xlsx](openpyxl). Works for instant and background exports. LocalStorageandS3Storagegain optionalupload_path(path, filename)(no whole-file read into memory);LocalStoragegainslocal_path(key).
Changed¶
kloudmint scaffoldskips the new FileExport model and points toFileExportAdminBase.
0.6.1¶
Added¶
kloudmint scaffold(newkloudmintcommand): reads your SQLAlchemy models and writes a first-draft adminviews.py--ChildOf/Relatedfor owned child tables,SoftDeleteMixinfordeleted_at, search columns, default sort, andGENERATED_VIEWS/RESOURCESlists to register and seed. Sensitive columns (passwords, tokens, ...) are left out; anything it can't decide safely becomes a# TODO. Preview by default,--writeto create the file, never overwrites. Replaces hand-writing the 70% of a new project'sviews.pythat is lists, search and parent/child wiring. See Scaffold.md.
Fixed¶
ChildOf.parent_fknow accepts the column name (parent_fk = "creator_id"). The previously documented form, a column object (parent_fk = Job.creator_id), crashed view registration withUnmappedInstanceError, so a model with two foreign keys to the same parent could not useChildOfat all.ChildOfnow joins the parent along the chosen relationship in its list/count queries (used to hide children of soft-deleted parents). It joined the bare table, which SQLAlchemy rejects withAmbiguousForeignKeysErrorwhen the child has two foreign keys to the same parent.
0.5.0¶
Added¶
Capabilities.md: one page listing everything kloudmint can do, by behaviour (permission grid, protected roles, "a user can't delete themselves", soft delete, uploads, audit, ...), with the hand-written code each feature replaces and the version it arrived in. Generated from_docs/features.jsonbyscripts/docs_tools.py; tests fail if it, the feature list or the docs fall out of step with the code.- Docs bundled in the wheel (
kloudmint/_docs/: the guides,Capabilities.md,features.json,CHANGELOG.md), so an AI assistant or a developer can read the docs for exactly the installed version fromsite-packages.ReleaseProcedure.mdis deliberately not included. - Docs site (MkDocs Material on GitHub Pages) with
llms.txt/llms-full.txt.
Changed¶
requires-pythonis now>=3.10(was>=3.9).import kloudmintalready failed on 3.9 (relations.pyevaluatesX | Noneat import time), so this only makes the declared floor honest: pip now refuses to install it on 3.9 instead of installing something that cannot be imported. Projects still on 3.9 must stay on a release that supports it or upgrade Python.
Fixed¶
- Depend on
sqlalchemy[asyncio](addsgreenlet). With SQLAlchemy 2.1 a fresh install failed onimport kloudmintbecause sqladmin needs greenlet at import time.
0.4.2¶
Merge of staging tag v0.4.1 with related-records building blocks (0.4.0).
Added¶
- Everything in 0.4.0 and 0.4.1 below, combined on one branch.
ChildOf"New" button script preserved in the mergedlayout.html.
0.4.1¶
Tagged release on staging (v0.4.1).
Added¶
- List UI: overridden
layout.html,list.html, and_macros.htmlfor breadcrumbs, page title bar, pinned sidebar logout, and client-side per-column header filters (cf_<column>=<text>). - Column filters:
column_filters.pywith automaticRBACModelView.list_query()integration and auto-sortable plain columns inRBACModelView.__init__.
Changed¶
- Sidebar/list-table polish: dedupe single-segment breadcrumb, fix collapsed-sidebar content gap, column show/hide toggle, lighter header/selected-row colors, darker sidebar, tighter column widths and row height, selected-row link contrast fix.
0.4.0¶
Added¶
- Related records:
ChildOf,Related,RelatedRecordsMixinfor parent/child admin tables with multi-select parent filters, related links (optional counts) on the parent list, single-id parent prefill on create, and Save redirect back to a filtered list (sqladmin 0.31 query preservation + layout "New" button script). - Custom page RBAC:
RBACBaseViewwith automaticis_accessible/is_visiblegating andKloudmint.register()support;get_all_actions()for permission grid extras likeuse. - Filters:
MultiSelectForeignKeyFilter,MultiSelectValueFilter,ExactValueFilterwith kloudmint filter templates. - Mixins:
SoftDeleteMixin,DynamicChoicesMixin,FileUploadMixin+FileSpec. - Storage:
StorageBackendprotocol,LocalStorage,S3Storage(optionals3extra);Kloudmint(..., storage=)propagates to upload mixins. - Formatters:
kloudmint.formattersfactories (badge,bool_badge,date,pre,json_pretty,link,action_links,file_preview,expiry_badge). - Audit:
create_activity_log_model,KloudmintAuditBackend,AuditDiffMixin,ActivityLogAdminBase. - Detail pages:
DetailPage,Section, auto-mounted fromdetail_pages=on a model view. - Engine:
hide_empty_categories,audit_backend,activity_log_model;register()handlesRBACBaseViewand detail pages. - Docs: docs/BuildingBlocks.md.
Changed¶
- Requires sqladmin>=0.31,<0.32 (was
>=0.16.0). RelatedRecordsMixin.get_list_valueis async (matches sqladmin 0.31 async templates).AuditDiffMixin.after_model_changereturnssuper()'s result (preserves future redirect hooks).- Sidebar empty categories are hidden by default (
hide_empty_categories=True).
Known limitations¶
ChildOfdoes not prefill when the filter query carries multiple ids.- "Save and add another" on a filtered child create opens an unfiltered create form.
can_exportstill cannot be gated per-role (sqladmin has no async export hook).