Metadata-Version: 2.1
Name: cz-common-python
Version: 0.10.38
Summary: Useful utility functions; remove all the boilerplate
Home-page: https://github.com/Cloudzero/cz-common-python
Author: CloudZero
Author-email: support@cloudzero.com
License: UNLICENSED
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Description-Content-Type: text/markdown
License-File: LICENSE


[![Build Status](https://cloudzero.semaphoreci.com/badges/cz-common-python/branches/master.svg?key=1fb0a22b-ab5c-46d9-a0d4-4afa93bcde1a)](https://cloudzero.semaphoreci.com/projects/cz-common-python)

# Overview

`cz-common-python` provides the `czc` python package that contains useful feature modules like:

- `czc.authorization`: check the request parameters and token against role
- `czc.constants`: `FEATURE_NAME` and `PROJECT_NAME`
- `czc.concurrency`: `aync_map` function to turn a blocking function into async function
- `czc.concurrency_36`: `aync_map` function to turn a blocking function into async function (Python 3.6 version)
- `czc.date`: convert to/from iso and timestamp formats ... always in UTC
- `czc.domain_events`: create a schema or domain event
- `czc.json`: encode dictionaries with non-serializable elements, e.g. dates
- `czc.schema_validators`: validate common CZ values, e.g. `ORGANIZATION_ID`
- `czc.string`: convert between camel and snake; vacuum pack an unpack
- `czc.token`: decode and check JWTs, can still be referenced as `czc.jwt` for backwards compatibility
- `czc.unittest`: help write unit tests
    - `MockEx` class decorates mocks, adding assertable chainable methods, e.g. `MockEx(mock).was_called_once_with(*args, **kwargs)` does all of the nasty argument unpacking and comparison and compares call count.

