Skip to main content

Installing

pip3 install shucks

Simple Usage

Validating a login form accepting email or phone and a password.

import shucks
import math

schema = shucks.And(
  dict,
  {
    'id': shucks.If(
      shucks.And(str, lambda v: '@' in v),
      shucks.Con(
        lambda v: v.split('@', 1)[1],
        shucks.contain({'gmail.com', 'hotmail.com', 'yahoo.com'})
      ),
      shucks.And(
        shucks.Or(str, int),
        shucks.Con(str, shucks.Con(len, shucks.range(10, 10)))
      )
    ),
    'password': shucks.And(
      str,
      shucks.Con(len, shucks.And(shucks.range(8, math.inf))),
      shucks.wrap(shucks.Not(lambda v: 'logo' in v), 'logo')
    ),
    shucks.Opt('remember'): bool
  }
)

data = {
  'id': 1234567890
  'password': 'logo1234'
}

shucks.check(schema, data)

Metadata

Release files for shucks 1.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 shucks 1.2.1
File Size Uploaded Provenance Actions
shucks-1.2.1.tar.gz 5.8 kB Without provenance Details for shucks-1.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 14.1 kB

Release files / shucks-1.2.1.tar.gz

Download URL shucks-1.2.1.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5530b8475706e653455615b59a7e1991bb2d172a75b46216e527dd41ef7829e3
BLAKE2b-256 checksum
How to use checksums
ad2e49870fefd09666d33aa127a71c407fabef219ae60073076cf2677d175a30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.9.0

Release files / shucks-1.2.1-py3-none-any.whl

Download URL shucks-1.2.1-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e6f4ac791d76abde5ae2e9aa6e298e012980e347dd49c09ff39def34e9ab12a
BLAKE2b-256 checksum
How to use checksums
f5f8282362654d3881108fcefe213b89db482bf09bb88f898bab8c0f241a1833
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.9.0

Security for shucks 1.2.1

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.

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