Skip to main content

A python module for type checking function parameters and returns

Project description


A python dectorater to enforce type checks on your python functions for your stupid colleagues who pass int type when you clearly told them to pass string. ヽ(ಠ_ಠ)ノ

You can define parameter and return types for your python functions using type hints (check them out here : and the watcher decorator over them to handle the dirty work.

Currently we only support positional arguments only and single return types but will add support for keyword arguments and mutiple return types.

Raise and issue in the gitrepo if you find any bugs or need a feature.

Types Checking Supported for

Positional Parameters Single return types User defined data types


from be_holder import watcher

def f():  # Will work as normal
    return "pass"

def f1(a:str,b): #Will be typed checked and will raise TypeError if types do not match
    return "pass"
def f2(a:str,b:int):
    return "pass":

def f3()>str: #Will raise a type error due to return type not matching function definition
    return 1

def f4(a:str)->str:
    return "pass"

if __name__ == "__main__":

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

be_holder-1.0.tar.gz (2.6 kB view hashes)

Uploaded source

Built Distribution

be_holder-1.0-py3-none-any.whl (3.3 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page