Asset Manager is a powerful and user-friendly desktop application designed to help organizations and individuals efficiently manage their assets. Built using Python’s tkinter
library, this app offers a modern and responsive interface for adding, searching, editing, and managing asset data, all stored conveniently in an Excel file.
The app supports theme toggling between light and dark modes and includes essential features like a calendar widget for date entries, a dynamic search system, and in-place editing of records. It is especially useful for small to medium-sized businesses that need a straightforward solution for asset tracking without investing in complex or expensive software.
- Insert New Records: Add new asset details such as Asset#, Model, User, S/N, Monitor S/N, E Port, Keyboard, and Purchase Date directly into the application.
- Search and Filter: Quickly filter and search records based on specific columns and keywords.
- Edit Records: Double-click any record in the list to open an edit dialog and make changes, which are automatically saved back to the Excel file.
- Dynamic Theme Switching: Toggle between light and dark themes using a simple switch, providing a comfortable user experience in various lighting conditions.
- Excel Integration: Seamlessly load and save asset data to and from an Excel file, allowing easy sharing and backup.
- Date Entry Widget: Use a calendar widget to select dates, making it easy to input or update purchase dates.
- Python 3.x
- Libraries:
tkinter
(standard Python library)openpyxl
(Excel file handling)tkcalendar
(calendar widget for date entries)
You can install the necessary libraries using:
pip install openpyxl tkcalendar
-
Clone the Repository:
git clone https://github.com/yourusername/asset-manager.git cd asset-manager
-
Prepare the Excel File:
Ensure you have an Excel file named
file.xlsx
in the root directory with the following structure:- Columns:
Asset#, Model No, User, S/N, Monitor SN, E Port, Keyboard, Purchase Date
- You can create one manually or use the provided template.
- Columns:
-
Run the Application:
python asset_manager.py
-
Input Fields:
- Asset#: Enter the asset number.
- Model No: Select the model from the dropdown.
- User: Enter the name of the user responsible for the asset.
- S/N: Enter the serial number.
- Monitor S/N: Enter the serial number of the monitor (if applicable).
- E Port: Enter the E port information.
- Keyboard: Enter the keyboard details.
- Purchase Date: Use the calendar widget to pick the purchase date.
-
Insert Record:
- Click the "Insert" button to add the asset to the list and the Excel file.
-
Select Column:
- Choose the column to search from the dropdown menu.
-
Enter Search Term:
- Type the keyword in the search box. The list will dynamically update to show matching records.
-
Double-click on a Record:
- Opens the edit dialog with the current details.
-
Edit Fields:
- Modify the values as needed.
-
Save Changes:
- Click "Save" to update the record in the list and Excel file.
- Toggle Theme:
- Use the "Mode" switch button to change between light and dark themes.
-
Main Application (
asset_manager.py
):- Initializes the
tkinter
window and sets up the main interface. - Functions for inserting, editing, and searching records.
- Implements theme switching and data handling with Excel.
- Initializes the
-
Styles and Themes:
- Uses external
.tcl
files (forest-dark.tcl
andforest-light.tcl
) for consistent theming. - Theme is toggled via the
toggle_mode
function.
- Uses external
load_data()
: Loads asset data from the Excel file and populates theTreeview
.insert_row()
: Adds a new asset entry to theTreeview
and the Excel file.reload_treeview(data)
: Refreshes theTreeview
with the provided data.search(event)
: Filters theTreeview
based on the search term and selected column.edit_row(event)
: Opens an edit dialog to modify and save existing records.toggle_mode()
: Switches between light and dark themes.
asset-manager/
│
├── file.xlsx # Excel file storing asset data
├── forest-dark.tcl # Dark theme style
├── forest-light.tcl # Light theme style
├── asset_manager.py # Main application script
└── README.md # This file
We welcome contributions to enhance Asset Manager. To contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.
Download Theme .tcl files from https://github.com/rdbende/Forest-ttk-theme
This project is licensed under the MIT License. See the LICENSE file for more details.
- Tkinter: Python's standard GUI toolkit.
- Openpyxl: Python library for reading and writing Excel files.
- Tkcalendar: Calendar and date entry widgets for Tkinter.