A function decorator for enforcing function signatures

Overview

checksignature

a function decorator for enforcing function signatures

tests publish codecov

Setup

Ensure nox is installed.

pip install nox

Run nox to build, install, and run checksignature tests.

Usage

Decorate any funciton with @checksignature.

@checksignature
def function(a: str, b: int, c, **kwargs):
    return a, b, c, kwargs

Upon invocation of function, the signature check is evaluated.

function('one', 2, 3.0, **{'four': 4})  #=> functions as usual--no problem.
function(1, 2, 3.0, **{'four': 4})      #=> raises a TypeError
You might also like...
Python Function to manage users via SCIM
Python Function to manage users via SCIM

Python Function to manage users via SCIM This script helps you to manage your v2 users. You can add and delete users or groups, add users to groups an

A program for calculating the divisor function

DivisorsFunctionCalculator A program for calculating the divisor function A script to find the "Sigma" (divisors function) of any number. To find the

A faster Python generator that get function results from multi-process workers

multiyield This package implements a Python generator that get function results from multi-process workers. The faster_fifo Queue (instead of the stan

A python package to manage the stored receiver-side Strain Green's Tensor (SGT) database of 3D background models and able to generate Green's function and synthetic waveform

A python package to manage the stored receiver-side Strain Green's Tensor (SGT) database of 3D background models and able to generate Green's function and synthetic waveform

Use this function to get list of routes for particular journey
Use this function to get list of routes for particular journey

route-planner Functions api_processing Use this function to get list of routes for particular journey. Function has three parameters: Origin Destinati

🌌A Python library to exhaustively enumerate a combinatorial space represented by a function

exhaust A Python library to exhaustively enumerate a combinatorial space represented by a function. The API is modelled after Python's random module a

Function Plotter✨
Function Plotter✨

Function-Plotter Build With : Python PyQt5 unittest matplotlib Getting Started This is an list of needed instructions to set up your project locally,

Force you (or your user) annotate Python function type hints.

Must-typing Force you (or your user) annotate function type hints. Notice: It's more like a joke, use it carefully. If you call must_typing in your mo

InfiniPy has some neat features - like the endpoint for function

InfiniPy has some neat features - like the endpoint for function

Comments
  • Add functioning decorator

    Add functioning decorator

    As a lib User I want a function decorator that interrupts the python runtime when a decorated function is invoked So I can be informed when functions are invoked with incompatible params

    opened by withtwoemms 1
  • Setup CI buildtooling

    Setup CI buildtooling

    As a Contributor I want a means of continuously running tests and publishing a PyPi package So I can release on and tags and have assurances that those releases meet expectations

    opened by withtwoemms 0
  • Does not properly handle vararg signatures

    Does not properly handle vararg signatures

    As a lib User I want checksignature to check the types for each value give for a vararg function param So I can use the decorator for functions that use the "*" splat signature

    opened by withtwoemms 0
Owner
Emmanuel I. Obi
personal account for Emmanuel Obi.
Emmanuel I. Obi
API Rate Limit Decorator

ratelimit APIs are a very common way to interact with web services. As the need to consume data grows, so does the number of API calls necessary to re

Tomas Basham 574 Dec 26, 2022
Python decorator for `TODO`s

Python decorator for `TODO`s. Don't let your TODOs rot in your python projects anymore !

Klemen Sever 74 Sep 13, 2022
This package tries to emulate the behaviour of syntax proposed in PEP 671 via a decorator

Late-Bound Arguments This package tries to emulate the behaviour of syntax proposed in PEP 671 via a decorator. Usage Mention the names of the argumen

Shakya Majumdar 0 Feb 6, 2022
📙 Super lightweight function registries for your library

catalogue: Super lightweight function registries for your library catalogue is a tiny, zero-dependencies library that makes it easy to add function (o

Explosion 139 Jan 2, 2023
An application for automation of the mining function in the game Alienworlds.IO

alienautomation A Python script made to automate the tidious job of mining on AlienWorlds This script: Automatically opens the browser Automatically l

anonieXdev 42 Dec 3, 2022
Remote execution of a simple function on the server

FunFetch Remote execution of a simple function on the server All types of Python support objects.

Decave 4 Jun 30, 2022
The purpose of this script is to bypass disablefund, provide some useful information, and dig the hook function of PHP extension.

The purpose of this script is to bypass disablefund, provide some useful information, and dig the hook function of PHP extension.

Firebasky 14 Aug 2, 2021
BasicVSR++ function for VapourSynth

BasicVSR++ BasicVSR++: Improving Video Super-Resolution with Enhanced Propagation and Alignment Ported from https://github.com/open-mmlab/mmediting De

Holy Wu 34 Nov 28, 2022
An example file showing a simple endpoints like a login/logout function and maybe some others.

Flask API Example An example project showing a simple endpoints like a login/logout function and maybe some others. How to use: Open up your IDE (or u

Kevin 1 Oct 27, 2021
An Airflow operator to call the main function from the dbt-core Python package

airflow-dbt-python An Airflow operator to call the main function from the dbt-core Python package Motivation Airflow running in a managed environment

Tomás Farías Santana 93 Jan 8, 2023