How jotapekk/lista-de-compras-python works
This is a small command-line item register. It loads saved items, prompts for names and quantities until the user enters “sair,” saves each addition, then reads and prints the registered items. Item is the domain model; armazenamento handles persistence in a JSON file. The source shows these calls directly; the README is empty, and the separate requests example is not part of the register workflow.
Main entry points: main.py Item register · armazenamento.py Item storage · item.py Item model
Components 5
Command line
- Item register
main.py
Items and storage
- Item model
item.py - Item storage
armazenamento.py - items.json
Other components
- User
Connections 8
- User → Item register: enters items
main.py - Item register → Item storage: loads items
main.py - Item register → Item model: creates item
main.py - Item register → Item storage: saves items
main.py - Item storage → Item model: creates items
armazenamento.py - Item storage → items.json: reads and writes
armazenamento.py - Item register → items.json: reads for display
main.py - Item register → User: prints items
main.py