A small and robust micro Python framework for building simple and solid web apps.
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file Lespy-0.1.2.tar.gz
.
File metadata
- Download URL: Lespy-0.1.2.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15c266c064c208b5ddb944027ea6ab7b8e9223b8ba583033b28378154fdac57c |
|
MD5 | 8016c71dc2d4d12c30883c400c564672 |
|
BLAKE2b-256 | ec784fad974117379029817c4d43fbaeddd7dacc0dedfda9c42098643967c213 |
File details
Details for the file Lespy-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: Lespy-0.1.2-py3-none-any.whl
- Upload date:
- Size: 20.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 899488ed5d0c82373c0fc1b8b4bc5a7b983fd47c553583efd926f13053b21a52 |
|
MD5 | ed124ec4e9a654bc33080c1a466ebf66 |
|
BLAKE2b-256 | a93297c797d5dcf8bb8b5ddf85893a3265f1cff907684236f0e6c48a35c33828 |