Code Monkey home page Code Monkey logo

opendatazurich.github.io's Introduction

Open Data Zurich API documentation

Available APIs

  1. RIS-API (Ratshausinformationssystems), Gemeinderat Stadt Zürich (GRZ)
  2. Zürich Tourismus API

Credits

This repository is based on this blogpost: https://peterevans.dev/posts/how-to-host-swagger-docs-with-github-pages/


Development notes

The following notes help to setup a new API documentation project.

Setup swagger

  1. Download the latest stable release of the Swagger UI here.

  2. Extract the contents and copy the "dist" directory to the root of your repository.

  3. Create a new directory for the API you want to describes

    mkdir -p my-api/docs
    
  4. Move the file "index.html" from the directory "dist" to the new api directory.

    mv dist/index.html my-api/docs
    
  5. Copy the YAML specification file for your API to the api directory.

  6. Edit index.html and change the url property to reference your local YAML file.

        const ui = SwaggerUIBundle({
            url: "swagger.yaml",
        ...
  7. Then fix any references to files in the "dist" directory.

    ...
    <link rel="stylesheet" type="text/css" href="../../dist/swagger-ui.css" >
    <link rel="icon" type="image/png" href="../../dist/favicon-32x32.png" sizes="32x32" />
    <link rel="icon" type="image/png" href="../../dist/favicon-16x16.png" sizes="16x16" />    
    ...
    <script src="../../dist/swagger-ui-bundle.js"> </script>
    <script src="../../dist/swagger-ui-standalone-preset.js"> </script>    
    ...
  8. Add a README.md in the api directory to describe the API

    touch my-api/README.md
    

Installation of jupyter

# create a new virtualenv
virtualenv --no-site-packages pyenv
source ./pyenv/bin/activate

# install dependencies
pip install -r requirements.txt

Run the jupyter notebook:

./pyenv/bin/jupyter notebook

opendatazurich.github.io's People

Contributors

metaodi avatar dongoginho avatar

Watchers

James Cloos avatar

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.