Torch-snippets

Latest version: v0.550

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

Scan your dependencies

Page 2 of 8

0.544

🎉 Quality of life improvements in logging
🎉 Add support for `dataclass` in `AD`
🎉 DeepDiff integrated into `AD`. Now you can call x.diff(y) where x is `AD` and y is `AD`able
🎉 `AD.d` (no brackets, d is a property) to convert the object to dictionary
✨ `read_json` can also do json.loads if input is not a file path
✨ `json` is loaded by default on import *

0.540

✨ Made all imports lazy for a faster import experience

0.539

✨ set `AD_SHOW_TAB_STOPS` env variable to anything to print with tab-stops (only recommended to see on REPL. Default is good for storing files)
✨ `crop_from_bb` has `padding` (px,py,pX,pY)
🐞 minor bugfix in `AD`
🎉 `AD` has a `fetch2` which preserves json structure while fetching all the leafs of the same name
🎉 `AD` has a `flatten` which flattens all nested jsons into flat dictionary with '.' combined key names
🎉 `AD` has a `flatten_and_make_dataframe` which creates one column for each nesting
✨ `tryy` will store all its errors and can be accessed by calling `<func>.error_summary()`
🎉 torch snippets as a new cli function called `ts`, thanks to the wonderful `Typer`. Try
`ts time`
`ts zen-of python`
`ts zen-of c++`
`ts --help`

0.538.1

✨ slightly better error printing in `tryy`

0.538

🎉 `tryy` a new decorator to wrap try except with optional default return as well as print stack trace if need be
✨ `Timer` can given time-remaning approximation based on both instantaneous or average speed
✨ `logging_mode` functions can be used as both context managers and decorators
✨ better formatting for `now()`
✨ `show` auto generates a title if possible
✨ `show` function includes a `framecount` parameter to specify which frame of the stack it should search for the title. See its usage in `show_big_dataframe`
✨ `yolo_2_df` and `df_2_yolo` functions in adapters

0.537

✨ `AD` let's you know if a collection is list, set or tuple
✨ NEW DEFAULT: use `info` column to show text else `text`
🐞 fix a bug where `P` misbehaves in `AD` when it doesn't exist
🐞 fix a bug in `show` tables
🐞 `logger_mode` context will gracefully exit
✨ `to` is compatible with `transformers.BatchFeature`
⏮️ Revert back `P` as the code is incompatible with py312

Page 2 of 8

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.