Skip to main content

Lemon Logo

Status GitHub Issues GitHub Pull Requests License Downloads


An Experimental Full-Stack Framework For Python.

📝 Table of Contents

🧐 About

A full-stack framework built with python. The library is shipped with Bootstrap 5 for your styling needs.

Docs: https://sas2k.github.io/Lemon

Discord Server: https://discord.gg/Dw6hCp3usF

Features:

  • UI Library (Development)
  • A full Back-end Capabilities
  • Django style route adding (See examples/django-routing.py)
  • An ORM and migrations feature (check-out -> examples/Lemon-App) (ORM supports strings only for now.)
  • React like syntax
  • middleware api
  • a terminal app to create app [create-lemon-app < app-name >]
  • Component Generator [https://github.com/Sas2k/Lemon-CLI]
  • Reactivity (See examples/reactivity-example)
  • Testing (See examples/Tests.py)
  • Custom Exception Handler (examples/exception-handler.py)
  • Blueprint Routing (examples/Lemon-App)

If you want to have live reloading try uvicorn: https://www.uvicorn.org/

If you don't think this isn't capable to handle anything check these out!
https://portfolio-sas2k.vercel.app/ | https://github.com/Sas2k/portfolio
https://github.com/Sas2k/HTTP-Blog

🗒 To-Do

Legend:
[x] - checked [*] - doing [ ] - Not Done

  • Form Data Handling (Currently being Developed)
  • States (Currently being Developed)

🏁 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.server import Server

app = Server(static_dir=None) 
Root = Component("Home Page", None, None) #Root component

class Home(Component):
    "Home Page Component"
    name = "Home"
    
    def item(props: dict): 
        "The Item Function: where the html and props are passed"
        return """
            <h1>Hello World!</h1>
        """

Root.add([Home])

@app.route("/") #Route decorator
def index(request, response):
    home_page = Root.render("<Home/>")
    response.text = home_page

app.run() #runs the app

Folder Structure for apps

Here is the folder structure I recommend. (you can create your own structure based on your needs)

App/
    - src/
        - Components/
            - __init__.py
            - components.py
        - Models/
            - __init__.py
            - models.py
        - Routes/
            - __init__.py
            - routes.py
        - Public/
            - css/
                - style.css
            - js/
                - script.js
        - app.py
        - base.py
    - README.md

Installing

To install with,

pip: pip install Lemon-Library

⛏️ Built Using

✍️ Authors

See also the list of contributors who participated in this project.

Metadata

Release files for Lemon-Library 1.3.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Lemon-Library 1.3.9
File Size Uploaded
Lemon-Library-1.3.9.tar.gz 13.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Lemon-Library 1.3.9
File Interpreter ABI Platform
Lemon_Library-1.3.9-py3-none-any.whl Python 3 none any Details

Total release size: 28.8 kB

Release files / Lemon-Library-1.3.9.tar.gz

Download URL Lemon-Library-1.3.9.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e4ca90aee1ae2b5a08dd9a4e42db24f08066a09a06ada416c813e5513175f2e7
BLAKE2b-256 checksum
How to use checksums
1d712bc7d9563d86636a79160ab1e123a8782052311c0ab52027540c9f7b68d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.0

Release files / Lemon_Library-1.3.9-py3-none-any.whl

Download URL Lemon_Library-1.3.9-py3-none-any.whl
Size 15.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ecf76d8a573201756c3e1affc3b5b33eb471f35cbfae2f64f5e954da7f44e11d
BLAKE2b-256 checksum
How to use checksums
fa99484f271b7a90205871155dfdc8b231639784538de6f500d159d69b0f3ba8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.0

Release history Release notifications | RSS feed

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page