Skip to content

Releases: yar-kik/conjector

Release v1.2.0

11 Dec 09:21
Compare
Choose a tag to compare

Updates

  • Added datetime, date, time and timedelta field types support

Release v1.1.2

11 Dec 09:11
Compare
Choose a tag to compare

Updates

  • Fixed bug when default and default_factory didn't set if the value in a config file was missing

Release v1.1.1

11 Dec 08:54
Compare
Choose a tag to compare

Updates

  • Minor tests changes
  • Add CI\CD for a new version of package autodeploy

Release v1.1.0

03 Dec 06:52
Compare
Choose a tag to compare

Updates:

  • Now, Union and Optional 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

30 Nov 17:26
Compare
Choose a tag to compare

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 is True 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.