Skip to main content

Config Key Validator

Project description

Gambas

Gambas is a config key validator. You can confirm the config file whether its keys all exist or not.

Generally, default.cfg would be the standard for your config file. (Of course, you don't need to set default.cfg as a standard file name.) And, you has a config file used on your project, but not upload on your git due to .gitignore. I'll call it 'target config file'. Because it is a little bothering to sync two files, you sometimes might miss some keys.

Comparing two files' keys with Gambas, you can find the keys you missed of the target config file.

Getting Started

Built With

  • Python >= 3.6.x

Installation

  1. Install Gambas with pip command
    > pip install gambas
    

Usage

  1. Prepare your 2 config files, default file and target file. The file extension is limited only on cfg, json.

    # cfg file
    PSQL_HOST="127.0.0.1"
    PSQL_PORT="5432"
    PSQL_DBNAME="test_db"
    WEBHOOK_URL="http://webhook.url.com"
    ...
    
    # json file
    {
        "psql_host": "127.0.0.1",
        "psql_port": "5432",
        "psql_dbname": "test_db",
        "webhook_url": "http://webhook.url.com",
    }
    ...
    
  2. Execute the command with config files path.

    • -d: the default config file
    • -t: the target config file
    > gambas -d default_config.cfg -t target_config.cfg
    

    You also can compare files with different extensions.

    > gambas -d default_config.cfg -t target_json.json
    
  3. If you don't want to let an error raise, execute the command with option --no-error. In this case, the warnig comes out instead of an error message.

    > gambas -d default_config.cfg -t target_config.cfg --no-error
    

Contact

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gambas-0.0.3.tar.gz (6.8 kB view hashes)

Uploaded Source

Built Distribution

gambas-0.0.3-py3-none-any.whl (7.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page