Skip to content

Instantly share code, notes, and snippets.

@I159
Created May 31, 2019 16:54
Show Gist options
  • Save I159/2cf5a743923d2a9cad907eaad15b0563 to your computer and use it in GitHub Desktop.
Save I159/2cf5a743923d2a9cad907eaad15b0563 to your computer and use it in GitHub Desktop.
"""Infrastructure level of the application.
No logic is implemented here, only data retrieved from requests
passed to a controllers level. This module is not for testing,
a framework is trusted since it is ouf of our responsibility.
"""
from my_application.controllers_level import implemented_use_cases
import chalice
app = chalice.Chalice(app_name="MyApplication")
@app.route("/handler", methods=["POST"], conntent_types=["application/json")
def handler_endpoint() -> dict:
handler = implemented_use_cases.HttpSpecificUseCaseA()
return handler.handle(app.current_request.json_body)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment