Skip to main content

Hotel-Manage-Soumya is a lightweight Python library designed to simplify and streamline the management of bookings, rooms, and users within Flask web applications. With its easy-to-use classes and methods, it provides a set of essential functionalities for handling booking management, room management, and user management.

Project description

HOTEL-MANAGE-SOUMYA PYTHON LIBRARY

Description:

Hotel-manage-soumya is a lightweight Python library designed to simplify and streamline the management of bookings, rooms, and users within Flask web applications. With its easy-to-use classes and methods, Hotel-manage-soumya provides a set of essential functionalities for handling booking reservations, room management, and user authentication.

Key Features:

Booking Class: The Booking class allows users to manage booking reservations efficiently. It provides methods to create, update, and delete bookings, as well as retrieve booking details such as check in date, check out date, room number, total guests, guest Name, payment etc.

Room Class: The Room class offers a convenient way to manage room information. Users can add new rooms, delete rooms, update existing room details, and retrieve information like room type, number of beds, amenities, price, room description and availability.

User Class: The User class offers a convenient way to manage user information. Admin can add new user, delete user, update existing user details, and retrieve information like full name, username, email, role and phone. Admin create two type of user i.e Manager and Admin.

Benefits:

Easy Integration: Hotel-manage-soumya is designed specifically for any python web applications, allowing smooth integration into existing projects.

Time-Saving: By providing pre-built classes and methods, Hotel-manage-soumya eliminates the need to write boilerplate code for common booking, room, and user tasks.

Scalability: Hotel-manage-soumya's modular design allows developers to extend its functionality to suit specific project requirements.

Prerequisite

  • Python >=3.7
  • AWS Account
  • DynamoDB connection
  • Flask

Installation

Install library using following command

  pip install hotel-manage-soumya

Usage/Examples

Following Flask app will return the total number of bookings, total number of rooms and total number of users.

Note: Make sure you already have tables with data in DynamoDB and if you still face any issue then you can contact with us or explore the Class, Function from Github Hotel-manage-soumya and directory src/hotel_manage_soumya.

from flask import Flask
from dotenv import load_dotenv
import boto3
import os


// Import classes from hotel_manage_soumya
from hotel_manage_soumya.booking import Booking
from hotel_manage_soumya.room import Room
from hotel_manage_soumya.user import User

load_dotenv()
app = Flask(__name__)
app.secret_key = 'your_secret_key'

// Initialize the DynamoDB client
dynamodb =  boto3.client(
                'dynamodb', 
                aws_access_key_id=os.environ['AWS_ACCESS_KEY_ID'],
                aws_secret_access_key=os.environ['AWS_SECRET_ACCESS_KEY'],
                region_name=os.environ['AWS_REGION']
            )

// Initialize classes objects
tableName = 'bookings'
booking_obj = Booking(tableName)

roomTableName = 'rooms'
bucketName = 'hotel-management-soumya'
room_obj = Room(roomTableName, bucketName)

userTableName = 'users'
user_obj = User(userTableName)

@app.route('/', methods=['GET'])
def home():
    //  All Bookings
    all_booking = booking_obj.get_all_booking(dynamodb)
    total_booking = len(all_booking['data']['Items'])

    //  All Rooms
    all_rooms = room_obj.get_all_room(dynamodb)
    total_room = len(all_rooms['data']['Items'])

    //  All users
    all_users = user_obj.get_all_user(dynamodb)
    total_users = len(all_users['data']['Items'])
    
    return {
        "statusCode": 200,
        "TotalBooking": total_booking,
        "TotalRoom": total_room,
        "TotalUser": total_users
    }

Flask APP Response

{
  "TotalBooking": 4,
  "TotalRoom": 4,
  "TotalUser": 3,
  "statusCode": 200
}

Support

For support, email x21174059@student.ncirl.ie , soumyaksoochik96@gmail.com.

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

hotel_manage_soumya-0.0.5.tar.gz (20.5 kB view details)

Uploaded Source

Built Distribution

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

hotel_manage_soumya-0.0.5-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file hotel_manage_soumya-0.0.5.tar.gz.

File metadata

  • Download URL: hotel_manage_soumya-0.0.5.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.0

File hashes

Hashes for hotel_manage_soumya-0.0.5.tar.gz
Algorithm Hash digest
SHA256 8c7251396ef7b5ba5a549ae2fc57660492553b637ddf7d38f48c3b69a196ef2b
MD5 79a1396239dfb1356eefaa0702d1d061
BLAKE2b-256 190b62ee6065231a8dce55704a0c96b45e2277662009a5368c9f8b02b71c7882

See more details on using hashes here.

File details

Details for the file hotel_manage_soumya-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for hotel_manage_soumya-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 38e8b083812ae82d6058057601905d7db93e47f223ffe27d704fb531f3dd6d88
MD5 2ea35726cdc040074fb7c9a4e4c2586a
BLAKE2b-256 fb6f634da76668e9c0f1e2c4110849af65a314fe280456f49b0cc06a77df890b

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