Skip to main content

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 .

Metadata

Release files for useful-decoration 1.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for useful-decoration 1.1.5
File Size Uploaded
useful_decoration-1.1.5.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for useful-decoration 1.1.5
File Interpreter ABI Platform
useful_decoration-1.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 14.3 kB

Release files / useful_decoration-1.1.5.tar.gz

Download URL useful_decoration-1.1.5.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c84c31ca897f50476ec449a50afcbdf2325df3a0c94f2699bcf1f0777a7fb348
BLAKE2b-256 checksum
How to use checksums
c2906bc9c7492d833e2cefa954873ad3ebcc2c283751b4d05f32a3d698e75194
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8

Release files / useful_decoration-1.1.5-py3-none-any.whl

Download URL useful_decoration-1.1.5-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f4792b82961910d8b9f660e751e1d78aa2f3811025e46b7bed9900981f5aaf5
BLAKE2b-256 checksum
How to use checksums
d734a1b63dcf51bf94d6286376411e3b61b1de387c5945e957c1ab59a837efa3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8

Release history Release notifications | RSS feed

This release

1.1.5 This release

2 release files

1.1.4

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.8

2 release files

1.0.7

1 release file

1.0.6

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page