An experimental Full-Stack Framework for Python
Project description
Lemon 🍋
An Experimental Full-Stack Framework For Python. (Still in Development)
📝 Table of Contents
🧐 About
A framework that can generate html with python code and have capabilities of a Web Server. The library is shipped with Bootstrap 5 for your styling needs.
🗒 To-Do
- Add styling options
- Models (Databases)
- API
- Docs
- Get to V1.0.0
🏁 Getting Started
Docs Are still in Development Try heading over to /examples
for some idea.
Here is an example below
from Lemon.components import Component
from Lemon.server import Server
app = Server()
Root = Component("Home Page") #Root component: The component where your other components are rendered: The name inside is the name displayed on the tab
class Home(Component):
"Home Page Component"
name = "Home" # Name of the component : REQUIRED
components = {} # components dictionary : REQUIRED
def item(props: dict): #item function where the renderer calls to get your html and other code
return """
<h1>Hello World!</h1>
"""
Root.add(Home) #Add the Home component to the Root component
@app.route("/") #Route decorator
def index(request, response):
home_page = Root.render("<Home/>")
response.text = home_page
app.run() #runs the app
Installing
To install with,
pip: pip install Lemon-Library
⛏️ Built Using
✍️ Authors
- @Sas2k - Idea & Initial work
See also the list of contributors who participated in this project.
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
Lemon-Library-2.0.1b0.tar.gz
(4.9 kB
view hashes)