Christopher Juckins

SysAdmin Tips, Tricks and other Software Tools

User Tools

Site Tools


python_code_snippets

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
python_code_snippets [2020/10/06 07:23] juckinspython_code_snippets [2020/10/06 16:30] juckins
Line 1: Line 1:
-==== Python coding notes ====+==== Python Coding Notes ====
  
 __Handling arguments__ __Handling arguments__
Line 62: Line 62:
  
 [[https://realpython.com/python-pep8/|Write beautiful python code with PEP-8]] [[https://realpython.com/python-pep8/|Write beautiful python code with PEP-8]]
 +
 +__Working with JSON__
 +
 +  * Use PyPi [[https://pypi.org/project/dictor/|dictor]]
 +  * Use PyPi (from [[https://pypi.org/project/demjson/|demjson]] which includes JSON Lint to check for valid JSON code and make fixes
 +    * sudo pip install demjson
 +     * installs into /usr/local/bin/jsonlint
 +    * jsonlint data.json
 +    * jsonlint --help
python_code_snippets.txt · Last modified: 2020/10/09 15:05 by juckins