Skip to main content

DRB yaml driver

Project description

YamlNode Implementation

This drb-driver-yaml module implements yaml format access with DRB data model. It is able to navigates among the yaml contents.

Yaml Factory and Yaml Node

The module implements the basic factory model defined in DRB in its node resolver. Based on the python entry point mechanism, this module can be dynamically imported into applications.

The entry point group reference is drb.driver.
The implementation name is yaml.
The factory class is encoded into drb.drivers.yaml:YamlNodeFactory.

The yaml factory creates a YamlNode from an existing yaml content. It uses a base node to access the content data using the streamed base node implementation.

The base node can be a FileNode (See drb-driver-file), HttpNode, ZipNode or any other node able to provide streamed (BufferedIOBase, RawIOBase, IO) yaml content.

limitations

The current version does not manage child modification and insertion. yamlNode is currently read only.

Using this module

To include this module into your project, the drb-driver-yaml module shall be referenced into requirement.txt file, or the following pip line can be run:

pip install drb-driver-yaml

Node Creation:

The implementation can create a yamlNode by giving the path to a yaml file:

from drb.driver.yaml import YamlNode

node = YamlNode(PATH_yaml)

If the baseNode is an HttpNode, FileNode... the implementation can retrieve the data of your yaml with this:

from drb.drivers.yaml import YamlNodeFactory

FACTORY = YamlNodeFactory()
FILE_NODE = DrbFileNode(PATH_TO_YOUR_YAML)
NODE = FACTORY.create(FILE_NODE)

Documentation

The documentation of this implementation can be found here https://drb-python.gitlab.io/impl/yaml

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

drb-driver-yaml-1.3.0.tar.gz (27.6 kB view details)

Uploaded Source

Built Distribution

drb_driver_yaml-1.3.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file drb-driver-yaml-1.3.0.tar.gz.

File metadata

  • Download URL: drb-driver-yaml-1.3.0.tar.gz
  • Upload date:
  • Size: 27.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.18

File hashes

Hashes for drb-driver-yaml-1.3.0.tar.gz
Algorithm Hash digest
SHA256 97cb3ee3223dd72644473179b9832e98d7f91ccf127678e9d977a8bff9e461d6
MD5 3217b31d940719fee5bc815d5bfda76f
BLAKE2b-256 8c8fcd4f3f54308936126457fd91914b19c8fd3538642a0f8b5d02a3df755c76

See more details on using hashes here.

File details

Details for the file drb_driver_yaml-1.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for drb_driver_yaml-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 45d9232b58a51f5e682c8f36c1498c46b7692e252c1289f443642652bfdda693
MD5 d2f11d3926cf82cf93619acbfddf993f
BLAKE2b-256 b09e6ad8cddf16c4411563fa5558d75316e27c10130196c5c5d1d6c581756521

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page