Skip to main content

zutilities

A collection of Python utilities

Table of Contents

Prerequisites

You'll need to have Python installed in order to use zutilities. Start by downloading and installing Python.

Note: Python 3 is recommended, however zutilities will probably work just fine with most verions of Python 2

Installation

python -m pip install zutilities

Usage

zutilities.jprint(list_or_dict, indent=2)

Prints a list or dictionary as formatted JSON.

>>> zutilities.jprint([{'key1':'value1','key2':'value2'}])
[
  {
    "key1": "value1",
    "key2": "value2"
  }
]

zutilities.read_json_file(json_file)

Reads a JSON file from the filesystem and returns a list or dictionary.

>>> j = zutilities.read_json_file('file.json')
>>> j
[{'key1': 'value1', 'key2': 'value2'}]

zutilities.get_logger(log_level=20, format=default_log_format, streams=[sys.stdout])

Returns a logging.RootLogger object with preferred defaults set. The default_log_format is '[%(asctime)s] {%(pathname)s:%(lineno)d} %(levelname)s - %(message)s'

>>> logr = zutilities.get_logger()
>>> logr.info('Hello World')
[2021-10-08 21:08:40,353] {<stdin>:1} INFO - Hello world

License

This project is licensed under the MIT License

Metadata

Release files for zutilities 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zutilities 0.1.2
File Size Uploaded Provenance
zutilities-0.1.2.tar.gz 3.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for zutilities 0.1.2
File Interpreter ABI Platform
zutilities-0.1.2-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 7.4 kB

Release files / zutilities-0.1.2.tar.gz

Download URL zutilities-0.1.2.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
66d36c8c30b296e9413edd6f2ca3720fc402859aa9efe46a47ad9f89f8aa6334
BLAKE2b-256 checksum
How to use checksums
0256100b9223d7d8d8594da05117d48f70973cc9e46aa03a4abf326184c92e42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

Release files / zutilities-0.1.2-py2.py3-none-any.whl

Download URL zutilities-0.1.2-py2.py3-none-any.whl
Size 3.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
5d71997dc8a943d452ee1b1ca99915126e251c22268f59e4fa06982c9227871d
BLAKE2b-256 checksum
How to use checksums
f4b7bb1eebec0e39b945a4cdf79dfe06d73ed8526c0a3f136c707cd0bd6b21c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

Security for zutilities 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page