docker-helper-0.0.2
توضیحات
Convenience utilities for Python applications in Docker containers
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | docker-helper-0.0.2 |
| نام | docker-helper |
| نسخه کتابخانه | 0.0.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Viktor Adam |
| ایمیل نویسنده | rycus86@gmail.com |
| آدرس صفحه اصلی | https://github.com/rycus86/docker_helper |
| آدرس اینترنتی | https://pypi.org/project/docker-helper/ |
| مجوز | MIT |
# Docker Helper
Convenience utilities for Python applications in Docker containers.
## Functions
- Get current container ID
```python
get_current_container_id()
```
Returns the ID of the container the application is currently running in,
otherwise returns `None` if not running in a container.
> This is done on a best-effort basis, guessed from the information in `/proc/self/cgroup`
- Read configuration values
```python
read_configuration(key, path=None, default=None,
single_config=False, fallback_to_env=True)
```
A convenient way to read configuration values from files with an option
to fall back to using environment variables.
This can come handy to pass in multiple configuration options as key-value pairs
using Docker configs or secrets when working with Swarm services.
When `single_config` is `True`, the configuration file is treated as a single text value
which is useful to read JSON configuration for example for an application.
## License
MIT
نحوه نصب
نصب پکیج whl docker-helper-0.0.2:
pip install docker-helper-0.0.2.whl
نصب پکیج tar.gz docker-helper-0.0.2:
pip install docker-helper-0.0.2.tar.gz