astar-utils


Nameastar-utils JSON
Version 0.3.1 PyPI version JSON
download
home_pagehttps://github.com/AstarVienna/astar-utils
SummaryContains commonly-used utilities for AstarVienna's projects.
upload_time2024-10-18 10:06:30
maintainerFabian Haberhauer
docs_urlNone
authorFabian Haberhauer
requires_python<4.0,>=3.10
licenseGPL-3.0-or-later
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Astar Utils

[![Tests](https://github.com/AstarVienna/astar-utils/actions/workflows/tests.yml/badge.svg)](https://github.com/AstarVienna/astar-utils/actions/workflows/tests.yml)
[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
![dev version](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2FAstarVienna%2Fastar-utils%2Fmain%2Fpyproject.toml&query=%24.tool.poetry.version&label=dev%20version&color=teal)

[![codecov](https://codecov.io/gh/AstarVienna/astar-utils/graph/badge.svg)](https://codecov.io/gh/AstarVienna/astar-utils)
[![PyPI - Version](https://img.shields.io/pypi/v/astar-utils)](https://pypi.org/project/astar-utils/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/astar-utils)

[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)

This package is devloped and maintained by [Astar Vienna](https://github.com/AstarVienna) 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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/AstarVienna/astar-utils",
    "name": "astar-utils",
    "maintainer": "Fabian Haberhauer",
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": "fabian.haberhauer@univie.ac.at",
    "keywords": null,
    "author": "Fabian Haberhauer",
    "author_email": "fabian.haberhauer@univie.ac.at",
    "download_url": "https://files.pythonhosted.org/packages/e0/55/3bbc3fd9e7522dc78b7d765292f6b5dc1306489ca153039904a98825609d/astar_utils-0.3.1.tar.gz",
    "platform": null,
    "description": "# Astar Utils\n\n[![Tests](https://github.com/AstarVienna/astar-utils/actions/workflows/tests.yml/badge.svg)](https://github.com/AstarVienna/astar-utils/actions/workflows/tests.yml)\n[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)\n![dev version](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2FAstarVienna%2Fastar-utils%2Fmain%2Fpyproject.toml&query=%24.tool.poetry.version&label=dev%20version&color=teal)\n\n[![codecov](https://codecov.io/gh/AstarVienna/astar-utils/graph/badge.svg)](https://codecov.io/gh/AstarVienna/astar-utils)\n[![PyPI - Version](https://img.shields.io/pypi/v/astar-utils)](https://pypi.org/project/astar-utils/)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/astar-utils)\n\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n\nThis package is devloped and maintained by [Astar Vienna](https://github.com/AstarVienna) and contains commonly-used utilities for the group's projects to avoid both duplicating code and circular dependencies.\n\n## Contents\n\nThe package currently contains the following public functions and classes:\n\n- `NestedMapping`: a `dict`-like structure supporting !-style nested keys.\n- `RecursiveNestedMapping`: a subclass of `NestedMapping` also supporting keys that reference other !-style keys.\n- `NestedChainMap`: a subclass of `collections.ChainMap` supporting instances of `RecursiveNestedMapping` as levels and referencing !-style keys across chain map levels.\n- `is_bangkey()`: simple convenience function to check if something is a !-style key.\n- `is_nested_mapping()`: convenience function to check if something is a mapping containing a least one other mapping as a value.\n- `UniqueList`: a `list`-like structure with no duplicate elements and some convenient methods.\n- `Badge` and subclasses: a family of custom markdown report badges. See docstring for details.\n- `BadgeReport`: context manager for collection and generation of report badges. See docstring for details and usage.\n- `get_logger()`: convenience function to get (or create) a logger with given `name` as a child of the universal `astar` logger.\n- `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.\n- `SpectralType`: a class to parse, store and compare spectral type designations.\n\n### Loggers module\n\n- `loggers.ColoredFormatter`: a subclass of `logging.Formatter` to produce colored logging messages for console output.\n\n## Dependencies\n\nDependencies are intentionally kept to a minimum for simplicity. Current dependencies are:\n\n- `more-itertools`\n- `pyyaml`\n\nVersion requirement for these dependencies can be found in the `pyproject.toml` file.\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-or-later",
    "summary": "Contains commonly-used utilities for AstarVienna's projects.",
    "version": "0.3.1",
    "project_urls": {
        "Homepage": "https://github.com/AstarVienna/astar-utils",
        "Repository": "https://github.com/AstarVienna/astar-utils"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8d0c01e3ead9af17389e39098b839c6a18e36d570d2a0ad0289041bc0c1ff6f1",
                "md5": "190d094c9e9fc9cfab81300825629cb4",
                "sha256": "6cb6cac868ec4642130183ad3f9519cd60cf37b7326ff0bf38a19caee90d5638"
            },
            "downloads": -1,
            "filename": "astar_utils-0.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "190d094c9e9fc9cfab81300825629cb4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 27976,
            "upload_time": "2024-10-18T10:06:28",
            "upload_time_iso_8601": "2024-10-18T10:06:28.777180Z",
            "url": "https://files.pythonhosted.org/packages/8d/0c/01e3ead9af17389e39098b839c6a18e36d570d2a0ad0289041bc0c1ff6f1/astar_utils-0.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e0553bbc3fd9e7522dc78b7d765292f6b5dc1306489ca153039904a98825609d",
                "md5": "a671009fc8542b348b18bad49df85cc4",
                "sha256": "eae7108aa508b5c6364aac7c4e6160ea13ff5d5887550477a477eb62db4c5270"
            },
            "downloads": -1,
            "filename": "astar_utils-0.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "a671009fc8542b348b18bad49df85cc4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 26307,
            "upload_time": "2024-10-18T10:06:30",
            "upload_time_iso_8601": "2024-10-18T10:06:30.361906Z",
            "url": "https://files.pythonhosted.org/packages/e0/55/3bbc3fd9e7522dc78b7d765292f6b5dc1306489ca153039904a98825609d/astar_utils-0.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-18 10:06:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "AstarVienna",
    "github_project": "astar-utils",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "astar-utils"
}
        
Elapsed time: 0.74985s