# Inventory management library
This is an inventory management system built using Python's object-oriented programming principles. The system is designed to manage various types of inventories, such as books, movies, groceries, clothing, and electronics, each with custom attributes. This project structure supports scalability and data integrity through custom exceptions and specialized inventory classes for each product type.
## Index
1. [Installation](#installation)
2. [Documentation](#documentation)
3. [Features](#features)
4. [Examples](#examples)
5. [Contributing](#contributing)
## Installation <a name="installation"></a>
To install this project, clone the repository and install any necessary dependencies.
```
git clone https://github.com/username/inventory-management.git
```
## Documentation <a name="documentation"></a>
This project uses Sphinx with the Read the Docs theme to generate and manage project documentation. This section explains how to set up, configure, and generate documentation, making it easier for contributors and users to understand and navigate the project.
### Setting Up Documentation
**1. Install Requirements**
Ensure that Sphinx and the sphinx_rtd_theme are installed by running:
```
pip install -r requirements.txt
```
**2. Initialize Sphinx**
In the root of the project directory, initialize Sphinx by running:
```
sphinx-quickstart
```
**3. Configure Sphinx Theme**
In the docs/conf.py file, set up the Read the Docs theme by adding or modifying the following line:
```
html_theme = "sphinx_rtd_theme"
```
**4. Generate Documentation**
After adding docstrings to your code (as shown in the class and method definitions), generate the HTML documentation by running:
```
cd docs
make html
```
This will create an html folder inside docs/_build/, containing the generated documentation.
**5. View Documentation**
Open the index.html file in the docs/_build/html/ directory to view the documentation in your browser.
## Features <a name="features"></a>
- **Flexible Product Types**: Includes different types of products, each with specific attributes, such as books, movies, groceries, clothing, and electronics.
- **Specialized Inventory Types**: Supports libraries, movie rental stores, grocery stores, clothing stores, electronics shops, and online stores.
- **Custom Exception Handling**: Ensures data integrity by raising specific errors, such as invalid quantity values or mismatched product types.
- **Extensibility**: Designed to be easily extended to support new product and inventory types.
## Usage <a name="usage"></a>
**Product Types**
The system includes the following product types, each inheriting from the base Product class and featuring unique attributes:
- Book: Represents books with attributes author and isbn.
- Movie: Represents movies with attributes director and rating.
- Food: Represents food items with an expiration_date.
- Clothing: Represents clothing items with attributes size, color, and material.
- Electronics: Represents electronic items with brand and warranty.
Each product class has a total_value method to calculate the total stock value and a __str__ method to display its details.
**Inventory Types**
The following inventory types are available, each managing a specific product type:
- Library: Manages Book products.
- MovieRentalStore: Manages Movie products.
- GroceryStore: Manages Food products.
- ClothingStore: Manages Clothing products.
- ElectronicShop: Manages Electronics products.
- OnlineShop: A flexible inventory that can manage any type of Product.
Each inventory class includes methods to:
- Add products (restricted to the correct type per store)
- Remove products by name
- Update product details such as quantity and price
**Exceptions**
The system includes custom exceptions for better error handling:
- InvalidQuantityError: Raised when attempting to set a negative quantity or price.
- ProductNotAvailableError: Raised when trying to access a product that is not available in the inventory.
- InvalidProductError: Raised when adding an incorrect product type to a specific inventory type.
Raw data
{
"_id": null,
"home_page": "https://github.com/naroaetxebarria/inventory-management.git",
"name": "my-inventory-management-library",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "Inventory, Product, Shop",
"author": "Ane V\u00e1zquez, Ainhize Barredo, Naroa Etxebarria and Lucia Saiz",
"author_email": "ane.vazquez@ikasleak.salesianosdeusto.com",
"download_url": "https://files.pythonhosted.org/packages/6a/da/8fdd00329ca17b5026ed66fff8da147f416db8a576cfdb108f3d623882eb/my_inventory_management_library-0.1.tar.gz",
"platform": null,
"description": "# Inventory management library\r\nThis is an inventory management system built using Python's object-oriented programming principles. The system is designed to manage various types of inventories, such as books, movies, groceries, clothing, and electronics, each with custom attributes. This project structure supports scalability and data integrity through custom exceptions and specialized inventory classes for each product type.\r\n\r\n## Index\r\n1. [Installation](#installation)\r\n2. [Documentation](#documentation)\r\n3. [Features](#features)\r\n4. [Examples](#examples)\r\n5. [Contributing](#contributing)\r\n\r\n## Installation <a name=\"installation\"></a>\r\nTo install this project, clone the repository and install any necessary dependencies.\r\n```\r\ngit clone https://github.com/username/inventory-management.git\r\n```\r\n## Documentation <a name=\"documentation\"></a>\r\nThis project uses Sphinx with the Read the Docs theme to generate and manage project documentation. This section explains how to set up, configure, and generate documentation, making it easier for contributors and users to understand and navigate the project.\r\n### Setting Up Documentation\r\n**1. Install Requirements**\r\n\r\nEnsure that Sphinx and the sphinx_rtd_theme are installed by running:\r\n```\r\npip install -r requirements.txt\r\n```\r\n**2. Initialize Sphinx**\r\n\r\nIn the root of the project directory, initialize Sphinx by running:\r\n```\r\nsphinx-quickstart\r\n```\r\n**3. Configure Sphinx Theme**\r\n\r\nIn the docs/conf.py file, set up the Read the Docs theme by adding or modifying the following line:\r\n```\r\nhtml_theme = \"sphinx_rtd_theme\"\r\n```\r\n**4. Generate Documentation**\r\n\r\nAfter adding docstrings to your code (as shown in the class and method definitions), generate the HTML documentation by running:\r\n```\r\ncd docs\r\nmake html\r\n```\r\nThis will create an html folder inside docs/_build/, containing the generated documentation.\r\n\r\n**5. View Documentation**\r\n\r\nOpen the index.html file in the docs/_build/html/ directory to view the documentation in your browser.\r\n## Features <a name=\"features\"></a>\r\n- **Flexible Product Types**: Includes different types of products, each with specific attributes, such as books, movies, groceries, clothing, and electronics.\r\n- **Specialized Inventory Types**: Supports libraries, movie rental stores, grocery stores, clothing stores, electronics shops, and online stores.\r\n- **Custom Exception Handling**: Ensures data integrity by raising specific errors, such as invalid quantity values or mismatched product types.\r\n- **Extensibility**: Designed to be easily extended to support new product and inventory types.\r\n\r\n## Usage <a name=\"usage\"></a>\r\n**Product Types**\r\nThe system includes the following product types, each inheriting from the base Product class and featuring unique attributes:\r\n\r\n- Book: Represents books with attributes author and isbn.\r\n- Movie: Represents movies with attributes director and rating.\r\n- Food: Represents food items with an expiration_date.\r\n- Clothing: Represents clothing items with attributes size, color, and material.\r\n- Electronics: Represents electronic items with brand and warranty.\r\n\r\nEach product class has a total_value method to calculate the total stock value and a __str__ method to display its details.\r\n\r\n**Inventory Types**\r\nThe following inventory types are available, each managing a specific product type:\r\n\r\n- Library: Manages Book products.\r\n- MovieRentalStore: Manages Movie products.\r\n- GroceryStore: Manages Food products.\r\n- ClothingStore: Manages Clothing products.\r\n- ElectronicShop: Manages Electronics products.\r\n- OnlineShop: A flexible inventory that can manage any type of Product.\r\n\r\nEach inventory class includes methods to:\r\n- Add products (restricted to the correct type per store)\r\n- Remove products by name\r\n- Update product details such as quantity and price\r\n\r\n**Exceptions**\r\nThe system includes custom exceptions for better error handling:\r\n\r\n- InvalidQuantityError: Raised when attempting to set a negative quantity or price.\r\n- ProductNotAvailableError: Raised when trying to access a product that is not available in the inventory.\r\n- InvalidProductError: Raised when adding an incorrect product type to a specific inventory type.\r\n",
"bugtrack_url": null,
"license": null,
"summary": "Library to manage different inventories",
"version": "0.1",
"project_urls": {
"Homepage": "https://github.com/naroaetxebarria/inventory-management.git"
},
"split_keywords": [
"inventory",
" product",
" shop"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0ab2bbcc53020f2a0687049ee3a03026e1e0214e9bcdd1605f22263e592d6bba",
"md5": "c7f0b349de6176c9c4986d9f530fb866",
"sha256": "26534a41f6c092f5f0e5e4749a42ae0f7874b8444ea3697b94a9ef449794a9c5"
},
"downloads": -1,
"filename": "my_inventory_management_library-0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c7f0b349de6176c9c4986d9f530fb866",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 3130,
"upload_time": "2024-11-13T17:19:03",
"upload_time_iso_8601": "2024-11-13T17:19:03.123544Z",
"url": "https://files.pythonhosted.org/packages/0a/b2/bbcc53020f2a0687049ee3a03026e1e0214e9bcdd1605f22263e592d6bba/my_inventory_management_library-0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "693e9de918508bf7d91b62c63ce68dc8c60385c86140a65240095d485e6f3df6",
"md5": "4831cf2c81723724b6226a2bf56a299f",
"sha256": "1671b0d400d745ac34d1e92451dbbf3f1b02637249da12d7134db0a94aef2673"
},
"downloads": -1,
"filename": "My_Inventory_Management_Library-0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4831cf2c81723724b6226a2bf56a299f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 3133,
"upload_time": "2024-11-13T17:18:11",
"upload_time_iso_8601": "2024-11-13T17:18:11.486147Z",
"url": "https://files.pythonhosted.org/packages/69/3e/9de918508bf7d91b62c63ce68dc8c60385c86140a65240095d485e6f3df6/My_Inventory_Management_Library-0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6ada8fdd00329ca17b5026ed66fff8da147f416db8a576cfdb108f3d623882eb",
"md5": "be04b66049728a681e2b674ab5291bfb",
"sha256": "fe1ef90e46fca18f88e4340909cf2abf6b61ea4f9a7f393827b2a6971b897c96"
},
"downloads": -1,
"filename": "my_inventory_management_library-0.1.tar.gz",
"has_sig": false,
"md5_digest": "be04b66049728a681e2b674ab5291bfb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 3108,
"upload_time": "2024-11-13T17:19:04",
"upload_time_iso_8601": "2024-11-13T17:19:04.717448Z",
"url": "https://files.pythonhosted.org/packages/6a/da/8fdd00329ca17b5026ed66fff8da147f416db8a576cfdb108f3d623882eb/my_inventory_management_library-0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-13 17:19:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "naroaetxebarria",
"github_project": "inventory-management",
"github_not_found": true,
"lcname": "my-inventory-management-library"
}