Skip to main content

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

Metadata

Release files for nr.sumtype 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nr.sumtype 0.0.5
File Size Uploaded
nr.sumtype-0.0.5.tar.gz 5.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nr.sumtype 0.0.5
File Interpreter ABI Platform
nr.sumtype-0.0.5-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 10.6 kB

Release files / nr.sumtype-0.0.5.tar.gz

Download URL nr.sumtype-0.0.5.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
cc01d7aa639260bc6669739ea26e4f05cb0f48ae7be7b28736f35e39e9eeea0a
BLAKE2b-256 checksum
How to use checksums
b87f101431604b8764b777e022835ab2320fc9abde25786024419f26758f1513
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / nr.sumtype-0.0.5-py2.py3-none-any.whl

Download URL nr.sumtype-0.0.5-py2.py3-none-any.whl
Size 5.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
fdc2f73d4f96384ab8ae7b8094c26180c61c6f9b33eeb2e03f44ff2e3afa441d
BLAKE2b-256 checksum
How to use checksums
5cac0e805e7012ccb07faefc27113e1ee38defaf7d90c4461e40541d4d38d237
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files

0.0.4

2 release files

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

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