Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 681 Bytes

File metadata and controls

30 lines (24 loc) · 681 Bytes

enid

A micro HTTP framework for the Memphis Python engine.

Example

Enid's usage is inspired by Flask, and designed to work within the constraints of the Memphis engine. (See the supported features.)

from enid import App, Response

app = App()

@app.get("/")
def home(req):
    return Response.text("Hello from Enid (powered by Memphis)")

if __name__ == "__main__":
    app.run()

Running

You can run an Enid app on either CPython or Memphis.

memphis test_app.py
# or
python3 test_app.py

And test with:

curl localhost:8080