Skip to main content

Core business logic for car dealership: order splitting, preorder calculation, sales reporting and top sales

Project description

autodealer-core

Core business logic for a car dealership management system.

Features

  • calculate_sale_items – split order into in‑stock and preorder parts.
  • total_amount – compute total price.
  • aggregate_report – group sales by car model and sort by revenue.
  • top_sales – get top N cars by quantity sold.

Installation

pip install autodealer-core

Usage

from autodealer_core import calculate_sale_items, total_amount

cart_totals = {1: 5, 2: 2} stock_map = {1: (3, 100), 2: (10, 200)} items = calculate_sale_items(cart_totals, stock_map) total = total_amount(items) print(total) # 900

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

autodealer_core-0.1.1.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

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

autodealer_core-0.1.1-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file autodealer_core-0.1.1.tar.gz.

File metadata

  • Download URL: autodealer_core-0.1.1.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for autodealer_core-0.1.1.tar.gz
Algorithm Hash digest
SHA256 07bc9ff5bda7bc03721d81da4b12f07ac44ac827e3fcf33a5518c6d567f4960f
MD5 4aea194879b3ccddc8b70b1c5796550f
BLAKE2b-256 f8658535d5aa6fc7839107437397dece7ca5d4915fcf63b72db61649b4a8a353

See more details on using hashes here.

File details

Details for the file autodealer_core-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for autodealer_core-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 362ff22d81e57f0a0a95af678a374896f41732242d5bdad9e5ec1fbebb18c39e
MD5 f79fa1352776d281a33a5061bc17be50
BLAKE2b-256 53eeb6acf806f95c687f559dfe96e24babf7cc9a4dff78fbda3bf0ee39a1a262

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