Releases: yar-kik/conjector
Releases · yar-kik/conjector
Release v1.2.0
Updates
- Added
datetime
,date
,time
andtimedelta
field types support
Release v1.1.2
Updates
- Fixed bug when
default
anddefault_factory
didn't set if the value in a config file was missing
Release v1.1.1
Updates
- Minor tests changes
- Add CI\CD for a new version of package autodeploy
Release v1.1.0
Updates:
- Now,
Union
andOptional
type hints are supported! (and their 3.10+ replacement)
The default behavior for the Optional
type hint: try to convert the value to a specified type, if successful - use the converted value, else use None
. Also, None
will be used if no value is provided.
How the Union
type hint works: in a specified order (eg Union[float, dict, str]
) the value will be cast first to float
, then, if the attempt fails, to dict
, and finally to str
. If the value cannot be converted to any of the provided types, ValueError
will be thrown. The casting process will be stopped immediately after the first successful attempt.
Release v1.0.0
Updates:
- Now, this library searches a config file which is located in the same directory as a file with a used decorator. So it's become more convenient to handle a config with constants near files that use this data.
- Default value of the param
type_cast
isTrue
which means that every value of the config will be cast according to type hints. - Nested types such as list, set, tuple, dataclass, and so on are supported.