Giter Site home page Giter Site logo

mxschmitt / azure-fastapi-postgres-aca Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azure-samples/azure-fastapi-postgres-flexible-aca

0.0 1.0 0.0 63.13 MB

Space Tourism Demo built using FastAPI and SQLModel deployed using ACA

License: MIT License

Shell 0.03% Python 3.18% CSS 55.63% HTML 2.14% Dockerfile 0.17% SCSS 5.57% Bicep 33.28%

azure-fastapi-postgres-aca's Introduction

Deploy a FastAPI Application via Azure Container Apps

This project deploy a FastAPI application to Azure Container Apps. The FastAPI application is a simple web application for a space travel agency. The application is built using the FastAPI framework and uses a PostgreSQL database with SQLModel as an ORM. The application can be deployed to Azure using the Azure Developer CLI.

Opening the project

This project has Dev Container support, so it will be be setup automatically if you open it in Github Codespaces or in local VS Code with the Dev Containers extension.

If you're not using one of those options for opening the project, then you'll need to:

  1. Create a Python virtual environment and activate it.

  2. Install production requirements:

    python -m pip install -r demo_code/requirements.txt
  3. Install the app as an editable package:

    python -m pip install -e demo_code
  4. Apply database migrations and seed initial data:

    python3 demo_code/fastapi_app/seed_data.py

Running locally

Run gunicorn on the app:

python3 -m gunicorn fastapi_app:app -c demo_code/gunicorn.conf.py

Running tests

  1. Install the development requirements:

    python3 -m pip install -r requirements-dev.in
    playwright install --with-deps
  2. Run the tests:

    python3 -m pytest

azure-fastapi-postgres-aca's People

Contributors

kjaymiller avatar pamelafox avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.