https://github.com/funkybob/paws
Python helpers for using AWS API Gateway / Lambda "serverless"
https://github.com/funkybob/paws
api-gateway aws lambda python serverless
Last synced: 12 months ago
JSON representation
Python helpers for using AWS API Gateway / Lambda "serverless"
- Host: GitHub
- URL: https://github.com/funkybob/paws
- Owner: funkybob
- License: bsd-3-clause
- Created: 2016-11-20T19:19:36.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-01-19T21:40:51.000Z (about 7 years ago)
- Last Synced: 2025-03-26T04:41:23.261Z (about 1 year ago)
- Topics: api-gateway, aws, lambda, python, serverless
- Language: Python
- Size: 40 KB
- Stars: 13
- Watchers: 2
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# paws
Python helpers for using AWS API Gateway / Lambda "serverless"
*heavily WIP*
## Example
```
from paws import views
class IndexView(views.View):
def get(request):
return response.Response('Hello, world!', headers={'Content-Type': 'text/plain'})
index = IndexView()
```
## Setup
When using this framework, there is one assumption made:
- In your API Gateway you have set "multipart/form-data" as a Binary mode
content type.
## Testing
To help with testing, `paws.wsgi` helps implement a WSGI to API-Gateway/Lambda
integration gateway.
```
from paws import wsgi
from .views import index
application = wsgi.Application([
(r'^/$', index),
])
```
Any named regex groups will be passed as `\**kwargs` to dispatch.