Skip to content

Commit 8cf65c5

Browse files
committed
update README.md
1 parent 91fc6f4 commit 8cf65c5

1 file changed

Lines changed: 39 additions & 1 deletion

File tree

README.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,46 @@ A collection of Value Objects to save time by generalizing types and format vali
1616

1717
### Int
1818

19+
Integer numbers without a fractional component that don't support decimal points.
20+
21+
```python
22+
from pyvalueobjects import Int
23+
24+
# Creation
25+
my_integer = Int(9)
26+
27+
# Getting raw value
28+
my_integer.value() # returns -> 9
29+
```
30+
1931
### Nullable Int
2032

33+
Integer numbers and None.
34+
35+
```python
36+
from pyvalueobjects import NullableInt
37+
38+
# Creation
39+
my_integer = NullableInt(9)
40+
41+
# Creating from None
42+
my_nullable_integer = NullableInt(None)
43+
44+
# Getting raw value
45+
my_integer.value() # returns -> 9
46+
my_nullable_integer.value() # returns -> None
47+
```
48+
2149
## String value-objects
2250

23-
### String
51+
### String
52+
53+
```python
54+
from pyvalueobjects import String
55+
56+
# Creation
57+
my_str = String('potato')
58+
59+
# Getting raw value
60+
my_str.value() # returns -> 'potato'
61+
```

0 commit comments

Comments
 (0)