1
- # dry-monads
1
+ # returns
2
2
3
- [](https://wemake.services) [](https://travis-ci.org/sobolevn/dry-monads) [](https://coveralls.io/github/sobolevn/dry-monads?branch=master) [](https://dry-monads.readthedocs.io/en/latest/?badge=latest) [](https://pypi.org/project/dry-monads/) [](https://github.com/wemake-services/wemake-python-styleguide)
3
+ [](https://wemake.services) [](https://travis-ci.org/dry-python/returns) [](https://coveralls.io/github/dry-python/returns?branch=master) [](https://returns.readthedocs.io/en/latest/?badge=latest) [](https://pypi.org/project/returns/) [](https://github.com/wemake-services/wemake-python-styleguide)
4
4
5
5
6
- Monads for ` python ` made simple and safe.
6
+ Make your functions return something meaningful and safe! and safe.
7
7
8
8
9
9
## Features
10
10
11
11
- Provides primitives to write declarative business logic
12
12
- Fully typed with annotations and checked with ` mypy ` ,
13
13
allowing you to write type-safe code as well
14
- - No operator overloading or other unpythonic stuff that makes your eyes bleed
14
+ - Pythonic and pleasant to write and to read (!)
15
15
16
16
17
17
## Installation
18
18
19
19
20
20
``` bash
21
- pip install dry-monads
21
+ pip install returns
22
22
```
23
23
24
24
25
25
## What's inside?
26
26
27
27
We have several the most iconic monads inside:
28
28
29
- - [ Result, Failure, and Success] ( https://dry-monads .readthedocs.io/en/latest/pages/either.html ) (also known as ` Either ` , ` Left ` , and ` Right ` )
30
- - [ Maybe, Some, and Nothing] ( https://dry-monads .readthedocs.io/en/latest/pages/maybe.html )
29
+ - [ Result, Failure, and Success] ( https://returns .readthedocs.io/en/latest/pages/either.html ) (also known as ` Either ` , ` Left ` , and ` Right ` )
30
+ - [ Maybe, Some, and Nothing] ( https://returns .readthedocs.io/en/latest/pages/maybe.html )
31
31
32
32
We also care about code readability and developer experience,
33
33
so we have included some useful features to make your life easier:
34
34
35
- - [ Do notation] ( https://dry-monads .readthedocs.io/en/latest/pages/do-notation.html )
36
- - [ Helper functions] ( https://dry-monads .readthedocs.io/en/latest/pages/functions.html )
35
+ - [ Do notation] ( https://returns .readthedocs.io/en/latest/pages/do-notation.html )
36
+ - [ Helper functions] ( https://returns .readthedocs.io/en/latest/pages/functions.html )
37
37
38
38
39
39
## Example
40
40
41
41
42
42
``` python
43
- from dry_monads .do_notation import do_notation
44
- from dry_monads .either import Result, Success, Failure
43
+ from returns .do_notation import do_notation
44
+ from returns .either import Result, Success, Failure
45
45
46
46
class CreateAccountAndUser (object ):
47
47
""" Creates new Account-User pair."""
@@ -58,7 +58,8 @@ class CreateAccountAndUser(object):
58
58
59
59
```
60
60
61
- We are [ covering what's going on in this example] ( https://dry-monads.readthedocs.io/en/latest/pages/do-notation.html ) in the docs.
61
+ We are [ covering what's going on in this example] ( https://returns.readthedocs.io/en/latest/pages/do-notation.html ) in the docs.
62
+
62
63
63
64
## Inspirations
64
65
0 commit comments