Skip to main content

Contains commonly-used utilities for AstarVienna's projects.

Project description

Astar Utils

Tests Poetry dev version

codecov PyPI - Version PyPI - Python Version

License: GPL v3

This package is devloped and maintained by Astar Vienna and contains commonly-used utilities for the group's projects to avoid both duplicating code and circular dependencies.

Contents

The package currently contains the following public functions and classes:

  • NestedMapping: a dict-like structure supporting !-style nested keys.
  • RecursiveNestedMapping: a subclass of NestedMapping also supporting keys that reference other !-style keys.
  • NestedChainMap: a subclass of collections.ChainMap supporting instances of RecursiveNestedMapping as levels and referencing !-style keys across chain map levels.
  • is_bangkey(): simple convenience function to check if something is a !-style key.
  • is_nested_mapping(): convenience function to check if something is a mapping containing a least one other mapping as a value.
  • UniqueList: a list-like structure with no duplicate elements and some convenient methods.
  • Badge and subclasses: a family of custom markdown report badges. See docstring for details.
  • BadgeReport: context manager for collection and generation of report badges. See docstring for details and usage.
  • get_logger(): convenience function to get (or create) a logger with given name as a child of the universal astar logger.
  • get_astar_logger(): convenience function to get (or create) a logger with the name astar, which serves as the root for all A*V packages and applications.

Loggers module

  • loggers.ColoredFormatter: a subclass of logging.Formatter to produce colored logging messages for console output.

Dependencies

Dependencies are intentionally kept to a minimum for simplicity. Current dependencies are:

  • more-itertools
  • pyyaml

Version requirement for these dependencies can be found in the pyproject.toml file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

astar_utils-0.2.2.tar.gz (23.5 kB view hashes)

Uploaded Source

Built Distribution

astar_utils-0.2.2-py3-none-any.whl (24.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page