Py-ticktock

Latest version: v0.1.2

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

Scan your dependencies

0.1.0

This is the first minor release of `ticktock`. It contains many bug fixes and a major overhaul of the formatting system.

- The format string now can control the whole output line (including the beginning of the line with the name). Format can be set globally with `set_format`.
- Providing a `format=...` keyword argument to any of the ticktock functions (decorator, context manager, `tick`/`tock`) will override the formatting for this clock.
- Format strings now accept a generic `name` parameter that takes into account the provided name parameters to ticktock functions, and has a consistent behavior across use cases
- `tick` returns a `Clock` instance, while `tock` returns the recorded time delta in ns
- clock disambiguation now exclusively occurs with frame information (also used names previously)
- Internal modules have been reorganized: `ticktock.renderers` has been split into `ticktock.renderers` and `ticktock.std` , `ticktock.timer` has been split in `ticktock.clocks`, `ticktock.collection` and `ticktock.timers`

0.0.7

Easier control on formatting: use `set_format(format: str, max_terms: int = None, no_update: bool)` to set:
- the format string `format`
- the number of displayed units it times `max_terms` (https://github.com/victorbenichoux/ticktock/issues/6)
- and to turn off ASCII control characters (used to update the previous line) with `no_update`
This was signaled by https://github.com/victorbenichoux/ticktock/issues/4.

Turn on or off the `ticktock` collection of timings and rendering with `enable/disable`. (https://github.com/victorbenichoux/ticktock/issues/5)

Fix a bug in which the carriage return was not returned.

Improvements to the documentation, some more testing.

Thanks to all the people who contributed issues!

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.