Skip to main content

Line information for ruamel.yaml.

Project description

ruamel_yaml_line_info

Language Python Versions Code Style Type Checked PEP8 Code Coverage License


Python package PyPI version PyPI download total


Line information for ruamel.yaml.

Quick Start

Using an Alternative Constructor

Instead of:

with open(yaml_path, encoding="utf-8") as fh:
    yaml = ruamel.yaml.YAML(typ="rt").load("".join(fh))

change the import:

with open(yaml_path, encoding="utf-8") as fh:
    yaml = ruamel_yaml_line_info.YAML(typ="rt").load("".join(fh))

and voila!

Patching an existing YAML object

If you already have a ruamel.yaml.YAML instance, you can add line numbers with:

with open(yaml_path, encoding="utf-8") as fh:
    yaml = ruamel.yaml.YAML(typ="rt").load("".join(fh))
    yaml = ruamel_yaml_line_info.YAML.with_line_numbers(yaml=yaml)

Recommended Installation

Install the Python package and dependency management tool poetry using official documentation. You must have Python 3.11 or greater available on your system path, which could be managed by mamba, pyenv, or another package manager. Finally, install the dependencies of the project with:

poetry install

To check successful installation, run:

python -c "import ruamel_yaml_line_info"

Installing into a Mamba Environment

Install the Python package and dependency management tool poetry and the environment manager mamba using official documentation. Create and activate a virtual environment with Python 3.11 or greater:

mamba create -n ruamel_yaml_line_info python=3.11
mamba activate ruamel_yaml_line_info

Then, because Poetry will auto-detect an activated environment, install the project with:

poetry install

To check successful installation, run:

python -c "import ruamel_yaml_line_info"

Development and Testing

See the contributing guide for more information.

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

ruamel_yaml_line_info-0.1.2.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

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

ruamel_yaml_line_info-0.1.2-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file ruamel_yaml_line_info-0.1.2.tar.gz.

File metadata

  • Download URL: ruamel_yaml_line_info-0.1.2.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ruamel_yaml_line_info-0.1.2.tar.gz
Algorithm Hash digest
SHA256 807d6e343d8532bfbabf17f2e6a6a0f4f3a6fb1ad1809508befabfe5254e61a7
MD5 22f91ec3ba20ea5e70b0b5482760838e
BLAKE2b-256 715d649e57eca3a3b10a2c82050f50a7b0847693e4a8415be7efdffb7a6de4de

See more details on using hashes here.

Provenance

The following attestation bundles were made for ruamel_yaml_line_info-0.1.2.tar.gz:

Publisher: publish.yml on nh13/ruamel_yaml_line_info

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ruamel_yaml_line_info-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for ruamel_yaml_line_info-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 268314a29d9e69990e8779eececc094661b4d28da3d420fee396313771cdaed5
MD5 507c9e2a0f2d985b86bdff2a6d7b24df
BLAKE2b-256 697e4a67882f5331f3a1bdfd760ad77462c1667301eb8c1466524818adbc1158

See more details on using hashes here.

Provenance

The following attestation bundles were made for ruamel_yaml_line_info-0.1.2-py3-none-any.whl:

Publisher: publish.yml on nh13/ruamel_yaml_line_info

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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