⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@dratasich
Copy link

@dratasich dratasich commented Feb 7, 2026

Adds configuration documentation generated by pydantic-settings-export.

Changes made:

  • added pydantic-settings-export to the requirements.txt - had to update pydantic-settings to make it work and also requires a pyproject.toml to customize the (markdown-)generator
  • minor changes in config.py to make it work (model config, password validator, pre-commit formatting)
  • generated and added CONFIGURATION.md manually via:
    PYTHONPATH=. pydantic-settings-export
    
    (required environment variables have to be set)

Tested via pytest, under python 3.12 and installed postgresql-libs (for py_config).
However, please check if the added packages also work for you.

Caveat: as the PROJECT_ROOT is a full path and would contain the developer's patch, I didn't add a pre-commit (yet).

Issue #53

Feel free to update or change the PR.

@dratasich
Copy link
Author

The last commit includes a pre-commit hook for demonstration - probably revert, because:

It uses the bash -> it might only work for Linux users. The package's hook does not work because the package is not installed and the module therefore cannot be found. To overcome this I guess you have to use some package manager like uv.

Adds .env in the model_config to avoid pydantic-validation errors on export.
My example .env:

# DB
REPORTING_POSTGRES_USER=my_user
REPORTING_POSTGRES_PASSWORD=my_password
REPORTING_POSTGRES_DB=my_db
REPORTING_POSTGRES_HOST=reportingdb
REPORTING_POSTGRES_PORT=5439

# Encryption
JWT_SIGNING_KEY=my_key

# Access Token
JWT_ACCESS_TOKEN_EXPIRATION_TIME=240 # Minutes

REPORTING_SERVICE_NAME=reporting
REPORTING_SERVICE_PORT=8009
REPORTING_USING_GATEKEEPER=True
REPORTING_GATEKEEPER_BASE_URL=http://gatekeeper:8001/
REPORTING_GATEKEEPER_USERNAME=reporting_username
REPORTING_GATEKEEPER_PASSWORD=reporting_password
REPORTING_BACKEND_CORS_ORIGINS=["*"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant