Helper functions to run Django and Flask applications in AWS Copilot/ECS.
Project description
DBT Copilot Python
A set of utility functions for running Django & Flask apps in AWS ECS via AWS Copilot.
Using dbt-copilot-python
Installation
pip install dbt-copilot-python
Usage
In settings.py
:
-
Add the ECS container IP to
ALLOWED_HOSTS
so that the Application Load Balancer (ALB) healthcheck will succeed:from dbt_copilot_python.network import setup_allowed_hosts ALLOWED_HOSTS = [...] ALLOWED_HOSTS = setup_allowed_hosts(ALLOWED_HOSTS)
-
Configure the
DATABASES
setting from an RDS JSON object stored in SSM Parameter Store:from dbt-copilot-python import aws_database_config DATABASES = aws_database_config("ENVIRONMENT_KEY")
Contributing to dbt-copilot-python
Requirements
- Poetry;
pip install poetry
Install dependencies & pre-commit hooks
poetry install && poetry run pre-commit install
Run the tests
poetry run pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for dbt_copilot_python-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9008378b3b9f9bac33739f34a67aca435c41781e4646b0ded57e2be3df9fbbdb |
|
MD5 | bccd70f35b32d3b047a06ca5bea50690 |
|
BLAKE2b-256 | 7db89c3b62ce3a93c34303f9ea78484f26ab4824752a234d370c4f031a032fa9 |