A template repository for creating Python CLI applications.
- Rename "my_app" to the desired app name across the repo. (May be helpful to do a project-wide find-and-replace).
- Update Python version if needed.
- Install all dependencies with
make install
to create initial Pipfile.lock with latest dependency versions. - Add initial app description to README and update initial required ENV variable documentation as needed.
- Update license if needed (check app-specific dependencies for licensing terms).
- Check Github repository settings:
- Confirm repo branch protection settings are correct (see dev docs for details)
- Confirm that all of the following are enabled in the repo's code security and analysis settings:
- Dependabot alerts
- Dependabot security updates
- Secret scanning
- Create a Sentry project for the app if needed (we want this for most apps):
- Send initial exceptions to Sentry project for dev, stage, and prod environments to create them.
- Create an alert for the prod environment only, with notifications sent to the appropriate team(s).
- If not using Sentry, delete Sentry configuration from config.py and test_config.py, and remove sentry_sdk from project dependencies.
Description of the app
- To install with dev dependencies:
make install
- To update dependencies:
make update
- To run unit tests:
make test
- To lint the repo:
make lint
- To run the app:
pipenv run my_app --help
SENTRY_DSN
= If set to a valid Sentry DSN, enables Sentry exception monitoring. This is not needed for local development.WORKSPACE
= Set todev
for local development, this will be set tostage
andprod
in those environments by Terraform.