Skip to content

Commit 990e44f

Browse files
committed
Updates yaml dependency and adds code examples to readme
1 parent e315e25 commit 990e44f

File tree

4 files changed

+27
-24
lines changed

4 files changed

+27
-24
lines changed

README.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,37 @@ Deployment and application code adaptors are being added for the following:
1818
| Google Kubernetes Engine | `gcloud` & `kubectl` | |
1919

2020

21-
| Platform | Adaptor | Status |
21+
| Platform | Adaptor | Code/Config |
2222
|--------------------------|-----------------------|:----------------------:|
23-
| AWS Lambda Python <= 3.6 | [Flask-Lambda](https://github.com/sivel/flask-lambda) | :heavy_check_mark: |
24-
| AWS Lambda Python >= 3.6 | [Flask-Lambda-Python36](https://github.com/techjacker/flask-lambda) | :heavy_check_mark: |
23+
| Local Development | None | [:floppy_disk:](run.py) |
24+
| AWS Lambda Python >= 3.6 | [Flask-Lambda-Python36](https://github.com/techjacker/flask-lambda) | [:floppy_disk:](run_lambda.py)|
25+
| AWS Lambda Python <= 3.6 | [Flask-Lambda](https://github.com/sivel/flask-lambda) | [:floppy_disk:](run_lambda.py) |
2526
| Azure Functions | | |
2627
| Google Cloud Functions | | |
2728

29+
-----------------------------------------------------------
30+
## Setup
31+
32+
33+
#### 1. Create `.env` file and update contents
34+
This is used to set the environment variables required for deployment and local development.
35+
```
36+
$ cp .env.example .env
37+
$ vim .env
38+
```
39+
40+
#### 2. Create a virtualenv then install requirements:
41+
```
42+
$ make env
43+
$ source env/bin/activate
44+
$ make deps
45+
```
2846

2947
-----------------------------------------------------------
3048
## Example Usage
3149

3250
#### 1. Set Environment
33-
Ensure you have the necessary environment variables set (see [setup instructions](#setup) above).
51+
Ensure you have created your virtualenv and have the necessary environment variables set (see [setup instructions](#setup) above).
3452
```
3553
$ source env/bin/activate
3654
$ source .env
@@ -59,7 +77,7 @@ GET /artists
5977
## AWS Lambda
6078

6179
### Terraform Deployment
62-
Ensure you have the necessary environment variables set (see [setup instructions](#setup) above).
80+
Ensure you have created your virtualenv and have the necessary environment variables set (see [setup instructions](#setup) above).
6381

6482
##### Setup
6583
Create terraform state bucket.
@@ -91,24 +109,6 @@ GET artists
91109
```
92110

93111

94-
-----------------------------------------------------------
95-
## Developer Setup
96-
Set the environment variables required for deployment and local development.
97-
98-
#### 1. Create `.env` file needed for deployment and edit contents.
99-
```
100-
$ cp .env.example .env
101-
$ vim .env
102-
$ source .env
103-
```
104-
105-
#### 2. Create a virtualenv then install requirements:
106-
```
107-
$ make env
108-
$ source env/bin/activate
109-
$ make deps
110-
```
111-
112112
-----------------------------------------------------------
113113
## Test
114114
```

requirements-to-freeze.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
autopep8
22
flask
3+
# for python <= 3.5 use flask-lambda pacakge
34
flask-lambda-python36
45
http-prompt
56
pep8

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
aspy.yaml==1.0.0
1+
aspy.yaml==1.1.0
22
attrs==17.4.0
33
autopep8==1.3.5
44
cached-property==1.4.2

run_lambda.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# for python <= 3.5 update your requirements-to-freeze.txt
2+
# to use the flask-lambda pip pacakage
13
from flask_lambda import FlaskLambda
24
from app import create_app
35

0 commit comments

Comments
 (0)