Code Monkey home page Code Monkey logo

train-station-api-service's Introduction

Train Station API service

This is a restful API built to provide endpoints to manage the workflow of a railroad station.

Installation:

  1. Clone the repository
git clone https://github.com/sashabryl/train-station-api-service.git
  1. Go to the project directory
cd train-station-api-service
  1. Create a virtual environment
python -m venv venv
  1. Activate the virtual environment
  • on Windows:
.\venv\Scripts\activate
  • on Linux/MacOS:
- source venv/bin/activate
  1. Install dependencies
pip install -r requirements.txt
  1. Create a copy of the .env.sample file and name it .env. Update the values as needed.
cp .env.sample .env

Getting started

  1. Build and run the docker container in detached mode.
docker-compose build
docker-compose up -d
  1. Find out the id of container containing the app:
docker ps
  1. Create an admin user
docker exec -it <container_id> python manage.py createsuperuser

Usage

  • You can visit the admin page at
http://127.0.0.1:8000/admin/
  • Or go to the main page at
http://127.0.0.1:8000/api/train-station/
  • To learn about all the endpoints, see the documentation
http://127.0.0.1:8000/api/schema/swagger/

Features

  • JWT Authentication
  • Managing orders and tickets
  • Adding other stations
  • Routes management
  • Journeys management
  • Trains management
  • Staff management
  • Diverse filtering of routes, stations, crews, journeys

Testing

  • To run the tests, use the following command:
python manage.py test

DEMO

Screenshot1 Screenshot2 Screenshot3

Database structure

DB_schema

train-station-api-service's People

Contributors

sashabryl avatar

Watchers

 avatar

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.