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.7.tar.gz
(3.6 kB
view details)
Built Distribution
File details
Details for the file yaml_keygen-0.1.7.tar.gz
.
File metadata
- Download URL: yaml_keygen-0.1.7.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 356e61ddd5470ecce17a936ec9fea36c61aa35a2e6c4e68a9d5a56d4c6ca1417 |
|
MD5 | ebbc7778b3843eb59871b10ebf954655 |
|
BLAKE2b-256 | 4e262c1d9e48ccc29a1af37366dc3ed22c817717e931cdd670303facec1253ed |
File details
Details for the file yaml_keygen-0.1.7-py3-none-any.whl
.
File metadata
- Download URL: yaml_keygen-0.1.7-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09935b6c36cc556e61b7072863e6e1f48b900f3998b1cfa648cb2ad53aa48837 |
|
MD5 | 3c249a8fefab7827ba70b6d92c404ef8 |
|
BLAKE2b-256 | 5de7c8acc9cd2b7b27282e555a47a3e1de1854eaa20f9657724a0bde640af7eb |