LESPY
Overview
A small and robust micro Python framework for building simple and solid web apps.
Quick start
DEMO: You can see a working examples here.
Instalation
Via PIP (recommended):
pip install lespy
Via Poetry:
poetry add lespy
Via GitHub:
git clone https://github.com/natanfeitosa/lespy.git && cd lespy && pip install .
Creating a simple app
In your main.py file import the App class from lespy
from lespy import App
Now instantiate the App class and pass it a name
app = App('first_app')
Now we need to create a route with the GET method
@app.get('/')
def home(request):
return 'Hello world'
Yes, it's that simple.
Running the app
With the simple server included:
This is a simple implementation, do not use for production environment.
First import the run method
from lespy import run
Now let's use the method passing the App instance
if __name__ == '__main__':
run(app)
Now, just run our python file, and if everything went well, just access in http://localhost:3000.
With Gunicorn:
$ gunicorn main:app
Metadata
Release files for Lespy 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| Lespy-0.1.2.tar.gz | 15.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| Lespy-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.0 kB
Release files / Lespy-0.1.2.tar.gz
| Download URL | Lespy-0.1.2.tar.gz |
|---|---|
| Size | 15.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
15c266c064c208b5ddb944027ea6ab7b8e9223b8ba583033b28378154fdac57c
|
|
BLAKE2b-256 checksum How to use checksums |
ec784fad974117379029817c4d43fbaeddd7dacc0dedfda9c42098643967c213
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.0
|
Release files / Lespy-0.1.2-py3-none-any.whl
| Download URL | Lespy-0.1.2-py3-none-any.whl |
|---|---|
| Size | 20.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
899488ed5d0c82373c0fc1b8b4bc5a7b983fd47c553583efd926f13053b21a52
|
|
BLAKE2b-256 checksum How to use checksums |
a93297c797d5dcf8bb8b5ddf85893a3265f1cff907684236f0e6c48a35c33828
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.0
|