Life Graph
Installation
pip install lifegraph
Life Graph Inspiration
Inspired by this post, I decided I wanted to make my own graph of my life. In the comments on that post, there are many other graphs available, but most of them add lots of different things that I did not care for. They looked extremely nice, but not nearly as simple as the box of squares originally showed in the post. The simplicity of seeing my life on a tiny grid really hit me. I wanted to recreate that.
The folks at waitbutwhy.com own the idea behind this work. They gave me permission to produce and realease this code for free use by everyone else.
A Life Graph Example
The code:
from lifegraph.lifegraph import Lifegraph, Papersize, random_color, Point, Side
from datetime import date, datetime
birthday = date(1995, 11, 20)
g = Lifegraph(birthday, dpi=300, size=Papersize.Letter, label_space_epsilon=1)
g.add_life_event('Won an award', date(2013, 11, 20), '#014421')
g.add_life_event('Hiked the Rocky Mountains', date(2014, 2, 14), '#DC143C', hint=(25, -3))
g.add_life_event('Ran first marathon', date(2017, 9, 11), '#990000')
g.add_life_event('Built a canoe', date(2018, 12, 8), '#87CEFA')
g.add_life_event('Started working at\nEcosia', date(2019, 1, 7), '#00008B')
now = datetime.utcnow()
g.add_life_event('Today', date(now.year, now.month, now.day), (0.75, 0, 0.75))
g.add_era("Elementary School", date(2001, 8, 24), date(2007, 6, 5), 'r')
g.add_era("Intermediate School", date(2007, 8, 24), date(2008, 6, 5), '#00838f')
g.add_era("Middle School", date(2008, 8, 24), date(2010, 6, 5), 'b')
g.add_era("High School", date(2010, 8, 24), date(2014, 6, 5), '#00838f')
g.add_era("College", date(2014, 9, 1), date(2018, 12, 14), (80/255, 0, 0), side=Side.LEFT)
g.add_era_span("Longest vacation ever", date(2016, 8, 22), date(2016, 12, 16), '#D2691E', hint=Point(53, 28))
g.add_title("The life of Someone")
g.show_max_age_label()
g.save("images/alife.png")
Saving and Loading Configurations
Export a lifegraph to a portable JSON or YAML file and recreate it later:
# Export
g.save_config("my_life.json")
g.save_config("my_life.yaml", include_styling=True) # requires: pip install lifegraph[yaml]
# Import
g = Lifegraph.from_config("my_life.json")
g.save("my_life.png")
For tutorials, API reference, and more examples, see the full documentation.
Contributing and Code of Conduct
Metadata
Release files for lifegraph 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lifegraph-0.4.0.tar.gz | 20.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lifegraph-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.7 kB
Release files / lifegraph-0.4.0.tar.gz
| Download URL | lifegraph-0.4.0.tar.gz |
|---|---|
| Size | 20.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
de2069c68a4bb2a0cecbbe2bf253895ac0fd0aee87127265d5125ce8d61b7c99
|
|
BLAKE2b-256 checksum How to use checksums |
f94fae037298adcfc234c3e639e324cd98825a5fdf39ec3681ce487eebf783e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 17, 2026.
Transparency logRelease files / lifegraph-0.4.0-py3-none-any.whl
| Download URL | lifegraph-0.4.0-py3-none-any.whl |
|---|---|
| Size | 21.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ea6eaf5c7cf865a2cbba484eb696e2189023b982cb34494432c42bb2cf651f1f
|
|
BLAKE2b-256 checksum How to use checksums |
982414bcdd9a529eac0aa0f4db7e41c766fafcb78987987508a73d38c04493a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 17, 2026.
Transparency log