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.1.tar.gz (28.2 kB view details)

Uploaded Source

Built Distribution

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

drb_driver_yaml-1.3.1-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file drb_driver_yaml-1.3.1.tar.gz.

File metadata

  • Download URL: drb_driver_yaml-1.3.1.tar.gz
  • Upload date:
  • Size: 28.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.20

File hashes

Hashes for drb_driver_yaml-1.3.1.tar.gz
Algorithm Hash digest
SHA256 743ec7a37e8431d5490311e2e0585d534897530e1a885401cf7a25c6e904dee1
MD5 08078b01c902f72e65a3420fb72eb3fd
BLAKE2b-256 21c0d0b4761501f1dd1a3d185dabc9610afad0855b15021c26d82769e18abf3c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drb_driver_yaml-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b41331f14678fbc175a2baf6dd4ba867e676fe88a9c897c0fb374b20cdaeb87d
MD5 a64f0cbd646a89d96b54a5e5498fbe27
BLAKE2b-256 b56844e66d268b183d26b1ddb6de2377ba0bff50fb7497845186de9316bdce7b

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