Skip to main content

Safely

Capture side effects, safely ⚔️

Continuous Integration Package Version Supported Python Versions

Installation

pip install safely

Usage

As a function (without second-order arguments):

def f(...): ...

result = safely(f)(...)

As a function (with second-order arguments):

def f(...): ...

result = safely(f, logger=logger.error, message="{exc_type}: {exc_value}")(...)

As a decorator (without second-order arguments):

@safely
def f(...): ...

result = f(...)

As a decorator (with second-order arguments):

@safely(logger=logger.error, message="{exc_type}: {exc_value}")
def f(...): ...

result = f(...)

Release files for safely 0.2.1

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

Source distribution (sdist)

Source distribution for safely 0.2.1
File Size Uploaded
safely-0.2.1.tar.gz 3.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for safely 0.2.1
File Interpreter ABI Platform
safely-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 7.5 kB

Release files / safely-0.2.1.tar.gz

Download URL safely-0.2.1.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9c65b5e6eaf9419cf7b54d7f7ea699e6e09d3b57eb2fde05fa8047a848c44bca
BLAKE2b-256 checksum
How to use checksums
69f043ae67b1fba1de87d4e695982980e1a351c3d92d4c013b5a8b338423a847
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.1 CPython/3.9.13 Linux/5.15.0-1019-azure

Release files / safely-0.2.1-py3-none-any.whl

Download URL safely-0.2.1-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e26f4c8143ee6214add737ac26f032ef1ef1dc6f5e079fa363c293824d156ac
BLAKE2b-256 checksum
How to use checksums
c733cc40464b16aa2afe7265dc72dcb6cf554b4e17899b01d948956a6df74201
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.1 CPython/3.9.13 Linux/5.15.0-1019-azure

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.0

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