Skip to content

emmett-framework/emmett55

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Emmett55

Emmett55 is a Python micro web framework designed with simplicity in mind.

from emmett55 import App, request, response
from emmett55.tools import service, requires

app = App(__name__)

def is_authenticated():
    return request.headers.get("api-key") == "foobar"
    
def not_authorized():
    response.status = 401
    return {"error": "not authorized"}

@app.route("/", methods='get')
@requires(is_authenticated, otherwise=not_authorized)
@service.json
async def index():
    return {"message": "hello world"}

Compared with Emmett

Emmett55 is based on Emmett and shares the following features with it:

Consequentially, Emmett55 doesn't include:

Typical use-cases for picking Emmett55 over Emmett are:

  • the lack of need of the upper-mentioned missing features
  • the desire to use different libraries in place of the Emmett components, like SQLAlchemy or Jinja

Documentation

While we're still in the process of developing Emmett55 documentation, the Emmett one can be examined – with the caviat to replace emmett with emmett55 when mentioned and keep in mind the upper-mentioned list of non-included features.

License

Emmett55 is released under the BSD License.