Skip to main content

Index

  • English Document

    English Document <- Here

  • Japanese Document

    Japanese Document

  • Annotation YAML(ANOY)

    A YAML file that allows type checking for Map types.

    More about ANOY

  • Configuration YAML(Config YAML)

    A YAML file that defines the data types usable in Annotation YAML.

    More about Config YAML

  • ANOY CLI

    A CLI application that verifies whether Annotation YAML adheres to the data type defined in Configuration YAML.

    More about ANOY CLI

Introduction

YAML maps often become nested and complex.

And these requests have come up.

  • Detecting typos in map keys.
  • Verifying the data type of map values.
  • Ensuring the map's nested structure is appropriate.

This library satisfies these requests.

Installing

pip install anoy

Package Dependencies

The following packages may not work properly if they are not installed:

  • PyYAML: Most popular YAML parser for Python.

Usage

library_config.yaml

"@Books":
  "@Summary": List the book titles.
  "!Child": "!FreeMap"
"@Author":
  "@Summary": Author of the book.
  "!Child": "!Str"
"@PublishYear":
  "@Summary": The year of the publishment.
  "!Child": "!Int"
"@Country":
  "@Summary": The author's native language.
  "!Child": "!Str"

valid_library.yaml:

"@Books":
  "Alice's Adventures in Wonderland":
    "@Author": Lewis Carroll
    "@PublishYear": 1865
    "@Country": UK
  "The Little Prince":
    "@Author": Antonie de Saint-Exupéry
    "@PublishYear": 1945
    "@Country": France
  "Harry Potter":
    "@Author": J.K.Rowling
    "@PublishYear": 1997
    "@Country": UK

Use the anoy command to verify data types.

If data type issues are not found, it outputs nothing.

>>> anoy library_config.yaml library.yaml
>>> 

If you mistyped @Auther as @Auther.

invalid_library.yaml:

"@Books":
  "Alice's Adventures in Wonderland":
    "@Auther": Lewis Carroll
    "@PublishYear": 1865
    "@Country": UK
  "The Little Prince":
    "@Auther": Antonie de Saint-Exupéry
    "@PublishYear": 1945
    "@Country": France
  "Harry Potter":
    "@Auther": J.K.Rowling
    "@PublishYear": 1997
    "@Country": UK

When there is an issue with the annotation YAML, anoy outputs as follows.

>>> anoy library_config.yaml library.yaml
>>> Traceback (most recent call last):
    ... (omission) ...
    src.anoyModule.anoyErrors.ConfigYamlError: `@Auther` is not defined.

For Developers

Testing

This project uses pytest.

If you want to test, put in following command.

pytest tests\unit\test_dictTraversal.py

Next To Do

  • READMEの詳細documentの更新。

Ideas

- key01
- key02
- key03

と

- {key01:value01}
- {key02:value02}
- {key03:value03}

を等価に扱うsystemが欲しい。

Metadata

Release files for anoy 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for anoy 0.6.0
File Size Uploaded Provenance Actions
anoy-0.6.0.tar.gz 13.1 kB Without provenance Details for anoy-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for anoy 0.6.0
File Interpreter ABI Platform Actions
anoy-0.6.0-py3-none-any.whl Python 3 none any Details for anoy-0.6.0-py3-none-any.whl

Total release size: 25.0 kB

Release files / anoy-0.6.0.tar.gz

Download URL anoy-0.6.0.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0df174741c94fc3ec5bd8a0053d329873d8953e7223f37894d60a440e8de273b
BLAKE2b-256 checksum
How to use checksums
72fd9e9020a5682dec4c705e90d5dc12d8cc5f2fae0d7ac99da718318665a044
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.3

Release files / anoy-0.6.0-py3-none-any.whl

Download URL anoy-0.6.0-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9761bdc33923dc2b5c79ed472525fa1746f3196b1006a84b7acdc9913b45ca31
BLAKE2b-256 checksum
How to use checksums
e664f58d9386ed6cd6a73c6eee58d8bed30b7dee17d5a541ed20cad796694d7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.3

Security for anoy 0.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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