Metadata-Version: 2.1
Name: cz-common-python
Version: 0.10.57
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
Requires-Dist: boto3 (>=1.14.62)
Requires-Dist: botocore (>=1.17.62)
Requires-Dist: cachetools (>=4.1.1)
Requires-Dist: simplejson (>=3.17.2)
Requires-Dist: sentry-sdk (==1.0.0)
Requires-Dist: typing-extensions (>=3.7.4.3)
Requires-Dist: toolz (>=0.10.0)
Requires-Dist: voluptuous (==0.12.0)
Requires-Dist: deprecated (>=1.2.10)
Requires-Dist: retrying (==1.3.3)
Requires-Dist: pyfaaster (>=0.2.0)
Requires-Dist: aws-lambda-powertools (>=1.22.0)


[![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.

