Skip to content

IrumShehryar/Lost-and-Found-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lost-and-Found-System

A simple Python-based application to keep track of lost and found items, supporting classification, searching, and weather integration for found items.

Features

  • Add Items: Record any lost or found item with its details: name, description, type, category, location, and contact info.
  • Search: Find items by type (lost/found) and location.
  • Display: Print all current lost/found items, including status and details.
  • Weather Integration: For found items, fetches and stores the current weather at the item's location (via OpenWeatherMap).
  • User Roles: Users have unique IDs and can report or search for items.

Technologies

  • Python 3.x
  • requests (for weather API)
  • Modular, extensible object-oriented design

Dependencies

  • Python 3.x
  • requests

Install dependencies with:

pip install requests

Or, if you want to make a requirements file, add:

requests

to requirements.txt and run:

pip install -r requirements.txt

Folder Structure

lost_and_found/
    admin.py                   # Administration utilities (not detailed above)
    electronic_item.py         # Electronic item specifics
    enums.py                   # Enumerations for categories and statuses
    item.py                    # Core Item class
    lost_and_found_system.py   # System logic (main interface)
    non_electronic_item.py     # Non-electronic item specifics
    system.py                  # (Details not shown; possibly system settings/entry point)
    tests/                     # Unit tests
    user.py                    # User class (report/search items)
    weather.py                 # Weather info integration (uses requests)

Example Usage

from lost_and_found.lost_and_found_system import LostAndFoundSystem
from lost_and_found.item import Item
from lost_and_found.enums import ItemType, Category

system = LostAndFoundSystem()

item = Item(
    name="iPhone", 
    description="Black iPhone 12", 
    item_type=ItemType.LOST, 
    category=Category.ELECTRONIC, 
    location="Library", 
    contact_info="alice@example.com"
)
system.add_item(item)

# Search for lost phones in Library
results = system.search(ItemType.LOST, "Library")
for it in results:
    print(it)

Installation

  1. Clone the repo:
    git clone https://github.com/IrumShehryar/Lost-and-Found-System.git
    cd Lost-and-Found-System
  2. (Optional) Create a virtual environment:
    python3 -m venv venv
    source venv/bin/activate
  3. Install dependencies:
    pip install requests
    # or, if you created requirements.txt:
    pip install -r requirements.txt

API Keys

  • To use weather integration, the file weather.py includes an OpenWeatherMap API key placeholder.
  • Replace the API_KEY in weather.py with your own from OpenWeatherMap for production use.

About

The system will record lost and found items

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages