Skip to main content

fchecker is designed to provide cleaner useable check exceptions.

Project description

fchecker

fchecker is designed to provide cleaner useable check exceptions. The "f" in fchecker represents formatted.

The purpose of fchecker is not to replace some of the built-in Python general checks but to act as a companion to enhance messages and increase issue resolution.

All check exceptions will return with no trackback from the checker. All tracing will get displayed from the caller line. Inspecting the original traceback will show all traces, but general usage and return output will not show any traces of the backend calls.

Returned exceptions are formatted using fexception. Import the required fexception exception classes for exception handling.

Description

Python's general checks return True or False when a check result gets returned. fchecker removes the True or False return and throws a cleanly written exception when a check does not pass. fchecker checks many different Python checks and adds the ability to wrap a clean formatted structure around the returned exception.

Available Checks

Below are the listed check options. Some options are methods, and some are functions. Proper formatting is used to distinguish between the two. Please read the docstring for more details on usage requirements.

Import Name Method or Function Checking Overview
KeyCheck Method Dictionary An advanced dictionary key checker that offers two different check options.
 1. Checks if some required keys exist in the dictionary.
 2. Checks if all required keys exist in the dictionary.
type_check Function Type A simple type validation check.
Offers optional caller_override to change traceback.
file_check Function File Checks if the file exists.

Installation

From PyPI

You can find fchecker on PyPI. https://pypi.org/project/fchecker/

Usage

Once installed, add fchecker as a module and select the checker option from the import.

Note: You can use * to import all check options.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fchecker-0.1.tar.gz (7.5 kB view details)

Uploaded Source

File details

Details for the file fchecker-0.1.tar.gz.

File metadata

  • Download URL: fchecker-0.1.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.2

File hashes

Hashes for fchecker-0.1.tar.gz
Algorithm Hash digest
SHA256 f000d5582c73ddbd6f360f1041b4a3a6540c4635a6fe6dac3f6d0d2fc3cfffc5
MD5 9d5574bad98c96a2b94a6aaf58bb57c8
BLAKE2b-256 1f6b0c1878278937267a37532e320b2c6e5f95e16aaaa5be6efaa60fa70467dd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page