Skip to main content

Code that cannot crash - verified safety functions from Idris 2

Project description

proven-py

Python bindings for the proven library - safe, formally verified operations.

Installation

pip install proven

Usage

from proven import SafeMath, SafeString, SafeEmail

# Safe math operations
result = SafeMath.add(1, 2)
if result.is_ok():
    print(result.unwrap())  # 3

# Overflow detection
overflow = SafeMath.add(2**63 - 1, 1)
if overflow.is_err():
    print("Overflow detected!")

# Safe string escaping
escaped = SafeString.escape_html("<script>alert('xss')</script>")
print(escaped)  # &lt;script&gt;...

# Email validation
if SafeEmail.is_valid("user@example.com"):
    print("Valid email")

License

AGPL-3.0-or-later

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

proven-0.9.0.tar.gz (23.5 kB view details)

Uploaded Source

Built Distribution

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

proven-0.9.0-py3-none-any.whl (28.9 kB view details)

Uploaded Python 3

File details

Details for the file proven-0.9.0.tar.gz.

File metadata

  • Download URL: proven-0.9.0.tar.gz
  • Upload date:
  • Size: 23.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for proven-0.9.0.tar.gz
Algorithm Hash digest
SHA256 2a18a608249130987b29a8eb6696793083802c565516321325367129ca050706
MD5 39965337803ec98fdbf907cb08fda173
BLAKE2b-256 b566e8df3fab0c689949ba162c670a269925f89d0b67ee4b661d85335b4c2f99

See more details on using hashes here.

File details

Details for the file proven-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: proven-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 28.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for proven-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 082b1ba27975b54e0953ad930138e86eaec5d6939e412f309e3b05015247c67d
MD5 9ab79f2c3ebdd331644a60f767bc3810
BLAKE2b-256 1d26440d7230b3f15e483d5a2646e9e761a30e7a72485db35dd6185d17f0c8f3

See more details on using hashes here.

Supported by

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