{"id":26883677,"url":"https://github.com/jiro4989/envconfig","last_synced_at":"2025-05-08T17:01:51.489Z","repository":{"id":46797349,"uuid":"231238518","full_name":"jiro4989/envconfig","owner":"jiro4989","description":"envconfig provides a function to get config objects from environment variables.","archived":false,"fork":false,"pushed_at":"2024-07-06T02:29:37.000Z","size":75,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T17:50:14.312Z","etag":null,"topics":["config","environment-variables","lib","library","nim"],"latest_commit_sha":null,"homepage":"https://jiro4989.github.io/envconfig/envconfig.html","language":"Nim","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jiro4989.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-01T16:28:15.000Z","updated_at":"2024-07-06T02:29:16.000Z","dependencies_parsed_at":"2024-07-05T17:05:23.768Z","dependency_job_id":"7955840a-37be-4507-85e5-5fa181a901bd","html_url":"https://github.com/jiro4989/envconfig","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiro4989%2Fenvconfig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiro4989%2Fenvconfig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiro4989%2Fenvconfig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiro4989%2Fenvconfig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jiro4989","download_url":"https://codeload.github.com/jiro4989/envconfig/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253112071,"owners_count":21856070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["config","environment-variables","lib","library","nim"],"created_at":"2025-03-31T17:36:38.236Z","updated_at":"2025-05-08T17:01:51.329Z","avatar_url":"https://github.com/jiro4989.png","language":"Nim","funding_links":[],"categories":[],"sub_categories":[],"readme":"#########\nenvconfig\n#########\n\n|gh-actions|\n\nenvconfig provides a function to get config objects from environment variables.\nenvconfig is inspired by `Go envconfig \u003chttps://github.com/kelseyhightower/envconfig\u003e`_.\n\n.. contents:: Table of contents\n   :depth: 3\n\n************\nInstallation\n************\n\n.. code-block:: Bash\n\n   nimble install envconfig\n\n*****\nUsage\n*****\n\n-----\nBasic\n-----\n\nExample that setting environment variables with shell.\n\n.. code-block:: Bash\n\n   export MYAPP_NAME=envconfig\n   export MYAPP_VERSION=v1.0.0\n   export MYAPP_DIR=/opt/envconfig\n   export MYAPP_PORT=1234\n   export MYAPP_DEV=true\n\n.. code-block:: Nim\n\n   import envconfig\n\n   type\n     MyApp = object\n       name, version, dir: string\n       port: int\n       dev: bool\n\n   let config = getEnvConfig(MyApp)\n\n   echo \"MYAPP_NAME: \" \u0026 config.name       # envconfig\n   echo \"MYAPP_VERSION: \" \u0026 config.version # v1.0.0\n   echo \"MYAPP_DIR: \" \u0026 config.dir         # /opt/envconfig\n   echo \"MYAPP_PORT: \" \u0026 $config.port      # 1234\n   echo \"MYAPP_DEV: \" \u0026 $config.dev        # true\n\nExample that setting environment variables with Nim.\n\n.. code-block:: Nim\n\n  import envconfig\n  from os import putEnv\n\n  type\n    MyApp = object\n      name, version, dir: string\n      port: int\n      dev: bool\n\n  putEnv(\"MYAPP_NAME\", \"envconfig\")\n  putEnv(\"MYAPP_VERSION\", \"v1.0.0\")\n  putEnv(\"MYAPP_DIR\", \"/opt/envconfig\")\n  putEnv(\"MYAPP_PORT\", \"1234\")\n  putEnv(\"MYAPP_DEV\", \"true\")\n\n  let config = getEnvConfig(MyApp)\n\n  echo \"MYAPP_NAME: \" \u0026 config.name       # envconfig\n  echo \"MYAPP_VERSION: \" \u0026 config.version # v1.0.0\n  echo \"MYAPP_DIR: \" \u0026 config.dir         # /opt/envconfig\n  echo \"MYAPP_PORT: \" \u0026 $config.port      # 1234\n  echo \"MYAPP_DEV: \" \u0026 $config.dev        # true\n\n----------\nValidation\n----------\n\nProvides tiny functions to validate values.\nA procedure can validate `requires`, `min value`, `max value` and `regex match`.\nFor more informations, see also `API documents \u003chttps://jiro4989.github.io/envconfig/envconfig.html\u003e`_.\n\n*************\nAPI Documents\n*************\n\n* `envconfig \u003chttps://jiro4989.github.io/envconfig/envconfig.html\u003e`_\n\n*******\nLICENSE\n*******\n\nMIT\n\n.. |gh-actions| image:: https://github.com/jiro4989/envconfig/workflows/build/badge.svg\n   :target: https://github.com/jiro4989/envconfig/actions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjiro4989%2Fenvconfig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjiro4989%2Fenvconfig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjiro4989%2Fenvconfig/lists"}