Skip to main content

An experimental Full-Stack Framework for Python

Project description

Lemon Logo

Lemon 🍋

Status GitHub Issues GitHub Pull Requests License Pypi Monthly Downloads


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.

Features:

  • UI Library (Development)
  • A full Back-end Capabilities except ORM( try using sqlite or something like that)
  • React like syntax
  • middleware api

🗒 To-Do

  • Form Data Handling
  • complex front-end stuff
  • 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(static_dir=None) #set the static_dir to none if there is no .css or .js files =The Default Folder for static is public=
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
    
    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/>") #Note: always use components in Root.render never HTML
    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


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-3.1.0b0.tar.gz (8.6 kB view details)

Uploaded Source

File details

Details for the file Lemon-Library-3.1.0b0.tar.gz.

File metadata

  • Download URL: Lemon-Library-3.1.0b0.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.0

File hashes

Hashes for Lemon-Library-3.1.0b0.tar.gz
Algorithm Hash digest
SHA256 b7d403d2c2e7b8efbff1ed6fa35de0668bd9bce70d7b93d309f57b6be632f9c6
MD5 d374d37f814d5ce7b34e37f9f5e0406b
BLAKE2b-256 41e7d6a4e255bb622b3e5bb8599b42a5087c2ea172fc22388b8ea6d7c71c3941

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