Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1""" 

2Miscellaneous dependencies for the API. 

3""" 

4 

5 

6from functools import lru_cache 

7 

8import docker 

9from docker.client import DockerClient 

10 

11from serverctl_deployd.config import Settings 

12 

13 

14async def check_authentication() -> None: 

15 """ 

16 TODO: To be implemented 

17 """ 

18 pass # pylint: disable=unnecessary-pass 

19 

20 

21async def get_docker_client() -> DockerClient: 

22 """ 

23 Get the Docker client. 

24 """ 

25 return docker.from_env() # pragma: no cover 

26 

27 

28@lru_cache() 

29def get_settings() -> Settings: 

30 """ 

31 Return settings to be used as a dependency. 

32 This is only there so that it can be overridden for tests. 

33 """ 

34 return Settings()