项目作者: jordaneremieff

项目描述 :
Google Cloud Functions support for ASGI
高级语言: Python
项目地址: git://github.com/jordaneremieff/grevillea.git
创建时间: 2019-11-10T13:06:09Z
项目社区:https://github.com/jordaneremieff/grevillea

开源协议:MIT License

下载


grevillea

THIS PROJECT IS CURRENTLY UNMAINTAINED

Google Cloud Functions support for ASGI.

Requirements

Python 3.7

Installation

  1. pip3 install grevillea

Example

  1. from grevillea import Grevillea
  2. async def app(scope, receive, send):
  3. await send(
  4. {
  5. "type": "http.response.start",
  6. "status": 200,
  7. "headers": [[b"content-type", b"text/plain; charset=utf-8"]],
  8. }
  9. )
  10. await send({"type": "http.response.body", "body": b"Hello, world!"})
  11. handler = Grevillea(app)