{"id":19299713,"url":"https://github.com/ejoliet/python-microservice","last_synced_at":"2025-08-19T23:06:45.922Z","repository":{"id":219031181,"uuid":"747986228","full_name":"ejoliet/python-microservice","owner":"ejoliet","description":"for now, weather microservice playground","archived":false,"fork":false,"pushed_at":"2024-01-25T03:26:14.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T01:24:45.232Z","etag":null,"topics":["microservice","python","tomorrow-io","weather-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ejoliet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2024-01-25T03:03:32.000Z","updated_at":"2024-01-25T03:18:38.000Z","dependencies_parsed_at":"2024-01-25T04:28:07.570Z","dependency_job_id":"52e50057-0e7e-4359-a228-f66a24bd90d8","html_url":"https://github.com/ejoliet/python-microservice","commit_stats":null,"previous_names":["ejoliet/python-microservice"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ejoliet/python-microservice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejoliet%2Fpython-microservice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejoliet%2Fpython-microservice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejoliet%2Fpython-microservice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejoliet%2Fpython-microservice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ejoliet","download_url":"https://codeload.github.com/ejoliet/python-microservice/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejoliet%2Fpython-microservice/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271236280,"owners_count":24723978,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"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":["microservice","python","tomorrow-io","weather-api"],"created_at":"2024-11-09T23:12:29.639Z","updated_at":"2025-08-19T23:06:45.889Z","avatar_url":"https://github.com/ejoliet.png","language":"Python","readme":"# Python Weather Microservice\n\n## Description\n\nThis Python microservice provides real-time weather information based on city names. It utilizes the [Tomorrow.io Weather API](https://www.tomorrow.io/weather-api/) to fetch weather data, returning details such as temperature, weather conditions, and a symbolic ASCII art representation of the current weather.\n\n## Installation\n\n### Prerequisites\n\n- Python 3.x\n- `requests` library (for making HTTP requests)\n- An API key from Tomorrow.io\n\n### Setup\n\n1. **Clone the Repository**\n\n   ```bash\n   git clone [Your Repository URL]\n   cd [Your Repository Directory]\n   ```\n\n2. **Install Dependencies**\n\n   Use virtual env, create one\n   ```bash\n   python3 -m venv weather_env\n   ```\n   Then activate by executing\n   ```bash\n   source weather_env/bin/activate\n   ```\n   Deactivate:\n   ```bash\n   deactivate\n   ```\n   Use pip to install the required Python packages:\n\n   ```bash\n   pip3 install requests art json\n   ```\n\n4. **API Key Configuration**\n\n   - Obtain an API key from [Tomorrow.io](https://www.tomorrow.io/weather-api/).\n   - Create a `config.json` file in the same directory as your Python script with the following content:\n\n     ```json\n     {\n       \"TOMORROW_IO_API_KEY\": \"your_api_key_here\"\n     }\n     ```\n   - Replace `your_api_key_here` with your actual API key.\n   - Ensure `config.json` is added to your `.gitignore` file to prevent it from being pushed to public repositories.\n\n## Usage\n\n1. **Run the Server**\n\n   Start the microservice by running:\n\n   ```bash\n   python3 weather.py\n   ```\n\n   This will start the HTTP server on port 8000.\n\n2. **Accessing the Service**\n\n   To fetch weather information, access the service via a web browser or a tool like `curl` using:\n\n   ```\n   http://localhost:8000/?city=CityName\n   ```\n\n   Replace `CityName` with the desired city's name.\n\n   Example:\n   ```\n   http://localhost:8000/?city=Toronto\n   ```\n\n3. **Response Format**\n\n   The service returns a JSON object containing weather data, including temperature, weather conditions, and an ASCII representation of the current weather.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fejoliet%2Fpython-microservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fejoliet%2Fpython-microservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fejoliet%2Fpython-microservice/lists"}