Giter Site home page Giter Site logo

go-openflights's Introduction

CircleCI GoDoc MIT License

Please donate to OpenFlights!

If you do use this, I ask you to donate to OpenFlights, the source for all the data in here as of now, at http://openflights.org/donate. Seriously, if you can afford it, the OpenFlights team is responsible for putting all this data together and maintaining it, and we owe it to them to support their work.

Introduction

Note the custom import path!

import (
  "go.pedge.io/openflights"
)

Openflights is a package that exposes the data from http://openflights.org/data.html, available within https://github.com/jpatokal/openflights/tree/master/data.

Flights uses protobuf and gRPC to auto-generate a protobuf/grpc API stubs, and a HTTP/JSON API. See openflights.proto for the API definition. The HTTP endpoints should be relatively straightfoward.

The binary openflightsd is a server binary that hosts the API. make install will install this, which you can then run with ${GOPATH}/bin/openflightsd, or make launch will build a Docker image that is ~13MB as of now, and launch this Docker image with the default ports set. Then, you can curl http://0.0.0.0:8080/airports/code/sfo as a quick check.

The openflights package for golang adds some golang-specific additional functionality around the generated protocol buffers code. See openflights.go for publically-exposed structures.

The binaries gen-openflights-csv-store and gen-openflights-id-store will generate the data for you in either a CSVStore or IDStore. Note that this is how generated.go is generated.

Future Work

Please contact me if you want to help out!

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.