Skip to content

Latest commit

 

History

History
65 lines (46 loc) · 1.96 KB

README.rst

File metadata and controls

65 lines (46 loc) · 1.96 KB

FlanaUtils

License PyPI PyPI - Python Version

Set of utilities of all kinds to develop python projects.


Installation

Python 3.10 or higher is required.

pip install flanautils

Features

Data structures

  • BiDict:
    Dictionary that saves references in both directions to access constantly by hashes both key -> value and key <- vaue. To achieve this, a copy of the dictionary is used but inverted.
  • OrderedSet:
    A set that maintains the insertion order and implements all the methods of set and list, although since it is a structure based on hashes the traversal of all the elements and the use of Sequence-based functions (tuple, list, etc.) aren't efficient.

Models

  • Base class for serialize to bytes
  • Base class for serialize to dict
  • Base class for serialize to json
  • Base class for calculate mean of objects
  • Base class that acts as a object-document mapper (ODM)
  • Base class for enums
  • Plotly classes
  • etc.

Functions

  • Asyncs utils like do_later(...), do_every(...), etc.
  • Decorators
  • Exceptions
  • Iterable utils like smart filter(...), find(...), flattn_iterator(...), frange(...), etc.
  • Operating system utils like resolve_path(...), suppress_stderr(...), etc.
  • Strings utils like cartesian_product_string_matching(...), join_last_separator(...), translate(...), words_to_numbers(...), etc.