Skip to main content

Sumtypes in Python.

Project description

Note: This package is in the dangerous land of 0.x.y versions and may be subject to breaking changes with minor version increments.

Note: The nr.sumtype module is no longer developed.

nr.sumtype

Sumtypes in Python.

Example

from nr.sumtype import Constructor, Sumtype

class Status(Sumtype):
  Idle = Constructor()
  Loading = Constructor(['progress'])
  Succeeded = Constructor()
  Error = Constructor(['message'])

print(Status.Loading(progress=0.0))

Copyright © 2020 Niklas Rosenstein

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

nr.sumtype-0.0.5.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

nr.sumtype-0.0.5-py2.py3-none-any.whl (5.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file nr.sumtype-0.0.5.tar.gz.

File metadata

  • Download URL: nr.sumtype-0.0.5.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

File hashes

Hashes for nr.sumtype-0.0.5.tar.gz
Algorithm Hash digest
SHA256 cc01d7aa639260bc6669739ea26e4f05cb0f48ae7be7b28736f35e39e9eeea0a
MD5 44065754a02ce9aee0f6757ece27b035
BLAKE2b-256 b87f101431604b8764b777e022835ab2320fc9abde25786024419f26758f1513

See more details on using hashes here.

File details

Details for the file nr.sumtype-0.0.5-py2.py3-none-any.whl.

File metadata

  • Download URL: nr.sumtype-0.0.5-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

File hashes

Hashes for nr.sumtype-0.0.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 fdc2f73d4f96384ab8ae7b8094c26180c61c6f9b33eeb2e03f44ff2e3afa441d
MD5 20a8a288600b4cbbc36e33e17f0a4397
BLAKE2b-256 5cac0e805e7012ccb07faefc27113e1ee38defaf7d90c4461e40541d4d38d237

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