Metadata-Version: 1.2
Name: env2cli
Version: 0.1.0
Summary: Converts environment variables into cli arguments for easy maintainable docker entry point
Home-page: https://github.com/AvivAbramovich/Env2Cli
Author: Aviv Abramovich
Author-email: AvivAbramovich@gmail.com
License: UNKNOWN
Project-URL: Bug Tracker, https://github.com/AvivAbramovich/Env2Cli/issues
Description: Env2Cli
        =======
        
        Desription
        ----------
        
        Instead of maintain ugly and long entrypoint scripts to call your module with environment variables as arguments from your dockerfile, just add this elegant converting framework from environment variables to cli command line arguments.
        
        Installation
        ------------
        
        .. code-block:: bash
        
            pip install env2cli
        
        
        Usage
        -----
        
        Assume your old dockerfile looked like this
        
        .. code-block:: Dockerfile
        
            ...
            ENV POSITIONAL_ARG val
            ENV SOME_PARAM value
            ENV OTHER_PARAM valy
        
            ...
        
            ENTRYPOINT python main.py ${POSITIONAL_ARG} -p ${SOME_PARAM} --other ${OTHER_PARAM} ...
        
        
        Add new file, for example, `entrypoint.py` like this:
        
        .. code-block:: python
        
            from main import main
            from env2cli import * 
        
            argv = bulk_apply([
                Argument('POSITIONAL_ARG'),
                Argument('SOME_PARAM', '-p'),
                Argument('OTHER_PARAM', '--other')
            ])
        
        main(argv)
        
        
        And the new dockerfile should be looking like this:
        
        .. code-block:: Dockerfile
        
            ENV POSITIONAL_ARG val
            ENV SOME_PARAM value
            ENV OTHER_PARAM valy
        
            ...
        
            ENTRYPOINT python entrypoint.py
        
        Or even if your program isn't python!
        
        .. code-block:: Dockerfile
        
            ENV POSITIONAL_ARG val
            ENV SOME_PARAM value
            ENV OTHER_PARAM valy
        
            ...
        
            ENTRYPOINT ./myprog $(env2cli.py)
            # instead ENTRYPOINT ./myprogram ${POSITIONAL_ARG} -p ${SOME_PARAM} --other ${OTHER_PARAM}
        
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
