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.
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.4.tar.gz
(4.7 kB
view details)
Built Distribution
File details
Details for the file nr.sumtype-0.0.4.tar.gz
.
File metadata
- Download URL: nr.sumtype-0.0.4.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a224c7f70c212aebf3754cf941d94527e68f1afad8db0e224d9885eb113d797c |
|
MD5 | 1a6a439342148cddf21f50afc6b25e15 |
|
BLAKE2b-256 | a4c18099777c6ab680d03338b51b9c98cf6950894083b0077bbf062078308a27 |
File details
Details for the file nr.sumtype-0.0.4-py2.py3-none-any.whl
.
File metadata
- Download URL: nr.sumtype-0.0.4-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.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1017468bbc3d187592c413892c19d0e9642bdeae0149fa0c122ca21dfb23132 |
|
MD5 | 80a1de6d3d3624e2f354c279fcc244a6 |
|
BLAKE2b-256 | c6c1507a3efbef286e8241acd51b10df2c9868f77a8dae18d4c819ae2e50b900 |