Skip to content

pedro2555/vatsim-api

Repository files navigation

VATSIM API

We provide full VATSIM statistics for connected clients and servers via a public RESTfull API.

All data we collect is publicly available from VATSIM. On top of that information we expose some other tools for developers to query this information.

Our features:

  • Location information complies with the GEOJson format;
  • Location history for all connected clients;
  • MongoDB query syntax.

How it Works

Data Collection

We schedule data collection from VATSIM, roughly, every minute. This is done by a 'clock process' leveraging the APScheduler library. This process schedules update operations to be run by a worker.

Data collection and transformations is executed by a 'worker process' using Celery. This process listens for scheduled jobs and executes them.

A job queue is provided by Redis. All results are stored in a MongoDB database.

On top of the same database we added an HTTP layer exposing the REST API, using Python-Eve

Development Environment

Requirements

  • Python 3.7+
  • A MongoDB instance
  • A Redis instance

Setup

What you'll do:

  • Checkout a local version of the repository
  • Create a python virtual environment
  • Install required python packages
  • Run the app

Checkout a local version of the repository

git clone git@github.com:pedro2555/vatsim-api.git

Alternatively you can use an HTTPS url:

git clone https://github.com/pedro2555/vatsim-api.git

Create a python virtual environment

A python 3.7 runtime is expected at /usr/bin/python3.7, you may change this to fit your environment.

virtualenv --python=/usr/bin/python3.7 venv
source venv/bin/activate

Install required python packages

pip install -r requirements.txt

Run the app

As mentioned before, you need both MongoDB and Redis instances runnnig locally. You may skip this step if the instances are already running.

sudo service mongodb start
sudo service redis start

Start the app

python manage.py run

About

A RESTfull HTTP API providing VATSIM data.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages