Skip to content
Type-Checking Function Arguments for Humans™
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Typy Checker

Type-Checking Function Arguments for Humans™

Typy_checker is a library that checks the type of the arguments of a given function. It exposes a decorator that you can use to retain your sanity.

How to install it?

  • Python 3

    git clone
    # or
    git clone
    cd typy_checker
    python3 install
  • Python 2

    git clone
    # or
    git clone
    cd typy_checker
    python install

How to use it?

from typy_checker import type_checker

valid_types = (int, float)
@type_checker(foo=valid_types, scooby=valid_types)
def add(foo, scooby):
    return foo + scooby

Calling add(1, 2) will give the intended result while calling add([2], [3]) will throw an error.

How to contribute?

You can contribute in many ways. Head over to the GitHub repo's issues page here, create an issue if it's not there and let's discuss. This repo follows Kent Dodds' all-contributors philosophy.

You can’t perform that action at this time.