Skip to content

changyubiao/useful_decoration

Repository files navigation

Useful-decoration

Description

I wrote some decorators that are commonly used in my daily work. And I gave an example if the decorator is often used.

Installing

Install and update using pip:

pip install  useful-decoration

Simples

from useful_decoration.decorations import element_mapping


class Person:

    def __init__(self, name):
        self.name = name

    @element_mapping(factor_name="factor")
    def calculate(self):
        return 10


if __name__ == '__main__':
    p = Person(name='frank')

    print(p.calculate())  # {'factor': 10}

Contributes

Welcome, you can join this repo to enhance this repo together. you can pull request to me. please don't hesitate to contact with me if you have any questions .

Links

About

powerful and useful decorations for humans

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published