GithubHelp home page GithubHelp logo

flight-ticket-booking's Introduction

Running the Flight Booking System

This guide provides instructions on how to run the Flight Booking System, a Flask application for managing flight bookings.

Prerequisites

Before running the application, ensure that you have the following installed:

  • Python 3
  • pip (Python package manager)

Installation

  1. Clone the repository to your local machine:

    git clone <repository_url>
  2. Navigate to the project directory:

    cd <project_directory>
  3. Install the required Python packages using pip:

    pip install -r requirements.txt

Configuration

Before running the application, you may need to configure the database URI in the config.py file. By default, the application uses SQLite.

Running the Application

To run the application, execute the following command:

python flight-booking.py

The Flask development server will start, and you should see output indicating that the server is running.

Accessing the API

Once the application is running, you can access the API endpoints using an HTTP client such as Postman or cURL. Here are some example endpoints:

  • User Signup: POST http://localhost:5000/user/signup
  • User Login: POST http://localhost:5000/user/login
  • Search Flights: GET http://localhost:5000/flights/search
  • Book Flight: POST http://localhost:5000/flights/book
  • User Bookings: GET http://localhost:5000/user/bookings
  • Admin Login: POST http://localhost:5000/admin/login
  • Add Flight: POST http://localhost:5000/admin/flights/add
  • Remove Flight: POST http://localhost:5000/admin/flights/remove
  • Admin Bookings: GET http://localhost:5000/admin/bookings

Ensure you provide the necessary parameters and headers as required by each endpoint.

Stopping the Application

To stop the Flask development server, press Ctrl + C in the terminal where the server is running.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.