Spaces:
Sleeping
Sleeping
Download app/api/deps.py from shakauthossain/deploymate: direct link, hf CLI and curl.
- Browser
- Download file 939 Bytes
-
https://huggingface.co/spaces/shakauthossain/deploymate/resolve/main/app/api/deps.py
- Command line
-
hf download hf://spaces/shakauthossain/deploymate/app/api/deps.py
-
curl -L -o deps.py https://huggingface.co/spaces/shakauthossain/deploymate/resolve/main/app/api/deps.py
939 Bytes
| """ | |
| Dependency injection functions for the DevOps Toolkit API. | |
| """ | |
| import jinja2 | |
| from app.core.config import settings | |
| from app.core.logging import logger | |
| from app.services.devops import DevOpsService | |
| # Jinja2 environment for template rendering | |
| template_env = jinja2.Environment( | |
| loader=jinja2.FileSystemLoader(settings.templates_dir), | |
| trim_blocks=True, | |
| lstrip_blocks=True, | |
| autoescape=True, | |
| cache_size=0, # Disable template caching to allow live reloading | |
| ) | |
| # Service instance | |
| devops_service = DevOpsService(template_env, settings, logger) | |
| def get_settings(): | |
| """Get application settings.""" | |
| return settings | |
| def get_template_env() -> jinja2.Environment: | |
| """Get Jinja2 template environment.""" | |
| return template_env | |
| def get_logger(): | |
| """Get application logger.""" | |
| return logger | |
| def get_devops_service() -> DevOpsService: | |
| """Get DevOps service instance.""" | |
| return devops_service | |