Flask scaffold engine
Project description
Lombik
A scaffold engine for Flask
Lombik exists to remove the boring bits and to get you right into the developing zone. At it's core it was created to build tools faster.
It leans heavily into a hypermedia-first approach, using Jinja2, template filters, HTMX, and Tailwind to keep logic close to the UI and reduce frontend complexity.
What you get out of the box
-
Structure Each module created comes with a routes.py to define pages, queries.py to serve data from the database and actions.py to interact with the database.
routes.pywould call the main page for exampletemplates/core/index.htmlqueries.pyreads data and in most cases displays it. Most commonly htmx get endpoints are stored here and are served fromtemplates/core/partials/active_users.htmlinside index.actions.pymodifies data in the database. All post, put, patch and delete routes live here. Creating a new module is easily done from the command linemodule settingswhich will create a new folder for settigns inside blueprints. -
To be continued..
Template filters (the fun part)
Lombik ships with a set of Jinja filters designed to keep your templates clean and expressive.
Dates & time handling
Instead of formatting timestamps in Python, you do it directly in the template:
{{ created_at | localtime }} → 2026-05-19 05:15
{{ created_at | onlydate }} → 2026-05-19
{{ created_at | onlytime }} → 05:15
{{ created_at | shortdatetime }} → May 19 05:15
{{ created_at | timesince }} → Just now // 2 minutes ago // 21 hours ago etc.
Everything defaults to localtime, meaning UTC from the backend is automatically shown in the user’s timezone.
Lombik expects the user’s timezone to be available via g. To change: lombik/filters/_localize.
String helpers
Make frontend less painful
{{ g.user.full_name | proper }}
john_doe → John Doe
{{ g.user.first_name | possessive }}
john → john's
lucas → lucas'
You can chain them:
{{ g.user.full_name | proper | possessive }}
john_doe → John Doe's
You can also normalize user input:
{{ user_input | normalize }}
Hello, world → hello_world email@example.com → email_example_com
Installation
pip install lombik
Create a project
lombik createapp myappcd myappflask run --debug
This generates a full application structure so you can start immediately.
Add modules
lombik module new_module
Creates a new module in blueprints that is registered automatically in app.py with the default file structure and a few core imports. The following names are prohibited by default: "core", "auth".
Database setup
Lombik uses MySQL by default.
- Update your
.envwith your database credentials (at least dev for development) - Initialize the database:
flask initdb
- Create your admin user:
flask superuser
After that, you can log in and start building further. Don't forget to from lombik.wrappers import login_required to add @login_required to all routes that you want to protect.
Note: the auth system is intentionally simple. It’s meant for development scaffolding, not necessarily production security.
Models
When adding new models, be sure to register them:
models/__init__.py
Otherwise they won’t be picked up.
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
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 lombik-0.1.7.tar.gz.
File metadata
- Download URL: lombik-0.1.7.tar.gz
- Upload date:
- Size: 21.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf7d14f5eac9416a162b94ba15eb2f5709475382add0cfd809743364f0f4e09a
|
|
| MD5 |
72c8d93f5b57ccf8c2669bda1806233d
|
|
| BLAKE2b-256 |
46fd177bd8d3479181180e5274f99c890a7f126d3022eb4e741e16c9b0aa5fd7
|
File details
Details for the file lombik-0.1.7-py3-none-any.whl.
File metadata
- Download URL: lombik-0.1.7-py3-none-any.whl
- Upload date:
- Size: 30.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2b9ec095627e7feef0ef34d2f76edfd933ae7cce88d9c80d86b2cf8e3ac3920
|
|
| MD5 |
ef0db5f57a7b9c1f43b411489b33831a
|
|
| BLAKE2b-256 |
5dcca465247a20d2901dda97f7bce87cda4426e39f28861333d0a5631b96ea13
|