Skip to content

Commit

Permalink
Add example app
Browse files Browse the repository at this point in the history
  • Loading branch information
sodre committed May 1, 2020
1 parent 8139b38 commit 2dfecf2
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
9 changes: 9 additions & 0 deletions examples/chalice/.chalice/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"version": "2.0",
"app_name": "chalice",
"stages": {
"dev": {
"api_gateway_stage": "api"
}
}
}
2 changes: 2 additions & 0 deletions examples/chalice/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.chalice/deployments/
.chalice/venv/
21 changes: 21 additions & 0 deletions examples/chalice/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import json

from chalice import Chalice
from environs import Env

from zeroae.goblet import chalice as goblet

# Load Configuration Options
env: Env = Env()
env.read_env()
goblet.configure(env)

# Register the Application
app = Chalice(app_name="chalice")
app.experimental_feature_flags.update(["BLUEPRINTS"])
app.register_blueprint(goblet.bp, name_prefix="gh")


@goblet.bp.on_gh_event("ping")
def ping(payload):
app.log.info(json.dumps(payload))
1 change: 1 addition & 0 deletions examples/chalice/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
zeroae-goblet

0 comments on commit 2dfecf2

Please sign in to comment.