Skip to main content

callback

Callback factory in Python, providing two similar approaches to produce parameterized and flexible callbacks that can be overriden during execution.

Installation

pip install callback-factory

Example

from callback import CallbackFactory

def greet(name, greeting="Hello"):
    return f"{greeting}, {name}!"

callback = CallbackFactory(greet, "Alice", greeting="Hi")

print(callback())  # Output: Hi, Alice!

One can find more usage examples in examples.py at the root folder of this project.

Release files for callback-factory 0.0.3

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

Source distribution (sdist)

Source distribution for callback-factory 0.0.3
File Size Uploaded
callback-factory-0.0.3.tar.gz 3.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for callback-factory 0.0.3
File Interpreter ABI Platform
callback_factory-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 6.8 kB

Release files / callback-factory-0.0.3.tar.gz

Download URL callback-factory-0.0.3.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
85a5b7647a8218c551aedc3eb1f89ef1adce44bc07397b426664dd8a72db06fb
BLAKE2b-256 checksum
How to use checksums
19417d8c5f2040c914987ed2ff3f52eadb265cd9d60957cec7b9edb097247d5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.2

Release files / callback_factory-0.0.3-py3-none-any.whl

Download URL callback_factory-0.0.3-py3-none-any.whl
Size 3.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1acd0d5235ff6b5050f6e5abe14b9094293a7366fa5c9d7fa1fa0d1d0d9f775b
BLAKE2b-256 checksum
How to use checksums
f3751b2a6af668f7eecaaf984a1438a8839a5eac26f6761c7e8863f566699c03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.2

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

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