Giter Club home page Giter Club logo

lemon's Introduction

Lemon Logo

Status GitHub Issues GitHub Pull Requests License Downloads


An Experimental Full-Stack Framework For Python. (Still in Development)

๐Ÿ“ 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/wg239Cpf

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 import Component
from Lemon.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.

lemon's People

Contributors

sas2k avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.