Skip to main content

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.
  • iter_read_cache_dirs(), find_cached_file() and get_write_cache_dir(): convenience functions to get the cache path for a A*V package, checking ScopeSim_Data first.

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.

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.7.0.tar.gz (29.4 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.7.0-py3-none-any.whl (32.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: astar_utils-0.7.0.tar.gz
  • Upload date:
  • Size: 29.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.0 CPython/3.12.3 Linux/6.17.0-1021-azure

File hashes

Hashes for astar_utils-0.7.0.tar.gz
Algorithm Hash digest
SHA256 049e837889ba759df71b707ca282ab0737bf990caddea7854f9f06e1d94326a7
MD5 d2ead1d7662fde27f9eb9d4d123da85f
BLAKE2b-256 bafe4f1214ee263c8557d7bd43bd4099d72efa47d513412494f9d402034a55f7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: astar_utils-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 32.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.0 CPython/3.12.3 Linux/6.17.0-1021-azure

File hashes

Hashes for astar_utils-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f5b3a9e63ba54b75824dfe37fa885680c835c6a25976684f298a8fd517743872
MD5 6f6a5ec3cc06c08aedc363bf383d969a
BLAKE2b-256 68d5f70358114ace9d20c4454a0d5b0b6ad5e5a74b0fdb3bc4ba86e58fdccbf0

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 files

0.6.0

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.0

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page