README.md 825 B

yamily

Define family trees in YAML

Setup

$ sudo apt-get install python3-yaml # optional on debian
$ pip3 install --user --upgrade yamily

Usage

Export YAML

>>> import datetime, yaml, yamily, yamily.yaml
>>> alice = yamily.Person("alice")
>>> alice.name = "Alice Test"
>>> alice.birth_date = datetime.date(2019, 12, 23)
>>> alice
Person(alice, Alice Test, *2019-12-23)

>>> alice.father = yamily.Person("alice-father")
>>> alice.father.name = "Bob Test"

>>> print(yaml.dump(alice, Dumper=yamily.yaml.Dumper))
!person
birth_date: 2019-12-23
father: !person
  identifier: alice-father
  name: Bob Test
identifier: alice
name: Alice Test
<BLANKLINE>

Develop

$ git clone git@git.hammerle.me:fphammerle/yamily.git
$ cd yamily
$ git config --local core.hooksPath .githooks/