Metadata-Version: 2.1
Name: local-env-vars
Version: 0.0.3
Summary: A simple local environmental variable manager
Home-page: https://github.com/JMSchietekat/local-env-vars
Author: Justin Schietekat
Author-email: justinschietekat@gmail.com
License: UNKNOWN
Project-URL: Bug Tracker, https://github.com/JMSchietekat/local-env-vars/issues
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE

# Local Environment Variables

This package allows you to specify which environmental variable you require in your application. It will create a `.env` file, prompt you to populate it, and add the `.env` file to your `.gitignore` file.

The functionality described is in line with the guidelines set out in the [The Twelve-Factor App](https://12factor.net/) section [III Config](https://12factor.net/config). 

## Implementation

```python
from local_env_vars.env import LocalEnvVars

env = EnvironmentManager("sql_server_address", "sql_username", "sql_password")

connection_string = "Driver={{SQL Server}};Server={0}; Database=AdventureWorks;uid={1};pwd={2}".format(
        env.vars['sql_server_address'], env.vars['sql_username'], env.vars['sql_password']
    )
```

Running this code for the first time will create a `.env` file with the following content. It will throw an exception reporting that you must provide values to the keys.

`{"sql_server_address": "", "sql_username": "", "sql_password": ""}`

After you have populated the keys with values you will be able to execute the code without any exceptions.





