Ccptools

Latest version: v1.2.0

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

Scan your dependencies

1.2.0

Added

- The `logging` package to the `ccptools.structs._base`
- Methods for casting between Datetime and timestamp (number of seconds since
UNIX Epoch as a float) that work even on Windows when the built in
`datetime.timestamp()` and `datetime.fromtimestamp()` methods fail for
negative values and more
- Methods for casting between Datetime and "instance" (number of milliseconds
since UNIX Epoch as an int)


Changed

- How `any_to_datetime` handles "ambiguous" numeric values when deciding between
"timestamp", "instance" and "filetime"
- How `any_to_datetime` handles strings such that if a given string is a simple
int or float, it's cast and treated as such


Removed

- The `utc` argument from `any_to_datetime`

1.1.0

Added

- a new `enum_eval` method that turns any reasonable value into an instance
of the supplied Enum class _(i.e. string names or ints or whatever)_.
- a new enum base class, `EnumEx` that extends `enum.Enum` by adding a
`from_any` class method that uses `enum_eval` to initialize a new instance
of whatever class extends `EnumEx` from any sensible value
- the new `EnumEx` class to the base `ccptools.structs` import

Changed

- how `int_eval` tries to cast strings and bytes since failed try/except's
are much faster than evaluating the content of a string first

1.0.0

Added

- This entire Project

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.