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.6.tar.gz (2.2 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.6-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: autodealer_core-0.1.6.tar.gz
  • Upload date:
  • Size: 2.2 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.6.tar.gz
Algorithm Hash digest
SHA256 0e7100c50928e8e1429d6098dedd490cbf054e9f40a576b0d87bca1bf7db0ba5
MD5 2e2099879f25e8a002e8f2d478f577f6
BLAKE2b-256 08ac54be92c3d5a4d6cfaff5e922ec88ed44a7a92816848327ef81b5e22a335f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autodealer_core-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 78adc163ab16a27c64311b3ce0f432f7f1c692e20ea2ef81b9267e70de5d1958
MD5 086e656d0f2ab3af0d9a785062fd6317
BLAKE2b-256 dbaab5237b69e827eb702f927ff2c5e7f8053b0b180996c547a3ae06781d8948

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