# Roco - Runtime config generator
Command line utility which prints to the standard output javascript valid
text generated from environment variables.
For example, given following environment variables:
PAPERMERGE__AUTH__OIDC_CLIENT_ID=papermerge
PAPERMERGE__AUTH__OIDC_AUTHORIZE_URL=http://keycloak.trusel.net:8080/realms/myrealm/protocol/openid-connect/auth
PAPERMERGE__AUTH__OIDC_REDIRECT_URL=http://demo.trusel.net:12000/oidc/callback
PAPERMERGE__AUTH__OIDC_LOGOUT_URL=http://keycloak.trusel.net:8080/realms/myrealm/protocol/openid-connect/logout
will result in the following text (valid javascript) as output:
window.__PAPERMERGE_RUNTIME_CONFIG__ = {
oidc: {
client_id: 'papermerge',
authorize_url: 'http://keycloak.trusel.net:8080/realms/myrealm/protocol/openid-connect/auth',
redirect_url: 'http://demo.trusel.net:12000/oidc/callback',
logout_url: 'http://keycloak.trusel.net:8080/realms/myrealm/protocol/openid-connect/logout'
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 --settings
The above command will also show the env var prefix i.e. `PAPERMERGE__AUTH__`.
Roco reads from following environment variables:
* `PAPERMERGE__AUTH__OIDC_AUTHORIZE_URL`
* `PAPERMERGE__AUTH__OIDC_CLIENT_ID`
* `PAPERMERGE__AUTH__OIDC_REDIRECT_URL`
* `PAPERMERGE__AUTH__OIDC_LOGOUT_URL`
* `PAPERMERGE__AUTH__OIDC_SCOPE`
Raw data
{
"_id": null,
"home_page": "https://github.com/papermerge/roco",
"name": "roco",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": null,
"author": "Eugen Ciur",
"author_email": "eugen@papermerge.com",
"download_url": "https://files.pythonhosted.org/packages/25/e3/e77b3566270ca25c849a529270df4e04fd83171743cb6dd0be2fcae7c8ef/roco-0.4.4.tar.gz",
"platform": null,
"description": "# Roco - Runtime config generator\n\nCommand line utility which prints to the standard output javascript valid \ntext generated from environment variables.\n\nFor example, given following environment variables:\n\n PAPERMERGE__AUTH__OIDC_CLIENT_ID=papermerge\n PAPERMERGE__AUTH__OIDC_AUTHORIZE_URL=http://keycloak.trusel.net:8080/realms/myrealm/protocol/openid-connect/auth\n PAPERMERGE__AUTH__OIDC_REDIRECT_URL=http://demo.trusel.net:12000/oidc/callback\n PAPERMERGE__AUTH__OIDC_LOGOUT_URL=http://keycloak.trusel.net:8080/realms/myrealm/protocol/openid-connect/logout\n\nwill result in the following text (valid javascript) as output:\n\n window.__PAPERMERGE_RUNTIME_CONFIG__ = {\n oidc: {\n client_id: 'papermerge',\n authorize_url: 'http://keycloak.trusel.net:8080/realms/myrealm/protocol/openid-connect/auth',\n redirect_url: 'http://demo.trusel.net:12000/oidc/callback',\n logout_url: 'http://keycloak.trusel.net:8080/realms/myrealm/protocol/openid-connect/logout'\n scope: 'openid email',\n }\n };\n\n## Install\n\n pip install roco\n\n## Usage\n\nIf no relevant environment variables were defined just running:\n\n roco\n\nWill result in following output:\n\n window.__PAPERMERGE_RUNTIME_CONFIG__ = {\n };\n\ni.e. valid, but empty, javascript object.\nIn order to see current roco's pydantic settings (read from env vars)\nrun:\n \n roco --settings\n\nThe above command will also show the env var prefix i.e. `PAPERMERGE__AUTH__`.\n\nRoco reads from following environment variables:\n\n* `PAPERMERGE__AUTH__OIDC_AUTHORIZE_URL`\n* `PAPERMERGE__AUTH__OIDC_CLIENT_ID`\n* `PAPERMERGE__AUTH__OIDC_REDIRECT_URL`\n* `PAPERMERGE__AUTH__OIDC_LOGOUT_URL`\n* `PAPERMERGE__AUTH__OIDC_SCOPE`\n",
"bugtrack_url": null,
"license": "Apache 2.0",
"summary": "Runtime Config Generator",
"version": "0.4.4",
"project_urls": {
"Homepage": "https://github.com/papermerge/roco"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e04f3ea5477ef66e6b3cb2d6cc774ab0f165eceb880f2504200f26e20e8be27b",
"md5": "4853686117ad1318df1de357452ded0a",
"sha256": "d305bbe79c86aad101a862dd162b7a9f4c6f7dc57cdc28c701f07f7ff99e91c2"
},
"downloads": -1,
"filename": "roco-0.4.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4853686117ad1318df1de357452ded0a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 7570,
"upload_time": "2024-05-03T04:56:24",
"upload_time_iso_8601": "2024-05-03T04:56:24.209535Z",
"url": "https://files.pythonhosted.org/packages/e0/4f/3ea5477ef66e6b3cb2d6cc774ab0f165eceb880f2504200f26e20e8be27b/roco-0.4.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "25e3e77b3566270ca25c849a529270df4e04fd83171743cb6dd0be2fcae7c8ef",
"md5": "1c0224070732388b917f7dd4796541f7",
"sha256": "8f2bd6df42a695871f4fd2fd777726058d22b1bfe4a9c8f1220658e6cc88907b"
},
"downloads": -1,
"filename": "roco-0.4.4.tar.gz",
"has_sig": false,
"md5_digest": "1c0224070732388b917f7dd4796541f7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 6155,
"upload_time": "2024-05-03T04:56:25",
"upload_time_iso_8601": "2024-05-03T04:56:25.706754Z",
"url": "https://files.pythonhosted.org/packages/25/e3/e77b3566270ca25c849a529270df4e04fd83171743cb6dd0be2fcae7c8ef/roco-0.4.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-03 04:56:25",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "papermerge",
"github_project": "roco",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "roco"
}