Utility library for room booking: date validation, availability checking and pricing for StayEase.
Project description
stayease-accomm-utils
Utilities for the StayEase booking flow: validate date ranges, check room availability, and calculate prices before persisting bookings or calling AWS services.
Installation
pip install stayease-accomm-utils
Usage
from accomm_utils import (
DateRangeValidator,
PriceCalculator,
AvailabilityChecker,
InvalidDateRangeError,
RoomNotAvailableError,
)
validator = DateRangeValidator()
date_range = validator.validate(check_in, check_out)
pricing = PriceCalculator()
total = pricing.calculate_total(150, date_range)
availability = AvailabilityChecker()
availability.ensure_available(date_range, existing_bookings)
Integrate these helpers into Django or any web framework to keep booking views lean and reusable.
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 stayease_accomm_utils-0.1.0.tar.gz.
File metadata
- Download URL: stayease_accomm_utils-0.1.0.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8d33ca5a8e99ed4a61fb0adb56761add33593ebf9b230a60f35dc7365a1d507
|
|
| MD5 |
6994513ccf6d9ad7d8f7d8fe1e081388
|
|
| BLAKE2b-256 |
dba5cfe1f2eff81052b239ea47d8d9d181a62478fc6aece64457eb57fecbdd91
|
File details
Details for the file stayease_accomm_utils-0.1.0-py3-none-any.whl.
File metadata
- Download URL: stayease_accomm_utils-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0f1c6cc8f0324f1be4def4c96f610943281ec02cda2b02d308174ea42117391
|
|
| MD5 |
19b48b1733ca9481f18b892a56778fa9
|
|
| BLAKE2b-256 |
fcd8bc012a71647a9bc86690bd19d1768b22644f4734db1029401de3aa498e9b
|