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.
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
- Python 3.7+
- A MongoDB instance
- A Redis instance
What you'll do:
- Checkout a local version of the repository
- Create a python virtual environment
- Install required python packages
- Run the app
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
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
pip install -r requirements.txt
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