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 GitHub Release Date

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.
  • SpectralType: a class to parse, store and compare spectral type designations.

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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

astar_utils-0.3.3-py3-none-any.whl (28.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: astar_utils-0.3.3.tar.gz
  • Upload date:
  • Size: 27.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.11.0-1015-azure

File hashes

Hashes for astar_utils-0.3.3.tar.gz
Algorithm Hash digest
SHA256 14efaf744f13a695498170ceadbf979c8d71c3c06b204c8bbce1db468f3cccc4
MD5 f414da8f7ac21d70877bd57ff046cfd4
BLAKE2b-256 c6177124cda3ac24ebfdd18bae79f4846f2429fa8e8271a613ec3295b74f7027

See more details on using hashes here.

File details

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

File metadata

  • Download URL: astar_utils-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 28.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.11.0-1015-azure

File hashes

Hashes for astar_utils-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b1abb5fb9a20b73f796d204b3e054ddcb29c27c26a6d01eb6943abd671a248a8
MD5 b2b60339579c41d8e7e1211df4f0237b
BLAKE2b-256 48d5a1c3ecb242a6b3096ed4c0ca621a2b53c682781894e64121901ab9590f99

See more details on using hashes here.

Supported by

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