Motor marketplace utilities library for automotive applications
Project description
Vehicle Marketplace Utils
A comprehensive Python library for vehicle marketplace applications, providing utilities for validation, price estimation, and data formatting.
Student ID: x23311428
Author: Dhruv Jani
Installation
pip install vehicle-market-x23311428
Features
- VehicleValidator: Validate year, price, mileage, and phone numbers
- PriceEstimator: Calculate vehicle depreciation and estimate resale prices
- VehicleFormatter: Format prices, mileage, age, and phone numbers for display
Quick Start
Validation
from vehicle_utils import VehicleValidator
# Validate year
is_valid, message = VehicleValidator.validate_year(2020)
print(f"Valid: {is_valid}, Message: {message}")
# Validate price
is_valid, message = VehicleValidator.validate_price(25000)
# Validate mileage
is_valid, message = VehicleValidator.validate_mileage(50000)
# Validate phone
is_valid, message = VehicleValidator.validate_phone("1234567890")
Price Estimation
from vehicle_utils import PriceEstimator
# Estimate vehicle price
result = PriceEstimator.estimate_price(
original_price=30000,
year_of_purchase=2018,
category='sedan',
fuel_type='petrol',
transmission='automatic',
mileage=50000,
condition='good'
)
print(f"Estimated Price: €{result['estimated_price']}")
print(f"Depreciation: {result['total_depreciation_percentage']}%")
print(f"Vehicle Age: {result['age']} years")
Data Formatting
from vehicle_utils import VehicleFormatter
# Format price
formatted_price = VehicleFormatter.format_price(25000)
print(formatted_price) # €25,000
# Format mileage
formatted_mileage = VehicleFormatter.format_mileage(50000)
print(formatted_mileage) # 50,000 km
# Format age
age = VehicleFormatter.format_age(2020)
print(age) # 5 years old
# Format phone
phone = VehicleFormatter.format_phone("1234567890")
print(phone) # 123-456-7890
Depreciation Model
The price estimator uses a sophisticated depreciation model:
- Year 1: 20% depreciation
- Years 2-5: 15% depreciation per year
- Year 6+: 10% depreciation per year
Additional Factors
- Category: SUVs (+15%), Trucks (+10%), Coupes (-10%)
- Fuel Type: Electric (+20%), Hybrid (+10%), Diesel (+5%)
- Transmission: Automatic (+5%), Manual (-5%)
- Mileage: 2% depreciation per 10,000 km
- Condition: Excellent (+10%), Good (baseline), Fair (-15%), Poor (-30%)
Requirements
- Python 3.7+
- No external dependencies
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vehicle_market_x23311428-1.0.0.tar.gz.
File metadata
- Download URL: vehicle_market_x23311428-1.0.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca5711112cb7bc438094514bd39a831aab60beba19518a0d6c0cb43b03055a9a
|
|
| MD5 |
99e697ef837f38e890197632d70e73c8
|
|
| BLAKE2b-256 |
168fc6c56bf655c6270aedd9c672be369a2b3a45178393550eef02c61715115f
|
File details
Details for the file vehicle_market_x23311428-1.0.0-py3-none-any.whl.
File metadata
- Download URL: vehicle_market_x23311428-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31f0a3f925b8dcbee982b5a6e02a7e30be72bf1140250176b22a00f094f59300
|
|
| MD5 |
ad929384d53134b17ac1eb4cd038e7c4
|
|
| BLAKE2b-256 |
4b942cc13de77f5e99d18337a8622f30c92a078d563c3d27445e000fc584000d
|