https://github.com/jackkweyunga/interpreter-pattern
Learning the Interpreter pattern by creating a simple desktop app for basic measurements conversion. Made with python and Kivy.
https://github.com/jackkweyunga/interpreter-pattern
Last synced: 9 days ago
JSON representation
Learning the Interpreter pattern by creating a simple desktop app for basic measurements conversion. Made with python and Kivy.
- Host: GitHub
- URL: https://github.com/jackkweyunga/interpreter-pattern
- Owner: jackkweyunga
- License: mit
- Created: 2024-07-22T02:03:37.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-22T02:06:41.000Z (about 2 years ago)
- Last Synced: 2025-10-19T09:05:11.017Z (9 months ago)
- Language: Python
- Size: 21.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
## Example of the use of the `Interpreter Pattern` in Python
This is an example of the use of the `Interpreter Pattern` in Python. The `Interpreter Pattern` is a behavioral design pattern that defines a grammar for a language and an interpreter to interpret the grammar. The grammar is defined using a class hierarchy and the interpreter is implemented using `OOP`.
The final product a simple Measurement converter ( A kivy GUI Desktop App ) that can convert between different basic measurements such as **pints**, **tablespoons**, **gallons**, **quarts** and **cups**.

## How to run the code
1. Clone the repository
2. Install the dependencies in a virtual environment
```shell
git clone https://github.com/jackkweyunga/interpreter-pattern.git
cd interpreter-pattern
python -m venv venv
pip install -r requirements.txt
```
2. Run the `main.py` file
```bash
python main.py
```
## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details