Skip to main content

YamlWrapper is a wrapper for yaml files, that creates an abstraction layer in order to handle yaml files in a easy way.

Project description

YamlWrapper

GitHub GitHub tag (latest by date) GitHub top language

Description

YamlWrapper is an abstraction over PyYAML library. Its purpuse is to made easier to interact with .yaml files. This is made possible by create/update/remove operations with two main abstract data types: YamlDictionary and YamlList.

Documentation

You can find the official documentation at this link

Installation

   pip install PythonYamlWrapper

Importing

   from yaml_wrapper import YamlWrapper
   
   yaml_wrapper: YamlWrapper = YamlWrapper("tmp/file_path.yaml")

Abstract data types and examples

The core functionalities provided by YamlWrapper work with YamlDictionary and YamlList.

  • Dictionary
    key_1: "value"
    key_2:
       sub_key_1: "sub_value"
       sub_key_2: 1

I rappresented by:

  data = [
            YamlDictionary("key", "value"),
            YamlDictionary("sub_key", [
                                          YamlDictionary("sub_key_1", "sub_value"),
                                          YamlDictionary("sub_key_2", 1)
                                       ])
  
         ]
  • Lists
- "first_value"
- "second_value"
- "third_value"

I rappresented by:

  data = [
            YamlList(["first_value", "second_value", "third_value"])
         ]
  • Dictionary with list
   key: 
      - "first_value"
      - "second_value"
      - "third_value"

I rappresented by:

  data = [  
            YamlDictionary("key", YamlList(["first_value", "second_value", "third_value"]))
         ]

Special thanks

PyYaml

Author

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

PythonYamlWrapper-1.1.3.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

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

PythonYamlWrapper-1.1.3-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

File details

Details for the file PythonYamlWrapper-1.1.3.tar.gz.

File metadata

  • Download URL: PythonYamlWrapper-1.1.3.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for PythonYamlWrapper-1.1.3.tar.gz
Algorithm Hash digest
SHA256 25f4a7d1e3df4bc00bb493fe1204193a7fff6120302f794dcdf7afcc1dbb4813
MD5 5d521e02a588476c813f9ddc7cd8677c
BLAKE2b-256 9f64e4a7cb0a493082e1edf153a1aa236abf344e99718e58f12ba68285c22866

See more details on using hashes here.

File details

Details for the file PythonYamlWrapper-1.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for PythonYamlWrapper-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 cd0453dcbd89b01e0e1e53280ff3b75f1e8d9b16e3733a683cc99899e194f9c3
MD5 27eb860980941c1d857d2b8d29d93f8e
BLAKE2b-256 c22726065654b01ffe8c999f87ef7f5d6c2edc5c02278038694ca531d6a7a54f

See more details on using hashes here.

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