pyTooling is a powerful collection of arbitrary useful classes, decorators, meta-classes and exceptions.
Project description
pyTooling
pyTooling is a powerful collection of arbitrary useful classes, decorators, meta-classes and exceptions. It's useful for any Python-base project independent if it's a library, framework or CLI tool.
Introduction
TODO
Package Details
Common Classes
- pyTooling.CallByRef.*
Emulation of call-by-reference parameters. - pyTooling.Versioning.*
Class representations of semantic version (SemVer) and calendar version (CalVer) numbers.
Decorators
- export
Register the given function or class as publicly accessible in a module.
Exceptions
- EnvironmentException
... is raised when an expected environment variable is missing. - PlatformNotSupportedException
... is raise if the platform is not supported. - NotConfiguredException
... is raise if the requested setting is not configured.
Meta-Classes
- Singleton
Allow only a single instance of a class. - Overloading
Overloading Allow method overloading in Python classes. Dispatch method calls based on method signatures (type annotations).
Examples
@export
Decorator
from pyTooling.Decorators import export
@export
class MyClass:
pass
CallByRefIntParam
from pyTooling.CallByRef import CallByRefIntParam
# define a call-by-reference parameter for integer values
myInt = CallByRefIntParam(3)
# a function using a call-by-reference parameter
def func(param : CallByRefIntParam):
param <<= param * 4
# call the function and pass the wrapper object
func(myInt)
print(myInt.value)
Contributors
- Patrick Lehmann (Maintainer)
- and more...
License
This Python package (source code) licensed under Apache License 2.0.
The accompanying documentation is licensed under Creative Commons - Attribution 4.0 (CC-BY 4.0).
SPDX-License-Identifier: Apache-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyTooling-1.9.5.tar.gz
(22.8 kB
view hashes)
Built Distribution
pyTooling-1.9.5-py3-none-any.whl
(28.5 kB
view hashes)
Close
Hashes for pyTooling-1.9.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74b8ff550846b9c24635ac6153b6e8d662305a0e30c7d7878915e07d7360dfec |
|
MD5 | 37dcbe68900c2819b4cefe1d768d6138 |
|
BLAKE2b-256 | 2658a1ebf5c92de5dd1c62753ee55a3c21f6d03e5919ad3853aff22b5cac30ae |