Skip to main content

doCheck

Introduction

doCheck is an open-source type checking module written in Python, released under the Mulan Permissive Software License v2 (MulanPSL-2.0). This module provides a set of reusable Checker classes for validating properties and conditions of different types of values.

Installation

pip install doCheck

Features

  • Provides various logical operator overload methods such as intersection, union, complement, negation, etc., for composing complex data validation rules.
  • Includes LiteralChecker (also known as EnumChecker) to check if a value is in a predefined list.
  • TypeChecker is used to validate if a value belongs to a specific collection of data types.
  • RangeChecker supports conditional checks within a numeric range and allows customization of interval closure.
  • Additionally, CallableChecker and RegexChecker are provided to check if a value is a callable object and if a string matches a regular expression, respectively.

Usage Example

import doCheck as dc

# Create checker instances
is_integer = dc.TypeChecker(int)
is_even = dc.RangeChecker(0, float('inf'), leftClosed=True, step=2)
is_valid_name = dc.RegexChecker(r'^[A-Za-z]+\s[A-Za-z]+$')

# Apply checkers
print(is_integer.check(42))  # Output: True
print(is_even.check(10))     # Output: True
print(is_valid_name.check("John Doe"))  # Output: True

License

doCheck module is licensed under the Mulan Permissive Software License v2.0. For more information about this license, please visit: https://opensource.org/license/mulanpsl-2-0/

| Github | gitee | Static Badge |

Note: To use this module, make sure to import it correctly and comply with the relevant open-source license terms.

Metadata

Release files for doCheck 0.1.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 doCheck 0.1.3
File Size Uploaded Provenance Actions
doCheck-0.1.3.tar.gz 8.2 kB Without provenance Details for doCheck-0.1.3.tar.gz

Built distribution (wheel)

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

Total release size: 16.3 kB

Release files / doCheck-0.1.3.tar.gz

Download URL doCheck-0.1.3.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
8b971a25a0059836c11b211720107ad50a356d6b10e993935e8868b7b248a4ea
BLAKE2b-256 checksum
How to use checksums
2ede5d508e4fb0f170c63c13970e6b56172dad9f3d5a5eba8c6595aa339d856a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.8

Release files / doCheck-0.1.3-py3-none-any.whl

Download URL doCheck-0.1.3-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6ba3cb69f25b50dfd3c7b84a47758915da97ee3e9f0ca6ad301846f37b82165d
BLAKE2b-256 checksum
How to use checksums
c4ea184860f181d9ec409b182adcd91efab2840fcbb0c1d09c68093fef8ed30e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.8

Security for doCheck 0.1.3

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.

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files No provenance

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