title: Command Line Tool in Python to update/append json configuration file
body: <h2>Requirements</h2>
  
  <p>I am creating a <code>Python3</code> module which I wish port to an embedded board (using Yocto) and using <code>setuptools</code> and not on PyPi.</p>
  
  <p>I have a <code>conf.json</code> file which is in the main module folder:</p>
  
  <pre><code> myApp
  | -- submodule-1
  | -- submodule-2
  | -- main.py
  | -- conf.json
  </code></pre>
  
  <p>The reason for such selection of the <code>conf.json</code> file is due to the <a href="https://python-packaging.readthedocs.io/en/latest/non-code-files.html" rel="nofollow noreferrer">Python Packaging tutorial</a> which mentions about <strong>non-code-files</strong></p>
  
  <p>This becomes a bit complicated as I understand that once the package is installed (using <code>pip install .</code>) the destination folder becomes more complicated to reach:</p>
  
  <pre><code>/usr/local/bin/python3/dist-packages/myApp/myApp/conf.json
  </code></pre>
  
  <p>(something similar to above)</p>
  
  <h3>Usage</h3>
  
  <ol>
  <li>There is particular case where initially the user for the app triggers some binaries to obtain some relevant information about a process and needs to add them to the <code>conf.json</code> later.</li>
  </ol>
  
  <p>Data:</p>
  
  <pre><code>configVals: {
  
     123453: {
        'type': 'engine-params',
        'baudrate': 115200,
        'baud': 500
     },
     245633: {
         // similar to above
     }
  }
  </code></pre>
  
  <p>This above should be appended to the <code>conf.json</code> with some respective key within the structure.</p>
  
  <ol start="2">
  <li>Update information in <code>conf.json</code> to <strong>Enable/Disable</strong> some functionality</li>
  </ol>
  
  <p>data:</p>
  
  <pre><code> previously
   {
      "gps": {
          "active": true
       }
   }
  
   now 
   {
      "gps": {
         "active": false
  
       }
   }
  </code></pre>
  
  <h2>Plan</h2>
  
  <p>I was looking into making a command line tool for the user:</p>
  
  <pre><code>change-config  --system gps --key active --value false
  </code></pre>
  
  <p>or </p>
  
  <pre><code> change-config --configVals --list {1234}
  </code></pre>
  
  <p>with perhaps <code>kwargs</code> and <code>argParse</code> but found out that <code>kwargs</code> doesn't work like Python Functions.</p>
  
  <p>Is there a some Open-Source Implementation that does something similar to what my requirements are?</p>
  
  <h3>Last Resort</h3>
  
  <p>I can add <code>conf.json</code> in <code>/etc/myApp/</code> and user can update it there.</p>