Skip to main content

Update JSON file inside of the ZIP file

Project description

Extract ZIP file. Edit JSON to update with new value of the key. Compress all files to tne new ZIP file

.. image::

Python script to extract ZIP file utdate JOSN key/value and create new ZIP file.

  • - Script contains four functions. read_zip_file, update_json_file, get_all_file_paths and prepareZipFile.
  • read_zip_file - This function prints content of ZIP file and extract in the same folder.
  • update_json_file - This function opens JSON file and edit defined key to the defined value.
  • get_all_file_paths - This function creates list of the all files from argument PATH.
  • prepareZipFile - This function will use get_all_file_paths function to get all files PATH and then archive them to the other file.

===== Usage

Requirements: Python3.4 with simplejson and argparse library installed:


.. code-block:: bash

# ./
usage: [-h] -zin ZIPINPUT -zout ZIPTOOUT -jsonf JSONFILE error: the following arguments are required: -zin, -zout, -jsonf


Project details

Download files

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

Files for editjsoninzip, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size editjsoninzip-0.1.3-py3-none-any.whl (4.0 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page