Skip to main content

powerful and useful decorations

Project description

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 .

Project details


Download files

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

Files for useful-decoration, version 1.1.4
Filename, size File type Python version Upload date Hashes
Filename, size useful_decoration-1.1.4-py3-none-any.whl (7.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size useful_decoration-1.1.4.tar.gz (5.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page