Datasette plugin to expose selected environment variables at /-/env for debugging
Project description
datasette-expose-env
Datasette plugin to expose selected environment variables at /-/env
for debugging
Installation
Install this plugin in the same environment as Datasette.
datasette install datasette-expose-env
Configuration
Decide on a list of environment variables you would like to expose, then add the following to your metadata.yml
configuration:
plugins:
datasette-expose-env:
variables:
- ENV_VAR_1
- ENV_VAR_2
- ENV_VAR_3
If you are using JSON in a metadata.json
file use the following:
{
"plugins": {
"datasette-expose-env": {
"variables": [
"ENV_VAR_1",
"ENV_VAR_2",
"ENV_VAR_3"
]
}
}
}
To show a full list of redacted environment variables use "show_all_redacted": true
:
plugins:
datasette-expose-env:
show_all_redacted: true
variables:
- ENV_VAR_1
- ENV_VAR_2
This will show the values for ENV_VAR_1
and ENV_VAR_2
and then a full list of other variables with their value shown as ...
.
Visit /-/env
on your Datasette instance to see the values of the environment variables.
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd datasette-expose-env
python3 -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for datasette_expose_env-0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04c4b42c16ca1e66640fb9bb896792cb9beb6d566219a8f7d85758af89f7c1e8 |
|
MD5 | dc1ab00ac00166b35ab3c8ec4d42f8ad |
|
BLAKE2b-256 | 0acb553cc0a3d4040e3e1d792df6c86126b5299da1f9809d0cf25ea2e26653c4 |