Skip to main content

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


Download files

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

Source Distribution

stayease_accomm_utils-0.1.0.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

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

stayease_accomm_utils-0.1.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

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

Hashes for stayease_accomm_utils-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d8d33ca5a8e99ed4a61fb0adb56761add33593ebf9b230a60f35dc7365a1d507
MD5 6994513ccf6d9ad7d8f7d8fe1e081388
BLAKE2b-256 dba5cfe1f2eff81052b239ea47d8d9d181a62478fc6aece64457eb57fecbdd91

See more details on using hashes here.

File details

Details for the file stayease_accomm_utils-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for stayease_accomm_utils-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b0f1c6cc8f0324f1be4def4c96f610943281ec02cda2b02d308174ea42117391
MD5 19b48b1733ca9481f18b892a56778fa9
BLAKE2b-256 fcd8bc012a71647a9bc86690bd19d1768b22644f4734db1029401de3aa498e9b

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