The Utils Package (
utils package contains various Utils modules which provide
functionality that is either :
- Logically independent of the main Tendril functionality.
- Used by multiple Tendril’s packages, either due to generic nature of the functionality, or because it defines the structure that functionality should take within Tendril.
These modules typically expose specific functionality of third-party or built-in Python modules and simplify access by restricting the ways in which these modules can be used. For instance, various options are preselected within the Utils module, meaning application code does not have to bother about it. This comes at the cost of reducing the flexibility available when using this functionality in application code.
The intent of the
tendril.utils package and it’s modules is to attempt
to create a consistent structure throughout the
tendril codebase. The
tendril.utils module, in effect, specifies the preferred way to do
certain common things. Tendril application code which makes use of the
functionality of this module is expected to benefit in the form of
consistency, relative ease in honoring user-provided parameters (across the
codebase), and not need to deal with the underlying libraries and the wide
range of usage options available for the most common cases.
It is expected that this structure will be critical to being able to easily adapt the Tendril codebase to new environments and for making more flexibility accessible to administrators of Tendril instances.
Many of the modules provided here can be re-implemented to use different underlying implementations, while preserving the interface they present to Tendril application code.
It is possible that this approach will soon reach the point of diminishing returns.
The Utility Modules
- The Terminal Utils Module (
- The Types Package (
- Data Structures / Composite Types
- tendril.utils.files package
- tendril.utils.parsers package
- The Colors Module (
- The Config Module (
- The Database Utils Module (
- The Filesystem Utils Module (
- The Log Utils Module (
- tendril.utils.mq module
- The VCS Utils Module (
- The WWW Utils Module (