Skip to main content

sc4py

License Python QA Coverage Publish Docs pre-commit

Utilities for date/time, environment parsing, dynamic class loading, percentages, string-to-bool conversion, choice tuples, in-memory ZIP reading, and advanced string masking/validation (CPF/CNPJ, DVs, etc).

See each package's documentation for details and usage examples.

Masks utilities (CPF/CNPJ, DVs, etc)

from sc4py.masks import apply_mask, validate_masked_value, validate_mask, validate_mod11, validate_dv_by_mask

# Apply a mask
print(apply_mask('12345678901', '###.###.###-##'))  # '123.456.789-01'

# Validate masked value
print(validate_masked_value('12345678901', '###.###.###-##'))  # '123.456.789-01'

# Validate mask
validate_mask('###.###-##')

# Validate mod11 DV
validate_mod11('12345678909', 11, 2)

# Validate value and DV by mask
print(validate_dv_by_mask('12345678909', '#########00'))  # '12345678909'

Installation

pip install sc4py

Security

Please report vulnerabilities according to SECURITY.md.

Author

Kelson da Costa Medeiros kelsoncm@gmail.com

Download files

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

Source Distribution

sc4py-1.1.9.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sc4py-1.1.9-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file sc4py-1.1.9.tar.gz.

File metadata

  • Download URL: sc4py-1.1.9.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sc4py-1.1.9.tar.gz
Algorithm Hash digest
SHA256 d3c9ecd2800c76d2fbcae8718691f4ab1e223b2fe164ab73c099276dd8c1881d
MD5 5066c1f588c48b2501e5b801abd80b18
BLAKE2b-256 ac63d59d228f095ce44f4daa6c110f4a60153512cad27d800379235c600055a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for sc4py-1.1.9.tar.gz:

Publisher: publish.yml on kelsoncm/python-sc4py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sc4py-1.1.9-py3-none-any.whl.

File metadata

  • Download URL: sc4py-1.1.9-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sc4py-1.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 bbb73f568af86fd851fccd6fc50afb184ddb9da3b4764e295e856eaa32a57709
MD5 c26faab5406746fd637f34f9b988dc59
BLAKE2b-256 7e714854b73fda48f6a148f9f906a859f58b64634426e9b9c3babb0a421295d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for sc4py-1.1.9-py3-none-any.whl:

Publisher: publish.yml on kelsoncm/python-sc4py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.1.9 This release

2 files

1.1.7

2 files

1.1.6

2 files

0.1.5

2 files

0.1.4

1 file

0.1.3

1 file

0.1.2

1 file

0.1.1

1 file

0.1.0

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page