PowerPy
Powerpy is a collection of small functions and classes for Python3, contains an implementation of common patterns and other simple functions to make your life a bit easier.
Installation
The package can be installed through pip:
$ pip install powerpy
or downloaded from GitHub.
Examples
To implement a simple type checking in your classes:
from powerpy.type_checking import EnsureTypes
class Test(EnsureTypes):
def __init__(self):
self.prop1 = ""
self.prop2 = 123
self.prop3 = None
t=Test()
t.prop1="Hello" # OK
t.prop1=123 # Error
t.prop3 = "World" # OK
t.prop3 = 123 # Ok
Partial application:
from powerpy.currying import Currying
@Currying
def simple_func(param1, param2):
return param1 + param2
s1 = simple_func("Hello")
print(s1("Alice")) # HelloAlice
print(s1("Bob")) # HelloBob
Metadata
Release files for powerpy 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| powerpy-0.1.1.tar.gz | 6.4 kB | Without provenance | Details for powerpy-0.1.1.tar.gz |
Release files / powerpy-0.1.1.tar.gz
| Download URL | powerpy-0.1.1.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
12135d19d545478be436e60ab7639ea11d3402e30cf64febc1fbdf2407b577d5
|
|
BLAKE2b-256 checksum How to use checksums |
e5d3ad1a74ba941a7209f5558f58c30790e9b1ea4723ffdc59f5e600cf3dd6e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for powerpy 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.