File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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+ ```
You can’t perform that action at this time.
0 commit comments