Skip to main content

An experimental Full-Stack Framework for Python

Project description

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
  • States

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

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-1.3.6.tar.gz (12.7 kB view details)

Uploaded Source

File details

Details for the file Lemon-Library-1.3.6.tar.gz.

File metadata

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

File hashes

Hashes for Lemon-Library-1.3.6.tar.gz
Algorithm Hash digest
SHA256 28e41799cb966da68ea507690ea04fc3f7f35a1c2f4c8f3e1c1ae1f4fa62358a
MD5 3fcbf61711021ae453adfb3aa9bb28fc
BLAKE2b-256 e12eff5a74777f0f6b942fbf711ef5f0d79aec8abdbf2eafee09a1092692ad05

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