Metadata-Version: 2.1
Name: typing-result
Version: 0.1.0
Summary: A python implementation of the Result type, based on the rust language
License: MIT
Author: William Osteimer Cardoso dos Anjos
Author-email: wosteimer1@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.10
Project-URL: github, https://github.com/wosteimer/py-result
Description-Content-Type: text/markdown

A python implementation of the Result type, based on the rust language

## Installation

```bash
pip install py-result
```
or
```bash
poetry install py-result
```

## Usage Example

```python
def div(x: float, y: float) -> Result[float, ZeroDivisionError]:
	if y == 0:
		return Err(ZeroDivisionError("Ops"))

	return Ok(x / y)

result = div(10, 2)


match result:
	case Ok(v):
		print(v)

	case Err(e):
		# handle error here
		...
```

