Git Product home page Git Product logo

darwinrest's Introduction

powered by National Rail Enquiries

Build Status

Overview

The TrainHackers (Contributors)

The HackTrain team has open sourced this project, and the active contributors to this project include:

  • Alejandro Saucedo
  • Mansimran Singh

Big shoutout to Mr. Robert B. Clarke for creating nre-darwin-py - a great python wrapper for Darwin's SOAP interface.

Motivation

Our vision is to bring innovation to the railway industry, and the first step to achieve this is making the current masses of data available in the industry, easy to access and process. For this reason the HackTrain team has decided to create this open source project to expose a standardized REST API for the Darwin API. This project will be maintained by the community for the community.

Code Example

The API Docs can be found at darwin.hacktrain.com. It is very simple to use this API. In order to retreive station crs codes, you only have to send:

    curl -i http://darwin.hacktrain.com/api/station/code

Installation

In order to run darwinrest, you need to install the following python dependencies:

  • flask
  • flask_restful
  • nre-darwin-py
  • lxml cssselect
  • beautifulsoup4

These can be installed by running:

    pip install flask flask_restful nre-darwin-py lxml cssselect beautifulsoup4

If you're running a fresh ubuntu server, make sure you have the following dependencies:

  • sudo apt-get install libxml2-dev libxslt1-dev python-dev
  • apt-get install python-lxml

The system is currently connected to Drone.io for continuous integration and continuous deployment.

Tests

The system uses Dredd to test all the api endpoints. Nose tests will be added soon.

Roadmap

Currently the project is in early alpha phase. We are waiting for greater support in order to develop this project further. Our future roadmap includes:

  • Create a setup.py that sets up all the environment
  • Add all the python dependencies inside a virtualenv
  • Design and expose a REST interface for 'next' and 'fastest' SOAP endpoints
  • Adding tests to all endpoints
  • Adding continuous integration with TravisCI, or similar framework
  • Exploring other datasets that could enhance Darwin (geolocation, etc)
  • Exploring other Darwin endpoints, such as Darwin push and see how it can be enhanced

License

This project is registered under the Apache 2.0 licence. View the LICENCE file for more details.

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.