{"id":20495459,"url":"https://github.com/vyahello/async-weather-api","last_synced_at":"2026-01-22T11:32:42.223Z","repository":{"id":54277648,"uuid":"231914527","full_name":"vyahello/async-weather-api","owner":"vyahello","description":"⛓️ Asynchronous weather REST API (asyncio, quart, pytest, docker)","archived":false,"fork":false,"pushed_at":"2022-12-27T15:37:54.000Z","size":91,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-27T06:02:11.477Z","etag":null,"topics":["asyncio","rest-api"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/async-weather-api/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vyahello.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-05T12:33:20.000Z","updated_at":"2023-03-07T16:39:06.000Z","dependencies_parsed_at":"2023-01-31T04:45:19.822Z","dependency_job_id":null,"html_url":"https://github.com/vyahello/async-weather-api","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/vyahello/async-weather-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vyahello%2Fasync-weather-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vyahello%2Fasync-weather-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vyahello%2Fasync-weather-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vyahello%2Fasync-weather-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vyahello","download_url":"https://codeload.github.com/vyahello/async-weather-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vyahello%2Fasync-weather-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28662114,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asyncio","rest-api"],"created_at":"2024-11-15T17:45:58.066Z","updated_at":"2026-01-22T11:32:42.209Z","avatar_url":"https://github.com/vyahello.png","language":"Python","readme":"![Screenshot](logo.png)\n\n[![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)\n[![PyPI version shields.io](https://img.shields.io/pypi/v/async-weather-api.svg)](https://pypi.python.org/pypi/async-weather-api/)\n[![PyPI pyversions](https://img.shields.io/pypi/pyversions/async-weather-api.svg)](https://pypi.python.org/pypi/async-weather-api/)\n[![Downloads](https://pepy.tech/badge/async-weather-api)](https://pepy.tech/project/async-weather-api)\n[![Build Status](https://www.travis-ci.com/vyahello/async-weather-api.svg?branch=master)](https://travis-ci.org/vyahello/async-weather-api)\n[![Coverage Status](https://coveralls.io/repos/github/vyahello/async-weather-api/badge.svg?branch=master)](https://coveralls.io/github/vyahello/async-weather-api?branch=master)\n[![Docker pulls](https://img.shields.io/docker/pulls/vyahello/async-weather-api.svg)](https://hub.docker.com/repository/docker/vyahello/async-weather-api)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE.md)\n\n# Async weather API\n\u003e This project represents sample of asynchronous weather REST API that is build using **quart** (flask compatible API) python web microframework based on Asyncio.\n\u003e\n\u003e It uses https://openweathermap.org to obtain weather data.\n\n## Tools\n\n### Production\n- python 3.6, 3.7, 3.8\n- [asyncio](https://docs.python.org/3/library/asyncio.html)\n- [quart](https://pgjones.gitlab.io/quart/)\n\n### Development\n- [pytest](https://pypi.org/project/pytest/)\n- [mypy](http://mypy.readthedocs.io/en/latest)\n- [black](https://black.readthedocs.io/en/stable/)\n- [pylint](https://www.pylint.org/)\n- [flake8](http://flake8.pycqa.org/en/latest/)\n- [pydocstyle](http://www.pydocstyle.org/)\n\n## Usage\n\n### Quick start\n\nPlease run following script to obtain the latest package from PYPI:\n```bash\npip install async-weather-api\n```\n\nThen please execute steps below to launch API from your environment:\n```python\nimport weather\n\nweather.run(key=\"your-secret-key\", bind=\"0.0.0.0:5001\", debug=False)\n```\n\u003e Note: `key` stands for API key from https://openweathermap.org\n\n### Docker image\n\nPlease run next command to start async weather api via docker:\n```bash\ndocker run -it -p 3000:5001 vyahello/async-weather-api:0.5.0 \\\n  weather run \\\n  --bind 0.0.0.0:5001 \\\n  --mode prod \\\n  --key \u003csecret-key\u003e\n```\n\n\u003e Note: please use `3000` port to access application via docker\n\n### Source code\n\nTo be able to run source code please execute command below:\n```bash\npython -m weather run --bind 0.0.0.0:5001 --mode prod --key your-secret-key\n```\n\n### Endpoints\n- **/** - home page\n  ```bash\n  curl -X GET http://0.0.0.0:5001/ \n  curl -X GET http://0.0.0.0:5001/index \n  ```\n  _Response_: html page\n  \n- **/api/weather/{city}/{state}/{country}** - current weather event\n  ```bash\n  curl -X GET http://0.0.0.0:5001/api/events/London/GB/GreatBritain\n  ```\n  _Response_: json object\n  ```json\n  {\"city\":\"London\",\"country\":\"GreatBritain\",\"name\":\"Jeff the player\",\"state\":\"GB\"}\n  ```\n  \n- **/api/weather/{zip_code}/{country}** - current weather in city\n  ```bash\n  curl -X GET http://0.0.0.0:5001/api/weather/97002/us\n  ```\n  _Response_: json object\n  ```json\n  {\"base\":\"stations\",\"clouds\":{\"all\":90},\"cod\":200,\"coord\":{\"lat\":45.23,\"lon\":-122.8}}\n  ```\n  \n- **/api/sun/{zip_code}/{country}** - current sunset/sunrise in city\n  ```bash\n  curl -X GET http://0.0.0.0:5001/sun/weather/97002/us\n  ```\n  _Response_: json object\n  ```json\n  {\"astronomical_twilight_begin\":\"04:03:49 PM\",\"astronomical_twilight_end\":\"04:29:50 AM\"}\n  ```\n\n## Development notes\n\n### CI/CD\n\nProject has Travis CI integration using [.travis.yml](.travis.yml) file thus code analysis (`black`, `mypy`, `pydocstyle`, `pylint`, `flake8`) and unittests (`pytest`) will be run automatically\nafter every made change to the repository.\n\nTo be able to run code analysis, please execute command below:\n```bash\n./analyse-code.sh\n```\n\nOther than that, a fresh versioned package will be delivered on PYPI after new tag is created using [pythonpublish.yml](.github/workflows/pythonpublish.yml) file.\n\n### Release notes\n\nPlease check [changelog](CHANGELOG.md) file to get more details about actual versions and it's release notes.\n\n### Meta\n\nAuthor – _Volodymyr Yahello_.\n\nDistributed under the `MIT` license. See [LICENSE](LICENSE.md) for more information.\n\nYou can reach out me at:\n* [vyahello@gmail.com](vyahello@gmail.com)\n* [https://twitter.com/vyahello](https://twitter.com/vyahello)\n* [https://www.linkedin.com/in/volodymyr-yahello-821746127](https://www.linkedin.com/in/volodymyr-yahello-821746127)\n\n### Contributing\nI would highly appreciate any contribution and support. If you are interested to add your ideas into project please follow next simple steps:\n\n1. Clone the repository\n2. Configure `git` for the first time after cloning with your `name` and `email`\n3. `pip install -r requirements.txt` to install all project dependencies\n4. `pip install -r requirements-dev.txt` to install all development project dependencies\n5. Create your feature branch (`git checkout -b feature/fooBar`)\n6. Commit your changes (`git commit -am 'Add some fooBar'`)\n7. Push to the branch (`git push origin feature/fooBar`)\n8. Create a new Pull Request\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvyahello%2Fasync-weather-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvyahello%2Fasync-weather-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvyahello%2Fasync-weather-api/lists"}