2015-12-28 21:22:51 +00:00
|
|
|
# NimYAML - YAML implementation in Nim
|
2016-09-21 19:20:57 +00:00
|
|
|
# (c) Copyright 2016 Felix Krause
|
2015-12-28 21:22:51 +00:00
|
|
|
#
|
|
|
|
# See the file "copying.txt", included in this
|
|
|
|
# distribution, for details about the copyright.
|
|
|
|
|
2016-09-21 19:20:57 +00:00
|
|
|
## This is the parent module of NimYAML, a package that provides facilities to
|
|
|
|
## generate and interpret `YAML <http://yaml.org>`_ character streams. Importing
|
|
|
|
## this package will import everything from all subpackages.
|
2015-12-27 20:36:47 +00:00
|
|
|
##
|
2016-09-21 19:20:57 +00:00
|
|
|
## There are three high-level APIs which are probably most useful:
|
|
|
|
##
|
2016-10-01 13:19:42 +00:00
|
|
|
## * The serialization API in `serialization <yaml.serialization.html>`_ enables
|
2016-09-21 19:20:57 +00:00
|
|
|
## you to load YAML data directly into native Nim types, and reversely dump
|
|
|
|
## native Nim types as YAML.
|
2016-10-01 13:19:42 +00:00
|
|
|
## * The DOM API in `dom <yaml.dom.html>`_ parses YAML files in a tree structure
|
2016-09-21 19:20:57 +00:00
|
|
|
## which you can navigate.
|
2016-10-01 13:19:42 +00:00
|
|
|
## * The JSON API in `tojson <yaml.tojson.html>`_ parses YAML files into the
|
2016-09-21 19:20:57 +00:00
|
|
|
## Nim stdlib's JSON structure, which may be useful if you have other modules
|
|
|
|
## which expect JSON input. Note that the serialization API is able to write
|
|
|
|
## and load JSON; you do not need the JSON API for that.
|
|
|
|
##
|
|
|
|
## Apart from those high-level APIs, NimYAML implements a low-level API which
|
|
|
|
## enables you to process YAML input as data stream which does not need to be
|
|
|
|
## loaded into RAM completely at once. It consists of the following modules:
|
|
|
|
##
|
2016-10-01 13:19:42 +00:00
|
|
|
## * The stream API in `stream <yaml.stream.html>`_ defines the central type for
|
2016-09-21 19:20:57 +00:00
|
|
|
## stream processing, ``YamlStream``. It also contains definitions and
|
|
|
|
## constructor procs for stream events.
|
2016-10-01 13:19:42 +00:00
|
|
|
## * The parser API in `parser <yaml.parser.html>`_ gives you direct access to
|
2016-09-21 19:20:57 +00:00
|
|
|
## the YAML parser's output.
|
|
|
|
## * The presenter API in `presenter <yaml/presenter.html>`_ gives you direct
|
|
|
|
## access to the presenter, i.e. the module that renders a YAML character
|
|
|
|
## stream.
|
2016-10-01 13:19:42 +00:00
|
|
|
## * The taglib API in `taglib <yaml.taglib.html>`_ provides a data structure
|
2016-09-21 19:20:57 +00:00
|
|
|
## for keeping track of YAML tags that are generated by the parser or used in
|
|
|
|
## the presenter.
|
2016-10-01 13:19:42 +00:00
|
|
|
## * The hints API in `hints <yaml.hints.html>`_ provides a simple proc for
|
2016-09-21 19:20:57 +00:00
|
|
|
## guessing the type of a scalar value.
|
2015-12-27 20:36:47 +00:00
|
|
|
|
2018-10-11 12:19:48 +00:00
|
|
|
import yaml / [dom, hints, parser, presenter,
|
|
|
|
serialization, stream, taglib, tojson]
|
|
|
|
|
|
|
|
export dom, hints, parser, presenter,
|
|
|
|
serialization, stream, taglib, tojson
|