Micro Shop Framework
Made in Python 3.
Welcome to the micro shopping framework, shop-python.
Install it with pip:
python3 -m pip install shop-python --upgrade
You can then import the module.
This module consists of 4 other packages, namely:
- Product
- POS
- Customer
- Store
from shop_python import Product, POS, Customer, Store
Product
Product package class has the following attributes:
- uniqueId
- name
- price
- description
- quantity
uniqueId is not autogenerated for each product. Developer will have to create one, including for all other attributes.
Example usage:
banana = Product(uniqueId="FRUITBANANA001", name="Yellow Sweet Banana", price=2.50, description="Sweet, yellow, ripe banana, air-flown from Australia", quantity=100)
POS
POS is the Point of Sale package that operates the cash register for the clerk/teller to manage customer transactions. Currently it only checks for balance amount and movement of the transactions.
Initiate the POS instance with a starting balance amount.
cashier_pos = POS(balance=100.0)
When performing a transaction for money coming into the cash register, use the money_in() function.
cashier_pos.money_in(amount=24.99)
When performing a transaction for money coming out of the cash register, use the money_out() function.
cashier_pos.money_out(amount=24.99)
To get the current balance of the POS, get its balance attribute.
cashier_pos.balance
Customer
// TODO
Store
A store is one shop. A shop has a name, a list of products and a POS associated with it (TODO: Turn it into a list of POS for multiple tellers/cashiers)
Initiate a store instance with a POS and a list of Products.
my_shop = Store(name="My Supermarket", pos=cashier_pos, products=[banana])
Display a list of products in the store:
my_shop.displayProducts()
Metadata
Release files for shop-python 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| shop_python-0.0.5.tar.gz | 12.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| shop_python-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.9 kB
Release files / shop_python-0.0.5.tar.gz
| Download URL | shop_python-0.0.5.tar.gz |
|---|---|
| Size | 12.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d2fcfe706ae10f2c55de3091296ac5f74920052ae3237cc5aa787577aab74d86
|
|
BLAKE2b-256 checksum How to use checksums |
5a1d446ecdd4900b83ce04b6d2ae5924eae9876b364dc3731b551bac4bb93fb5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / shop_python-0.0.5-py3-none-any.whl
| Download URL | shop_python-0.0.5-py3-none-any.whl |
|---|---|
| Size | 11.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9b4c7cece1f8c9cbe6fca525283206caf9d5ee0eb132a7a71d6e764010aa4e18
|
|
BLAKE2b-256 checksum How to use checksums |
c7eecaf57eb46a91ff73168eaed151fdd3445bd914d77068105e6d64e8d12f25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Security for shop-python 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.