emmanuelstroem / rejsekort-python

Python Scrapper that returns Rejsekort Restful API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rejsekort-python

Python Scrapper that returns Rejsekort Restful API

Running the application

Pre-requisistes

  • Make
  • Python

Locally

  1. Using Make

    make run
  2. Using Docker

    • Build

      docker build -t rejsekort .
    • Run the container

      docker run --rm -p 3000:3000 flask

This will start a server which can be accessed on http://localhost:3000

Server

Set environment variable for production: ENV=production or something other than development

Usage

Once the server is up and running, requests can be made to these available endpoints.

Health Check

  1. Request: http://localhost:3000

  2. Response:

    {
      "status": "Healthy"
    }
    

Login

Username and Password can be generated from rejsekort self-service portal.

  1. Post Request to: http://localhost:3000/login

  2. Request Body as raw JSON.

    {
      "username": "<USERNAME>",
      "password": "<PASSWORD>"
    }
    

About

Python Scrapper that returns Rejsekort Restful API


Languages

Language:Python 95.9%Language:Makefile 2.1%Language:Dockerfile 2.0%