Examples#
Calculator#
It’s easy to create a good-looking program with Edifice. In this example, we imitate the look of the MacOS Calculator app in 100 lines of code (most of which is implementing the calculator state machine).
The code is available at calculator.py.
![_images/example_calculator.png](_images/example_calculator.png)
python examples/calculator.py
python -m edifice --inspect examples/calculator.py Main
Financial Charting#
In this example, we create a reactive charting application with Edifice which fetches stock data from Yahoo Finance.
The code is available at financial_charts.py.
![_images/example_financial_charting4.png](_images/example_financial_charting4.png)
python examples/financial_charts.py
python -m edifice --inspect examples/financial_charts.py Main
TodoMVC#
An implementation of TodoMVC in Edifice.
TodoMVC is a simple todo list program written in many JavaScript frameworks, so that web developers can compare the frameworks by comparing the TodoMVC implementations.
For comparison, the Edifice TodoMVC program is available at todomvc.py.
![_images/example_todomvc.png](_images/example_todomvc.png)
python examples/todomvc.py
python -m edifice --inspect examples/todomvc.py Main
Harmonic Oscillator#
An example of animation in Edifice.
The code is available at harmonic_oscillator.py.
![_images/example_harmonic_oscillator2.png](_images/example_harmonic_oscillator2.png)
python examples/harmonic_oscillator.py
python -m edifice --inspect examples/harmonic_oscillator.py Main