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 Conda version PyPI download total Conda 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 with Conda

Install the environment manager mamba using official documentation. Create and activate a conda environment with Python 3.11 or greater:

mamba create -c conda-forge -n ruamel_yaml_line_info ruamel-yaml-line-info python=3.11
mamba activate ruamel_yaml_line_info

Alternatively, install into an existing conda environment:

mamba install -n <ENVIRONMENT> -c conda-forge ruamel-yaml-line-info

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: ruamel_yaml_line_info-0.1.3.tar.gz
  • Upload date:
  • Size: 9.8 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.3.tar.gz
Algorithm Hash digest
SHA256 fbc187ea663a92933f94a88eb6bf8e28e9dc581eea97d5435054e05a1005cb6e
MD5 e19ac577a6edf061bb31e9797c7117c0
BLAKE2b-256 2bf509ff9d8dbb81a9e3552d3a4d8cf7f4b5e72cfdaad8a2a6142809fb1f08d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for ruamel_yaml_line_info-0.1.3.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.3-py3-none-any.whl.

File metadata

File hashes

Hashes for ruamel_yaml_line_info-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8a79e6c4cfc04b95200224ef3ccb2285b6ed04c73f11dbee92a82680e160215b
MD5 e82fd20f392525aca702adba125fd0c8
BLAKE2b-256 5185cf6db6aad12aea98a36767b080a8a52f2e897df62782f2b819ff4d8f4be7

See more details on using hashes here.

Provenance

The following attestation bundles were made for ruamel_yaml_line_info-0.1.3-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