(_Note: This is mostly just a forum for discussing different ways of using these YAML tags to do work with various python modules. It makes it convenient to store Path-Like objects as well as with using the pkgresources module.)
PyYaml Documentation
YAML tag
Python type
Standard YAML tags
!!null
None
!!bool
bool
!!int
int or long (int in Python 3)
!!float
float
!!binary
str (bytes in Python 3)
!!timestamp
datetime.datetime
!!omap, !!pairs
list of pairs
!!set
set
!!str
str or unicode (str in Python 3)
!!seq
list
!!map
dict
Python-specific tags
!!python/none
None
!!python/bool
bool
!!python/bytes
(bytes in Python 3)
!!python/str
str (str in Python 3)
!!python/unicode
unicode (str in Python 3)
!!python/int
int
!!python/long
long (int in Python 3)
!!python/float
float
!!python/complex
complex
!!python/list
list
!!python/tuple
tuple
!!python/dict
dict
Complex Python tags
!!python/name:module.name
module.name
!!python/module:package.module
package.module
!!python/object:module.cls
module.cls instance
!!python/object/new:module.cls
module.cls instance
!!python/object/apply:module.f
value of f(...)
Use Case Examples
Importing Data files
Python implementation
from pkg_resources import resource_filename
from Datasnakes.Manager.config import references
path = resource_filename(references.__name__, "Local_Reliability_Measures_from_Sets_of_Co-optimal_Multiple_Sequence_Alignments.pdf")
(_Note: This is mostly just a forum for discussing different ways of using these YAML tags to do work with various python modules. It makes it convenient to store Path-Like objects as well as with using the pkgresources module.)
PyYaml Documentation
Use Case Examples
Importing Data files
Python implementation
YAML implementation
Importing path-like objects
Python implementation
YAML implementation