Cyberbrain: helps you remember everything
https://github.com/laike9m/Cyberbrain.
[Deprecation]: This project is deprecated and archived. I rewrote it from scratch, seeNOTE: This is a WIP, DON'T use it in production.
I gave a talk at PyCon China 2019 about Cyberbrain, slide can be found here.
How to use
- Install Graphviz
pip install cyberbrain
- In your program, first call
cyberbrain.init()
, then callcyberbrain.register(target_variable)
.
Here's an example.
def func_f(bar):
x = len(bar)
return x
def func_c(baa):
baa.append(None)
baa.append('?')
def func_a(foo):
for i in range(2): pass
ba = [foo]
func_c(ba)
foo = func_f(ba) # foo is our target
cyberbrain.register(foo)
import cyberbrain
cyberbrain.init()
fo = 1
func_a(fo)
Run it, a pdf like this will be generated and automatically opened.
Developement
First install Poetry
, then run poetry install
.