What is zero-true?
Zero-True is an open source python+sql notebook that was built to help individuals and teams collaborate on applications ranging from data visualization to building complex ML models. This project was started to solve a problem we faced ourselves: data products often start in notebooks but then require an expensive translation process into dashboards and frontends. We’ve been building zero-true to simplify sharing notebooks, responding closely to feedback from teams actually working on ML products.
To this end we have built our own reactive notebook (similar to Observable, pluto, etc) that is not based on IPython. With our notebook you can take what were previously ad-hoc single use explorations and transform them into deployable scripts with an integrated frontend. This allows you to convert code and outputs from zero-true into snackable and remixable formats for other developers and non-technical audiences. If you’re just starting out with zero-true, this blog has some useful things to know.
Cells run top to bottom
One of the first things you should know about zero-true is that your notebook runs top to bottom. You will not be able to reference variables that are defined below the cell you are currently in. This makes your code more readable to others you’re working with, as they don’t have to deal with non-linear code flows and can even help you reorient yourself faster when you come back to your own notebooks.
No hidden state
Zero-True has no hidden state. This means rerunning code multiple times will give you consistent results each time. Take the example below:
Cell 1:
Cell 2:
If you want to know what the output will be in zero-true the answer is easy: It’s ‘[1]’ every time. You can see in the gif below that in zero-true, no matter how many times I rerun cell 2, I get the same answer.
In current Ipython notebooks on the other hand you get a different answer each time (Google colab pictured below). Every time you rerun cell 2 you append to the same list and get a different answer.
Related Cells Rerun Reactively
We parse what cells are related in your notebook and automatically rerun downstream cells so that your notebook stays consistent. This helps you catch errors before they happen and provides an interactive coding experience.
Integrated UI library
Our notebook includes an integrated UI library. Intuitive low code syntax allows you to add user inputs to your work and transform your experimentation into an actual application. This means that with one line of code, you can add buttons, sliders and text input components that integrate natively with our application. You can read more about that in a dedicated blogpost about our UI components.
Transforms Into an App
You can preview what your work would look like deployed as an application directly from your notebook. For users that have been moved off of our waitlist, you can also publish to a live URL directly from your notebook. When you publish an app users can interact with UI components and optionally view the code you’ve written. If you’re interested in doing that contact us here!
We hope that this was a helpful introduction to zero-true! We are working on improving the product so if you’re interested and have any suggestions please feel free to reach out!