A Python module for extracting keys from a YAML file.
Project description
YAML KEYGEN
A Python module for extracting keys from a YAML file. If a YAML contains a nested hierarchy then the complete path is listed from parent to child key.
Installation
Use the package manager pip to install yaml_keygen.
pip install yaml_keygen
The source code is currently hosted on GitHub at: https://github.com/Fa1sal-ali/yaml_keygen
Get Started
from yaml_keygen import YAML
# Initialize the YAML object
yk = YAML()
# Reads the YAML and return a dictionary object
yaml = yk.read(filename="<PATH>")
# Extracts the keys from dictionary object and stores them in a list
keys = yk.get_keys(data=yaml, sep='/')
# Saves the extracted keys to a text file
yk.to_text(data=keys, filename="<PATH>")
Dependencies
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
yaml_keygen-0.1.8.tar.gz
(3.6 kB
view details)
Built Distribution
File details
Details for the file yaml_keygen-0.1.8.tar.gz
.
File metadata
- Download URL: yaml_keygen-0.1.8.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 404ec791a5488b708d9706f18d55ae2bfe915449d08a29d5f4b00df6fe00b274 |
|
MD5 | 8ee57ab9a1428955bf13c1f474493fd2 |
|
BLAKE2b-256 | f6e262595bd79cec0362a46d263401a87d72dd51cce71501273d68fddcd8acd8 |
File details
Details for the file yaml_keygen-0.1.8-py3-none-any.whl
.
File metadata
- Download URL: yaml_keygen-0.1.8-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d142434902d4b17252540a14b626762b11544979c10760e24298ddf0d877ef52 |
|
MD5 | f81975f14bf21a382a0551cc65dc83a3 |
|
BLAKE2b-256 | 3bc9578e25e9dd619358f6a49ef80983b7e81c7c319d19f9bb4ebb03cc6c804a |