Py-app-properties

Latest version: v1.3.0

Safety actively analyzes 682441 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

1.3.0

Updates
* Updated README and added more details about the library and its features.
* Added lazy initialization of config values.
* Added enum.Enum and re.Pattern field types support.

1.2.0

Updates
* Added `datetime`, `date`, `time` and `timedelta` field types support

1.1.2

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

1.1.1

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

1.1.0

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.

1.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` 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.

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.