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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file gambas-0.0.3.tar.gz.

File metadata

  • Download URL: gambas-0.0.3.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for gambas-0.0.3.tar.gz
Algorithm Hash digest
SHA256 37ab61bbc27685fcae2faaacb11a28ffcd668dcfc8debc0bf5e5033881708345
MD5 82a7cca70fd01abdaac0a4aae24b2864
BLAKE2b-256 618c853e1486f62b150d1b9a55f1433508f11e25c4ec790e0a7f8dab309555ac

See more details on using hashes here.

File details

Details for the file gambas-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: gambas-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for gambas-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f8c8d5b0b6bee8ca2252d2dcff61aeb21a242c15c7c4545cdb60ca1cf2a82a2e
MD5 f7c41df1134997786a45a8bf1501240f
BLAKE2b-256 597a21d8f0ebb989277aed032f1b5ab12bfe55d2a999307b45f11afc0568bf1f

See more details on using hashes here.

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