A micro HTTP framework for the Memphis Python engine.
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()You can run an Enid app on either CPython or Memphis.
memphis test_app.py
# or
python3 test_app.pyAnd test with:
curl localhost:8080