Skip to main content

Compute implied arguments for your functions

Project description

Recommended example usage

import superfilter
from argskwargs import argskwargs

@superfilter
def myfilter():
    return argskwargs(foo="foobar", message="Hello World!")

@myfilter
def myfunction(foo, message):
    print(message)
    return foo

myfunction() # Arguments are supplied by 'myfilter'

Usage with other decorators

import superfilter
from argskwargs import argskwargs

@superfilter
def myfilter(cls):
    return argskwargs(cls, foo="foobar", message="Hello World!")

class MyClass:
    @classmethod
    @myfilter # Decorate with myfilter first
    def myfunction(cls, foo, message):
        print(message)
        return foo

MyClass.myfunction()

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

superfilter-1.0.1.tar.gz (1.8 kB view hashes)

Uploaded source

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