navapbc / template-application-flask

Apache License 2.0
7 stars 3 forks source link

Template Application Flask

Overview

This is a template application that can be used to quickly create an API using Python and the Flask framework. This template includes a number of already implemented features and modules, including:

The template application is intended to work with the infrastructure from template-infra.

Installation

To get started using the template application on your project:

  1. Run the download and install script in your project's root directory.

    curl https://raw.githubusercontent.com/navapbc/template-application-flask/main/template-only-bin/download-and-install-template.sh | bash -s

    This script will:

    1. Clone the template repository
    2. Copy the template files into your project directory
    3. Remove any files specific to the template repository.
  2. Optional, if using the Platform infra template: Follow the steps in the template-infra README to set up the various pieces of your infrastructure.

Note on memory usage

If you are using template-infra, you may want to increase the default memory allocated to the ECS service to 2048 Mb (2 Gb) to avoid the gunicorn workers running out of memory. This is because the application is currently configured to create multiple workers based on the number of virtual CPUs available, which can take up more memory.

Getting started

Now you're ready to get started.