Skip to main content

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.py would call the main page for example templates/core/index.html queries.py reads data and in most cases displays it. Most commonly htmx get endpoints are stored here and are served from templates/core/partials/active_users.html inside index. actions.py modifies data in the database. All post, put, patch and delete routes live here. Creating a new module is easily done from the command line module settings which 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

  1. lombik createapp myapp
  2. cd myapp
  3. flask run --debug

This generates a full application structure so you can start immediately.


Add modules

  1. 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.

  1. Update your .env with your database credentials (at least dev for development)
  2. Initialize the database:

flask initdb

  1. 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

lombik-0.1.5.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

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

lombik-0.1.5-py3-none-any.whl (23.2 kB view details)

Uploaded Python 3

File details

Details for the file lombik-0.1.5.tar.gz.

File metadata

  • Download URL: lombik-0.1.5.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for lombik-0.1.5.tar.gz
Algorithm Hash digest
SHA256 7c5322fd9d24bae1adc6181e964a0c56bb596aaa7dcd590482ab6fba0d0a3a58
MD5 854d0f2359838683734d9f87d653edab
BLAKE2b-256 4f01f8365ab77bc53a9554bf2ea3a8b8099cb45b83f708e16c4b25784892faaa

See more details on using hashes here.

File details

Details for the file lombik-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: lombik-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 23.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for lombik-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0a829703e516dfe3940bc0619b4a4419d7a2dc85708d77e999027081e4fbfc6f
MD5 17d26ff5df2db9533be9175bf7b81867
BLAKE2b-256 29c361178a730bcfcf61e91cb0b21b85e1db87673caa97652b0ea37f4b7463cc

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