Simplify web framework for build web applications with Markdown
Project description
lightdown
A minimal Python web framework for building simple websites using Markdown and routing.
Features
- Easy routing system
- Render
.mdfiles directly as HTML - Pass context variables into Markdown templates
- Static file support (
/static) - Works with both Markdown (
.md) and HTML (.html) files
Installation
pip install lightdown
Quick Start
from lightdown.core import App
app = App()
@app.route("/")
def home():
return ("index.md", {"title": "Hoşgeldiniz", "message": "Bu bir mini framework!"})
if __name__ == "__main__":
app.run()
Example markdown/index.md
# {{ title }}
This is a simple page rendered with **Markdown**.
Message: {{ message }}
When you start the server and visit http://127.0.0.1:8000/,
you will see your Markdown page rendered as HTML.
Static Files
Place your static files (CSS, JS, images) inside the static/ folder.
They can be accessed at /static/filename.css.
Notes
- Works with
.mdtemplates (recommended). - Can also be used with
.htmltemplates.
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 lightdown-0.1.0.tar.gz.
File metadata
- Download URL: lightdown-0.1.0.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
151372e99bf176e33006c17ee9d07c8cefcd01d374abfaf2d6d790530006acbe
|
|
| MD5 |
c9ec2997512cd9c7b5a7c935e660ba30
|
|
| BLAKE2b-256 |
626c2ec8e1876ef39f36e1970b63c294e6e71ba8c7962cabc362988c1ae37ce1
|
File details
Details for the file lightdown-0.1.0-py3-none-any.whl.
File metadata
- Download URL: lightdown-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5fa17447e79c3c748a62e3fd05698d4214aa0ff05c145880dffe11d0b5a0bf3
|
|
| MD5 |
d4f26140aa744a96ba54029d52ce527a
|
|
| BLAKE2b-256 |
c3c12f0e61adf9a7b3d4385bc06ab216a31b968ab484b0127ad058526375cc34
|