All Projects → turokg → yappa

turokg / yappa

Licence: MIT license
Serverless deploy of python web-apps @yandexcloud

Projects that are alternatives of or similar to yappa

Moleculer Web
🌍 Official API Gateway service for Moleculer framework
Stars: ✭ 198 (+247.37%)
Mutual labels:  api-gateway
Apicast
3scale API Gateway
Stars: ✭ 225 (+294.74%)
Mutual labels:  api-gateway
kong-plugin-url-rewrite
Kong API Gateway plugin for url-rewrite purposes
Stars: ✭ 43 (-24.56%)
Mutual labels:  api-gateway
Sample Zuul Filters
Samples of custom Zuul 1 filters for use in Spring Cloud Netflix
Stars: ✭ 201 (+252.63%)
Mutual labels:  api-gateway
Goku Api Gateway
A Powerful HTTP API Gateway in pure golang!Goku API Gateway (中文名:悟空 API 网关)是一个基于 Golang开发的微服务网关,能够实现高性能 HTTP API 转发、服务编排、多租户管理、API 访问权限控制等目的,拥有强大的自定义插件系统可以自行扩展,并且提供友好的图形化配置界面,能够快速帮助企业进行 API 服务治理、提高 API 服务的稳定性和安全性。
Stars: ✭ 2,773 (+4764.91%)
Mutual labels:  api-gateway
Krakend Ce
KrakenD Community Edition. Make your binary of KrakenD API Gateway
Stars: ✭ 245 (+329.82%)
Mutual labels:  api-gateway
Product Microgateway
A cloud native, developer centric and decentralized API gateway for microservices
Stars: ✭ 194 (+240.35%)
Mutual labels:  api-gateway
blog-fastapi-vuejs
Simple project that I write using fastapi, motor, and umongo for the backend. VueJS on the frontend
Stars: ✭ 76 (+33.33%)
Mutual labels:  fastapi
Dgate
an API Gateway based on Vert.x
Stars: ✭ 222 (+289.47%)
Mutual labels:  api-gateway
fastapi-debug-toolbar
A debug toolbar for FastAPI.
Stars: ✭ 90 (+57.89%)
Mutual labels:  fastapi
Yoyo
A dead simple comment engine built on top of AWS lambda and React, alternative comment service to Disqus.
Stars: ✭ 210 (+268.42%)
Mutual labels:  api-gateway
Apilogs
Easy logging and debugging for Amazon API Gateway and AWS Lambda Serverless APIs
Stars: ✭ 216 (+278.95%)
Mutual labels:  api-gateway
gateway
A high-performance API Gateway with middlewares, supporting HTTP and gRPC protocols.
Stars: ✭ 520 (+812.28%)
Mutual labels:  api-gateway
Aws Mobile React Native Starter
AWS Mobile React Native Starter App https://aws.amazon.com/mobile
Stars: ✭ 2,247 (+3842.11%)
Mutual labels:  api-gateway
ms-fastapi-template
This project was built as a result of a deepening of the studies discussed on the blog farlley.com with a greater focus on Domain Driven Design (DDD) architecture. In this work you will find a simple template for creating microservices, as well as a use case (which will still be implemented according to the Roadmap found in this same document) a…
Stars: ✭ 31 (-45.61%)
Mutual labels:  fastapi
Serverless Sinatra Sample
Demo code for running Ruby Sinatra on AWS Lambda
Stars: ✭ 195 (+242.11%)
Mutual labels:  api-gateway
Aspnetcore.proxy
ASP.NET Core Proxies made easy.
Stars: ✭ 234 (+310.53%)
Mutual labels:  api-gateway
fastdash
FastDash = FastAPI + DashBoard.
Stars: ✭ 23 (-59.65%)
Mutual labels:  fastapi
FRDP
Boilerplate code for quick docker implementation of REST API with JWT Authentication using FastAPI, PostgreSQL and PgAdmin ⭐
Stars: ✭ 55 (-3.51%)
Mutual labels:  fastapi
prometheus-fastapi-instrumentator
Instrument your FastAPI app
Stars: ✭ 511 (+796.49%)
Mutual labels:  fastapi

Simple deploy of python web-apps @YandexCloud

Forget about setting up your own infrastructure, vps, network, orchestrators, etc... go serverless

Quickstart

  1. setup virtual env, create your app
  2. create account at Yandex Cloud
  3. install Yappa
$ pip install yappa -U
$ pip freeze > requirements.txt
  1. use Yappa:
$ yappa setup
$ yappa deploy

...that's it! Your application is deployed

Updates

when your code is updated just run

$ yappa deploy

Deployment examples

Both WSGI and ASGI applications are supported (as well as raw functions). So Django, Flask, FastAPI... etc could be easily deployed.

Furthermore, not just regular json API could be deployed this way. Several types of applications could be launched with Yappa:

Django

please see examples:

Management commands

django manage.py commands are supported. just run

$ yappa manage migrate

In order to support management commands, for Django projects second cloud function is being created every deploy. It's made only for handling management commands, and it's not public. Therefore, commands do not support user inputs: to every command '--no-input' flag is added.

Creating superuser

As of Django 3.0 env variables are supported for createsuperuser command. So you should deploy your app with DJANGO_SUPERUSER_USERNAME, DJANGO_SUPERUSER_PASSWORD environment variables. Then run

$ yappa manage createsuperuser

The other way around would be to implement custom management command (see StackOverflow topic)

Yandex Cloud authorization

Command '$ yappa setup' prompts you for OAuth token. Then, Yappa creates service account "yappa-uploader-service" with roles editor and serverless.functions.admin for the specified folder. Key for this account is created and saved locally at .yc file.

Command '$ yappa deploy' supports two types of authorization

  • service account key saved at .yc file (generated during '$ yappa setup')
  • environment variables YC_OAUTH and YC_FOLDER

Limitations

There are some limitations, however YandexCloud team is constantly releasing new features and services. Also, the team of this project will try to keep up. So stay tuned :)

Database connectivity

Managed Postgres and YandexDB is supported inside Yandex Cloud. In case any other DB - it has to have public IP address

For details on how te set up connection with managed postgres please refer to

Headers and authorization

Please note that some request headers (like Authorization) are deleted before function is invoked

Articles

Habr:

Development and Contribution

Please see project boards and issues. With any questions and suggestions please visit our telegram chat

In the near future we will be focused on documentation improvements (mainly deployment examples) and support of async tasks (serverless workers and scheduler for celery).

Troubleshooting

  • installing grpcio on Apple M1: installing with anaconda may help. Also look at stackoverflow
  • versions of python 3.7 support yappa up to 0.3.12. You should use python 3.8 and above for new versions of yappa.

Acknowledgements

  • Mikhail Novikov for starting this project two years ago
  • httpx as a great tool for calling WSGI/ASGI apps offline
  • Zappa for inspiration
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].