Skip to content

wl5e/lab-inventory-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Lab Inventory Tracker

A GMP-friendly CLI tool to manage lab reagent inventory, track expiration dates, and maintain data integrity.

Features

  • Add reagents/consumables with name, CAS number, lot, expiry date, quantity, and location
  • List all inventory in a formatted table
  • Search by name or CAS number
  • Show items expiring within a specified number of days
  • Update item details
  • Remove items by ID
  • Inventory statistics (total items, expiring soon, per location)
  • Automatic backup of inventory file on every modification (preserves previous state as .bak)
  • Atomic writes prevent data corruption

Installation

Requirements: Python 3.8 or higher.

git clone https://github.com/yourusername/lab-inventory-tracker.git
cd lab-inventory-tracker
# Optionally make the script executable
chmod +x main.py

Usage

Run directly with Python:

python main.py --help
python main.py add --name "Sodium Chloride" --cas 7647-14-5 --lot L12345 --expiry 2027-06-30 --quantity "500 g" --location "Cabinet A"
python main.py list
python main.py search "chloride"
python main.py expiring --days 60
python main.py update --id 1 --quantity "450 g"
python main.py remove --id 2
python main.py stats

Data is stored in ~/.lab_inventory/inventory.json. The previous version is kept as inventory.json.bak.

GMP Considerations

  • Atomic file saving prevents partial writes.
  • Backup ensures recoverability.
  • Consistent data format aids audits.

License

MIT

About

A GMP-friendly CLI tool to manage lab reagent inventory, track expiration dates, and maintain data integrity.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages