Metadata-Version: 2.1
Name: nr.sumtype
Version: 0.0.4
Summary: Sumtypes in Python.
Home-page: https://git.niklasrosenstein.com/NiklasRosenstein/nr
Author: Niklas Rosenstein
Author-email: rosensteinniklas@gmail.com
License: MIT
Platform: UNKNOWN
Description-Content-Type: text/markdown
Requires-Dist: nr.metaclass (<1.0.0,>=0.0.4)
Requires-Dist: nr.stream (<1.0.0,>=0.0.2)


> 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

```python
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))
```

---

<p align="center">Copyright &copy; 2020 Niklas Rosenstein</p>


