Skip to main content

Sumtypes in Python.

Project description

nr.sumtype

Make use of sumtypes in 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))

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.3.tar.gz (4.1 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: nr.sumtype-0.0.3.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.5

File hashes

Hashes for nr.sumtype-0.0.3.tar.gz
Algorithm Hash digest
SHA256 9c9e943e4ca10d158bd34a6a86d27799c01464651161f9e905de2f93f588eb64
MD5 35545d84475e51d65b383102737dc612
BLAKE2b-256 b81c298bbd2e03abd37562bb427f0e248967bb4b74fa1d8fe24d5518dc311af5

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