Metadata-Version: 2.1
Name: pyeffects
Version: 1.0.2
Summary: Monads for Python.  Side-effect explicitly.
Home-page: https://github.com/vickumar1981/pyeffects
Author: Vic Kumar
Author-email: vickumar@gmail.com
License: Apache 2.0
Project-URL: Source, https://github.com/vickumar1981/pyeffects
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
Description-Content-Type: text/markdown

![Logo](logo.jpg)

# pyEffects  

[![Build Status](https://api.travis-ci.org/vickumar1981/pyeffects.svg?branch=master)](https://travis-ci.org/vickumar1981/pyeffects/builds) [![PyPI version](https://badge.fury.io/py/pyeffects.svg)](https://badge.fury.io/py/pyeffects) [![Documentation Status](https://readthedocs.org/projects/pyeffects/badge/?version=latest)](https://pyeffects.readthedocs.io/en/latest/?badge=latest)
 [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/vickumar1981/pyeffects/blob/master/LICENSE)

Monads for Python.  Side-effect explicitly.

Handle your side-effects in Python like a boss.  Implements functional types for Either, Option, Try, and Future.

For more detailed information, please refer to the [API Documentation](https://pyeffects.readthedocs.io/en/latest/ "API Documentation").

---
### 1. Install

`pip install pyeffects`

---
### 2. Using Option
```python
>>> from pyeffects.Option import *
>>> val = Some(5).map(lambda v: v * v)
>>> val
Some(25)
>>> val.is_defined()
True
>>> val.get()
25

```

---
### 3. Using Try
```python
>>> from pyeffects.Try import *
>>> val = Success(5).map(lambda v: v * v)
>>> val
Success(25)
>>> val.is_success()
True
>>> val.get()
25

```

---
### 4. Using Either
```python
>>> from pyeffects.Either import *
>>> val = Right(5).map(lambda v: v * v)
>>> val
Right(25)
>>> val.is_right()
True
>>> val.get()
25
```

---
### 5. Using Future
```python
>>> from pyeffects.Future import *
>>> val = Future.of(5).map(lambda v: v * v)
>>> val
Future(Success(25))
>>> val.on_complete(lambda v: print(v))
Success(25)
>>> val.get()
25
```

---
### 6. Reporting an Issue

Please report any issues or bugs to the [Github issues page](https://github.com/vickumar1981/pyeffects/issues). 

---
### 8. License

This project is licensed under the [Apache 2 License](https://github.com/vickumar1981/pyeffects/blob/master/LICENSE).

