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.3.0.tar.gz (23.2 kB view details)

Uploaded Source

Built Distribution

astar_utils-0.3.0-py3-none-any.whl (25.0 kB view details)

Uploaded Python 3

File details

Details for the file astar_utils-0.3.0.tar.gz.

File metadata

  • Download URL: astar_utils-0.3.0.tar.gz
  • Upload date:
  • Size: 23.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.4 Windows/10

File hashes

Hashes for astar_utils-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c7102b4347c7e4463927e0d3066f03bc6a0d784af8252599e18277c0313a8912
MD5 b50f079e05f83428c7d31d3c2b15b8d6
BLAKE2b-256 efddf55c28c6955624b0de733d4d578d7d7ec25d18de6388386da0bc9fa9a168

See more details on using hashes here.

File details

Details for the file astar_utils-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: astar_utils-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 25.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.4 Windows/10

File hashes

Hashes for astar_utils-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 473d056c4c873fbf077fcc2249f8c3d5bfd37083d9289b13dc2fde7fb6eed872
MD5 e4f0d060b3dc0333d7c523179ec9ec3f
BLAKE2b-256 2de9f0855d9258f006e8def2ab1a75c410170ad775855be052c0cf25bcbf544f

See more details on using hashes here.

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