Structs
structs provides some of the key classes of JGDV.
Especially:
ChainGuard, a type guarded failable accessor to nested mappings.
Strang, a Structured
strsubtype.DKey, extends
Stranginto a type guarded Key for getting values from dicts.Locator, extends
DKeyinto a Location/Path central store.rxmatcher, a utility for using the
matchstatement with regular expressions.
Chainguard
key = "value"
[table]
key = "other value"
sub = {key="blah"}
Strang
A Structured String class.
from jgdv.structs.strang import Strang
example : Strang = Strang("head.meta.data::tail.value")
# Regular string index access:
example[0] == "h"
example[0:4] == "he"
# Section access:
example[0,:] == "head.meta.data"
example[1,:] == "tail.value"
example[0,0] == "head"
example[1,0] == "tail"
DKey
Extends Strang to become a key.
from jgdv.structs.dkey import DKey
# TODO
Locator
A Locator and Location pair, to provide a central store of paths.
from jgdv.structs.locator import JGDVLocator
# TODO
RxMatcher
from jgdv.structs import RxMatcher
# TODO