Django – Getting Started Djangoプロジェクトの起動 $ django-admin startproject mysite <IP:port> #IP:portはオプション Watching for file changes with StatReloader Performing system checks... System check identified no issues (0 silenced). You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions. Run 'python manage.py migrate' to apply them. November 28, 2022 - 06:45:21 Django version 3.2.16, using settings 'mysite.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C.
Flask – Getting Started 簡単に動かす $ export FLASK_APP=hello #起動するアプリをFlaskに伝える $ export FLASK_ENV=development #サーバーを開発モードに設定 $ flask run * Serving Flask app 'hello' (lazy loading) * Environment: production WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. * Debug mode: off * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
実行 FastAPI – Getting Started アプリを実行 $ pip install "uvicorn[standard]" $ uvicorn main:app --reload INFO: Will watch for changes in these directories: ['/home/opc/python/fastapi'] INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) INFO: Started reloader process [3157492] using watchgod INFO: Started server process [3157494] INFO: Waiting for application startup. INFO: Application startup complete. $ curl -X GET http://127.0.0.1:8000 {"Hello":"World"}
toolsのインストール gRPC公式のサンプルを使用 https://grpc.io/docs/languages/python/quickstart/ gRPC with Python Quick start $ pip install grpcio $ pip install grpcio-tools # Clone the repository to get the example code: $ git clone -b v1.50.0 --depth 1 --shallow-submodules https://github.com/grpc/grpc # Navigate to the "hello, world" Python example: $ cd grpc/examples/python/helloworld