Skip to content

zarautz/pagoeta

Repository files navigation

Pagoeta

travis-badge coveralls-badge license-badge

Pagoeta is the code name of the Open API for the city of Zarautz, based on the Open Data philosophy. You can access the API at https://data.zarautz.xyz/.

API Usage policy

Usage of the OpenZarautz API is currently unrestricted. API keys are not used. Please be gentle with our server! In the future, we may require registration and API keys for heavy use.

All data is made available under the Open Database License. Any rights in individual contents of the database are licensed under the Database Contents License. Whenever external sources are mentioned you should mention them too when you present the data.

For developers

Pagoeta uses Django and the Django REST Framework. Feel free to contribute to the project.

Application dependencies

The application uses the pip Package Manager to install dependencies. While in development, you will need to read the dependencies from the following file (includes packages like debug_toolbar):

$ pip install -r requirements/development.txt

Configuration

The application looks for the necessary configuration/credentials in a JSON file at the root folder. This file uses the same names we use as config vars in Heroku.

For development, just copy config.json.txt to config.json and fill in the options (only real database information is strictly necessary).

Once the database configuration is filled in you can generate the necessary tables and load some fixtures using manage.py:

$ python manage.py migrate

Running the server

$ python manage.py runserver

Running spec tests

$ python manage.py test pagoeta.apps

Coverage of the tests

$ coverage run --source='pagoeta/apps' manage.py test pagoeta.apps
$ coverage report -m

Style guide

Unless otherwise specified, follow Django Coding Style. Tab size is 4 spaces. Maximum line length is 119. Furthermore your code has to validate against pyflakes. It is recommended to use flake8 which combines all the checks (flake8 is included in the development requirements):

$ flake8 --max-line-length=119 pagoeta