annotation_validation

This package validates function type annotations.

MIT License

Downloads
257
Stars
1
Committers
1

=====================
Annotation Validation

.. image:: https://img.shields.io/pypi/v/annotation_validation.svg :target: https://pypi.python.org/pypi/annotation_validation

.. image:: https://img.shields.io/travis/szuckerman/annotation_validation.svg :target: https://travis-ci.org/szuckerman/annotation_validation

.. image:: https://readthedocs.org/projects/annotation-validation/badge/?version=latest :target: https://annotation-validation.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status

.. image:: https://pyup.io/repos/github/szuckerman/annotation_validation/shield.svg :target: https://pyup.io/repos/github/szuckerman/annotation_validation/ :alt: Updates

Annotation Validation ensures type checking for function annotations.

Features

  • Validates input to match data types of annotations of function arguments
  • Validates output to match data type of annotation of return argument
  • Used as a decorator!

Possible Improvements

  • Validation of ranges of input
  • Throw warnings instead of errors
  • Logging

Credits

This package was created with Cookiecutter_ and the audreyr/cookiecutter-pypackage_ project template.

Inspiration is from this blog post_.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter .. _audreyr/cookiecutter-pypackage: https://github.com/audreyr/cookiecutter-pypackage .. _this blog post: https://aboutsimon.com/blog/2018/04/04/Python3-Type-Checking-And-Data-Validation-With-Type-Hints.html