Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vehicle_market_x23311428-1.0.0.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vehicle_market_x23311428-1.0.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file vehicle_market_x23311428-1.0.0.tar.gz.

File metadata

File hashes

Hashes for vehicle_market_x23311428-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ca5711112cb7bc438094514bd39a831aab60beba19518a0d6c0cb43b03055a9a
MD5 99e697ef837f38e890197632d70e73c8
BLAKE2b-256 168fc6c56bf655c6270aedd9c672be369a2b3a45178393550eef02c61715115f

See more details on using hashes here.

File details

Details for the file vehicle_market_x23311428-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for vehicle_market_x23311428-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 31f0a3f925b8dcbee982b5a6e02a7e30be72bf1140250176b22a00f094f59300
MD5 ad929384d53134b17ac1eb4cd038e7c4
BLAKE2b-256 4b942cc13de77f5e99d18337a8622f30c92a078d563c3d27445e000fc584000d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page