|
| 1 | +# Weather Data REST API |
| 2 | + |
| 3 | +This Python application provides historical weather data from various stations across Europe. It is built using the Flask framework and offers a REST API for users to access weather information. |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +1. **Webpage Documentation:** |
| 8 | + - The app includes a main webpage in HTML that explains how it works. |
| 9 | + - Users can visit this page to understand the app's functionality and usage. |
| 10 | + - This page displays the names of available stations. |
| 11 | + |
| 12 | +2. **Data Retrieval via URL:** |
| 13 | + - Users can search for weather data by station number using the app's URL. |
| 14 | + - If a user enters a specific station number, the REST API will return all available data (including temperature) for that station. |
| 15 | + |
| 16 | +3. **Search by Year:** |
| 17 | + - Users can also search for weather data by specifying both the station number and a particular year. |
| 18 | + - The REST API will provide data for that station during the specified year. |
| 19 | + |
| 20 | +4. **Specific Date Search:** |
| 21 | + - For more granular queries, users can search for a specific date along with the station number. |
| 22 | + - The REST API will return the temperature that particular day. |
| 23 | + |
| 24 | +## Installation |
| 25 | + |
| 26 | +1. Clone this repository to your local machine: |
| 27 | + ``` |
| 28 | + git clone https://github.com/mahdi-meyghani/Historical-Weather-Data-API.git |
| 29 | + ``` |
| 30 | + |
| 31 | +2. Install the required dependencies using the `requirements.txt` file: |
| 32 | + ``` |
| 33 | + pip install -r requirements.txt |
| 34 | + ``` |
| 35 | + |
| 36 | +3. Run the app: |
| 37 | + ``` |
| 38 | + python main.py |
| 39 | + ``` |
| 40 | + |
| 41 | +## Usage |
| 42 | + |
| 43 | +1. Access the main webpage to learn about the app's features and how to use it. |
| 44 | + |
| 45 | +2. To retrieve weather data: |
| 46 | + - Use the following URL format: `http://localhost:5000/api/v1/{station_number}/{date}` |
| 47 | + - Or `http://localhost:5000/api/v1/yearly/{station_number}/{year}` |
| 48 | + - Or `http://localhost:5000/api/v1/{station_number}` |
| 49 | + - Replace `{station_number}`, `{year}`, and `{date}` with the desired values. |
| 50 | + - Example: `http://localhost:5000/api/v1/24/1874-10-08` |
| 51 | + |
| 52 | +3. The API will return data in JSON format, including temperature and other relevant information. |
| 53 | + |
| 54 | +## Contributing |
| 55 | + |
| 56 | +Contributions are welcome! If you find any issues or have suggestions, feel free to create a pull request. |
| 57 | + |
| 58 | +## License |
| 59 | + |
| 60 | +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
| 61 | + |
| 62 | +--- |
| 63 | + |
| 64 | +Remember to replace placeholders like `{station_number}`, `{year}`, and `{date}` with actual values relevant to your app. Happy coding! 🌦️🌡️🌤️ |
0 commit comments