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
File details
Details for the file dbt_copilot_python-0.1.1.tar.gz
.
File metadata
- Download URL: dbt_copilot_python-0.1.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.2 Darwin/22.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9acf93580c52a8112bfa493e08dce33cf737273c1c48fbc4567e7389ec62c298 |
|
MD5 | 85e52a7e3aa667b6c2da175ff153b9c5 |
|
BLAKE2b-256 | b08c9c0c1fcd04fb03c2295834049ce8aa9c38cb3e407253a87f17e680bc6454 |
File details
Details for the file dbt_copilot_python-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: dbt_copilot_python-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.2 Darwin/22.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ee732ba0ea0a23c1aa2d8f08aea0aec0f89455de45c841b0a2bbe5a654d1d64 |
|
MD5 | 0762bb12e481aec13d5f82dbb9b36423 |
|
BLAKE2b-256 | b9057c1b47bf6a55fa4c46f9643c0c9cf3c7de62b29bb85ad62cbd58e853437c |