
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Helper functions to run Django and Flask applications in AWS Copilot/ECS.
A set of utility functions for running Django & Flask apps in AWS ECS via AWS Copilot.
dbt-copilot-python
3.9, 3.10, 3.11, 3.12 and 3.13.
pip install dbt-copilot-python
ALLOWED_HOSTS
settingAdd the ECS container IP to ALLOWED_HOSTS
setting 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)
Add the health check in your application's Celery config file...
from dbt_copilot_python.celery_health_check import healthcheck
celery_app = Celery("application_name")
...
celery_app = healthcheck.setup(celery_app)
Add the health check to the Celery worker service in docker-compose.yml
...
healthcheck:
test: [ "CMD-SHELL", "python -m dbt_copilot_python.celery_health_check.healthcheck" ]
interval: 10s
timeout: 5s
retries: 2
start_period: 5s
In your *-deploy
codebase, add the health check to the Celery worker service in copilot/celery-worker/manifest.yml
...
healthcheck:
command: [ "CMD-SHELL", "launcher bash -c 'python -m dbt_copilot_python.celery_health_check.healthcheck'" ]
interval: 10s
timeout: 5s
retries: 2
start_period: 10s
DATABASES
settingTo configure the DATABASES
setting from an RDS JSON object stored in AWS Secrets Manager, there are two options.
Configure the DATABASES
setting to use a database URL (recommended):
Note: This is dependent on the dj-database-url
package which can be installed via pip install dj-database-url
.
import dj_database_url
from dbt_copilot_python.database import database_url_from_env
DATABASES = {
"default": dj_database_url.config(
default=database_url_from_env("DATABASE_ENV_VAR_KEY")
)
}
Configure the DATABASES
setting to use a dictionary containing the settings:
from dbt-copilot-python.database import database_from_env
DATABASES = database_from_env("DATABASE_ENV_VAR_KEY")
dbt-copilot-python
pip install poetry
poetry install && poetry run pre-commit install
poetry run pytest
To publish the Python package dbt-copilot-python
, you will need an API token.
platform
group in Passman.poetry config pypi-token.pypi <token>
to add the token to your Poetry configuration.Update the version, as the same version cannot be published to PyPi.
poetry version patch
More options for the version
command can be found in the Poetry documentation. For example, for a minor version bump: poetry version minor
.
Build the Python package.
poetry build
Publish the Python package.
Note: Make sure your Pull Request (PR) is approved and contains the version upgrade in pyproject.toml
before publishing the package.
poetry publish
Check the PyPi Release history to make sure the package has been updated.
For an optional manual check, install the package locally and test everything works as expected.
FAQs
Helper functions to run Django and Flask applications in AWS Copilot/ECS.
We found that dbt-copilot-python demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.