Skip to content

RecuencoJones/PyMeteo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyMeteo

Simple Python example of retrieving and parsing XML data.

Uses a Flask server to expose endpoints from which to retrieve information.

Requirements

  • Python 2.7

Installing

pip install -r requirements.txt

Running

python server.py

The server will start on http://localhost:5000.

Endpoints

Weather

  • Path: /api/weather/<id>
  • Parameters:
    • id: int An integer representing a municipality in Spain. A full list of municipities can be found in this Excel file.
  • Returns: string
    • The name of the municipality of given id.
    • An error message if the municipality id is not valid.
  • Examples:
> http://localhost:5000/api/weather/50297

Name: Zaragoza Municipality ID: 50297

About

Example Python XML retrieve and parse

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages