2023 Python 서버기술

less than 1 minute read

파이썬으로 제대로된 서버개발을 한 적은 없어서 몇 가지 조사하다가 발견한것들
2020작성 - 20230712 업뎃
크게 변한게 없어서 새로 작성 안하고 업뎃

WebFramework

  • Django https://github.com/django/django

  • Flask https://github.com/pallets/flask

  • FastAPI https://github.com/tiangolo/fastapi
    https://towardsdatascience.com/why-we-switched-from-flask-to-fastapi-for-production-machine-learning-765aab9b3679

미만잡..

  • Bottle https://github.com/bottlepy/bottle https://bottlepy.org/docs/dev

  • Pylons https://github.com/Pylons/pylons

  • Pyramid https://github.com/Pylons/pyramid https://trypyramid.com/

  • Falcon https://github.com/falconry/falcon

  • Eve https://github.com/pyeve/eve

  • CherryPy https://github.com/cherrypy/cherrypy

  • https://github.com/juancarlospaco/faster-than-requests

엄청많다

ORM

  • SqlAlchemy

  • https://github.com/python-gino/gino

  • PonyORM
    https://ponyorm.org/

  • DjangoORM

SQL

  • PyPika
    https://pypika.readthedocs.io/en/latest/

  • https://github.com/tmuzzin/PythonSQLGenerator

  • https://github.com/hhyo/mybatis-mapper2sql

  • PyDAL
    https://github.com/web2py/pydal

비동기 기술

  • celery

  • faust

  • async

  • PyKafka
    https://pykafka.readthedocs.io/en/latest/

  • kafka-python
    https://github.com/dpkp/kafka-python

  • Winton Kafka Streams
    https://github.com/wintoncode/winton-kafka-streams

개발환경

버전관리, 프로젝트별 의존성 격리 도구

기본도구: pip install -r requirements.txt

미만잡

빌드배포용

  • autoenv

  • setuptools

  • pip-tools

실행환경

  • Gunicorn

  • uWSGI

  • Uvicorn(ASGI)
    https://www.uvicorn.org

  • supervisord
    http://supervisord.org/

  • honcho
    https://github.com/nickstenning/honcho

  • forever

  • pm2

  • unicorn

배포환경

  • zappa - aws lambda (반푼이)

  • serverless - aws lambda

  • https://github.com/GoogleCloudPlatform/functions-framework-python

  • https://github.com/tiangolo/uwsgi-nginx-flask-docker

  • https://github.com/tiangolo/uvicorn-gunicorn-fastapi-docker

기타 참고

  • https://dev.to/sm0ke/flask-dashboard-simple-open-source-starters-4noc