Runtime Config Generator
Project description
Roco - Runtime config generator
Command line utility tool which prints to the standard output javascript valid text generated from environment variables.
For example, given following environment variables:
PAPERMERGE__AUTH__GOOGLE_CLIENT_ID=some-id.apps.googleusercontent.com
PAPERMERGE__AUTH__GOOGLE_AUTHORIZE_URL=https://accounts.google.com/o/oauth2/auth
PAPERMERGE__AUTH__GOOGLE_REDIRECT_URI=http://localhost:11000/google/callback
will result in the following text (valid javascript) as output:
window.__PAPERMERGE_RUNTIME_CONFIG__ = {
oauth2: {
google: {
client_id: 'some-id.apps.googleusercontent.com',
authorize_url: 'https://accounts.google.com/o/oauth2/auth',
redirect_uri: 'http://localhost:11000/google/callback',
scope: 'openid email',
},
}
};
Install
pip install roco
Usage
If no relevant environment variables were defined just running:
roco
Will result in following output:
window.__PAPERMERGE_RUNTIME_CONFIG__ = {
};
i.e. valid, but empty, javascript object. In order to see current roco's pydantic settings (read from env vars) run:
roco -s
The above command will also show the env var prefix i.e. PAPERMERGE__AUTH__
.
Roco reads from following environment variables:
PAPERMERGE__AUTH__GOOGLE_AUTHORIZE_URL
PAPERMERGE__AUTH__GOOGLE_CLIENT_ID
PAPERMERGE__AUTH__GOOGLE_REDIRECT_URI
PAPERMERGE__AUTH__GITHUB_AUTHORIZE_URL
PAPERMERGE__AUTH__GITHUB_CLIENT_ID
PAPERMERGE__AUTH__GITHUB_REDIRECT_URI
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
File details
Details for the file roco-0.1.1.tar.gz
.
File metadata
- Download URL: roco-0.1.1.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.3 Linux/5.15.0-1038-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8831a20fd1b24a02a2391a47981ad789a5b837cfaaafe29b91783e67aa4095ed |
|
MD5 | 867e86d5e0feec145628cd6f88c8b79d |
|
BLAKE2b-256 | 93d5a2e6310593ca9018aef672f8baa0d09a05ce3e583188832a424109ebebbb |
File details
Details for the file roco-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: roco-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.3 Linux/5.15.0-1038-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2de1b3fc2b5e7ec3750b02995d2eb736796cc19fd77b28c28a8f63576ec728f5 |
|
MD5 | b395ca1393207920d722b4d657b4a55b |
|
BLAKE2b-256 | d6254a8c9e1c3cc88196e240d4d8eb4c102b54aefea00887679644dc8e061df4 |