mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-05-24 23:39:11 +03:00
* Add rough django example * Remove sqlite db * Add gitignore * Fix flake8 and pydocstyle errors * Add tests * Refactor settings * Move web app to to the root of the project * Add bootstrap 4 * Add doc blocks for web app * Add coverage * Fix typo in flask * Remove not needed newlines * Add screenshot
23 lines
491 B
Python
23 lines
491 B
Python
"""Containers module."""
|
|
|
|
from dependency_injector import containers, providers
|
|
from github import Github
|
|
|
|
from . import services
|
|
|
|
|
|
class Container(containers.DeclarativeContainer):
|
|
|
|
config = providers.Configuration()
|
|
|
|
github_client = providers.Factory(
|
|
Github,
|
|
login_or_token=config.GITHUB_TOKEN,
|
|
timeout=config.GITHUB_REQUEST_TIMEOUT,
|
|
)
|
|
|
|
search_service = providers.Factory(
|
|
services.SearchService,
|
|
github_client=github_client,
|
|
)
|