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
Metadata
Release files for docker-helper 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| docker_helper-0.0.2.tar.gz | 2.7 kB | Without provenance | Details for docker_helper-0.0.2.tar.gz |
Release files / docker_helper-0.0.2.tar.gz
| Download URL | docker_helper-0.0.2.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
79c2e0f9c4f4fe0df25089bd922b2658513d3c853a36e26181f7429a24ac9ca2
|
|
BLAKE2b-256 checksum How to use checksums |
7654d496542504352294063957d435aa4a193fa2db20b80d850add93f26470fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for docker-helper 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.