https://github.com/sas2k/lemon
A Full-Stack Framework For Python
https://github.com/sas2k/lemon
framework full-stack hacktoberfest hacktoberfest-accepted hacktoberfest2023 lemon python web-framework
Last synced: 10 months ago
JSON representation
A Full-Stack Framework For Python
- Host: GitHub
- URL: https://github.com/sas2k/lemon
- Owner: Sas2k
- License: mit
- Created: 2022-09-10T12:28:06.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-18T13:16:54.000Z (about 2 years ago)
- Last Synced: 2025-06-11T20:27:37.586Z (10 months ago)
- Topics: framework, full-stack, hacktoberfest, hacktoberfest-accepted, hacktoberfest2023, lemon, python, web-framework
- Language: Python
- Homepage: https://sas2k.github.io/Lemon
- Size: 1010 KB
- Stars: 19
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: contributing.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[]()
[](https://github.com/Sas2k/Lemon/issues)
[](https://github.com/Sas2k/Lemon/pulls)
[](/LICENSE)
[](https://pepy.tech/project/lemon-library)
---
An Experimental Full-Stack Framework For Python.
## 📝 Table of Contents
- [📝 Table of Contents](#-table-of-contents)
- [🧐 About ](#-about-)
- [🗒 To-Do ](#-to-do-)
- [🏁 Getting Started ](#-getting-started-)
- [Folder Structure for apps](#folder-structure-for-apps)
- [Installing](#installing)
- [⛏️ Built Using ](#️-built-using-)
- [✍️ Authors ](#️-authors-)
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://sas2ks-old-portfolio.vercel.app/ | https://github.com/Sas2k/Old-Portfolio
> https://github.com/Sas2k/HTTP-Blog
> Legend:
> [x] - checked
> [\*] - doing
> [ ] - Not Done
- [ ] Form Data Handling (Currently being Developed)
- [ ] States (Currently being Developed)
Docs Are still in Development Try heading over to `/examples` for some idea.
Here is an example below
```python
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 """
Hello World!
"""
Root.add([Home])
@app.route("/") #Route decorator
def index(request, response):
home_page = Root.render("")
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`
- [Python](https://python.org)
- [Waitress](https://pypi.org/project/waitress/)
- [WebOb](https://pypi.org/project/WebOb/)
- [Parse](https://pypi.org/project/parse)
- [whitenoise](https://pypi.org/project/whitenoise/)
- [requests](https://pypi.org/project/requests/)
- [pytest](https://pypi.org/project/pytest/)
- [requests (wsgi-adapter)](https://pypi.org/project/requests-wsgi-adapter/)
- [black](https://pypi.org/project/black/)
See also the list of [contributors](https://github.com/Sas2k/Lemon/contributors) who participated in this project.
