Skip to content

Commit 2dfecf2

Browse files
committed
Add example app
1 parent 8139b38 commit 2dfecf2

File tree

4 files changed

+33
-0
lines changed

4 files changed

+33
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"version": "2.0",
3+
"app_name": "chalice",
4+
"stages": {
5+
"dev": {
6+
"api_gateway_stage": "api"
7+
}
8+
}
9+
}

examples/chalice/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.chalice/deployments/
2+
.chalice/venv/

examples/chalice/app.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import json
2+
3+
from chalice import Chalice
4+
from environs import Env
5+
6+
from zeroae.goblet import chalice as goblet
7+
8+
# Load Configuration Options
9+
env: Env = Env()
10+
env.read_env()
11+
goblet.configure(env)
12+
13+
# Register the Application
14+
app = Chalice(app_name="chalice")
15+
app.experimental_feature_flags.update(["BLUEPRINTS"])
16+
app.register_blueprint(goblet.bp, name_prefix="gh")
17+
18+
19+
@goblet.bp.on_gh_event("ping")
20+
def ping(payload):
21+
app.log.info(json.dumps(payload))

examples/chalice/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
zeroae-goblet

0 commit comments

Comments
 (0)