Define family trees in YAML http://pypi.org/project/yamily

Fabian Peter Hammerle d97deb8759 readme: added yaml export sample před 4 roky
.githooks d97deb8759 readme: added yaml export sample před 4 roky
tests edbb8bea9a lint tests před 4 roky
yamily 762a858e4b added class docstrings před 4 roky
.gitignore 16db0bdf18 added pytest-cov před 4 roky
.pylintrc 762a858e4b added class docstrings před 4 roky
Pipfile f13d438e9c added cli entry point `yamily-list` před 4 roky
Pipfile.lock f13d438e9c added cli entry point `yamily-list` před 4 roky
README.md d97deb8759 readme: added yaml export sample před 4 roky
conftest.py ecfca36c84 added yaml loader for person class před 4 roky
pytest.ini 27bdc55133 pytest: permanently enable doctest před 4 roky
setup.py f13d438e9c added cli entry point `yamily-list` před 4 roky

README.md

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/