{"id":15203968,"url":"https://github.com/anganda/citybreak-flask-api-with-microservices","last_synced_at":"2026-02-03T19:31:31.497Z","repository":{"id":251659206,"uuid":"836223276","full_name":"AngAnda/Citybreak-Flask-Api-with-Microservices","owner":"AngAnda","description":"Flask REST API for CRUD operations on weather and event data by date and city. Organized into microservices with a reusable template, it employs Docker for containerization, Elastic Stack for logging and monitoring, and Consul for service discovery and configuration. Each microservice is containerized for isolated, scalable deployment.","archived":false,"fork":false,"pushed_at":"2024-08-04T19:06:11.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-25T22:02:06.569Z","etag":null,"topics":["consul","docker","elasticsearch","elasticstack","flask","kibana","logging","microservices","mysql","redis"],"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/AngAnda.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-31T12:01:39.000Z","updated_at":"2025-01-26T23:05:52.000Z","dependencies_parsed_at":"2024-08-04T21:56:15.897Z","dependency_job_id":"aefc297e-f00e-4067-bd8a-8301ae8fa41f","html_url":"https://github.com/AngAnda/Citybreak-Flask-Api-with-Microservices","commit_stats":null,"previous_names":["anganda/citybreak-flask-api-with-microservices"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AngAnda/Citybreak-Flask-Api-with-Microservices","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AngAnda%2FCitybreak-Flask-Api-with-Microservices","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AngAnda%2FCitybreak-Flask-Api-with-Microservices/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AngAnda%2FCitybreak-Flask-Api-with-Microservices/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AngAnda%2FCitybreak-Flask-Api-with-Microservices/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AngAnda","download_url":"https://codeload.github.com/AngAnda/Citybreak-Flask-Api-with-Microservices/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AngAnda%2FCitybreak-Flask-Api-with-Microservices/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261960490,"owners_count":23236569,"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","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":["consul","docker","elasticsearch","elasticstack","flask","kibana","logging","microservices","mysql","redis"],"created_at":"2024-09-28T05:04:35.837Z","updated_at":"2026-02-03T19:31:31.461Z","avatar_url":"https://github.com/AngAnda.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Project Overview\n\nThis repository features a Flask REST API for CRUD operations on weather and event data by date and city. Organized into microservices with a reusable template, it employs Docker for containerization, Elastic Stack for logging and monitoring, and Consul for service discovery and configuration. Each microservice is containerized for isolated, scalable deployment.\n\n## Technologies Used\n- **Flask**: Web framework for Python used to develop the REST API.\n- **Docker**: Platform for containerization, ensuring portability across different environments.\n- **Elastic Stack**: Suite for logging and monitoring, including Elasticsearch, Logstash, and Kibana.\n- **Consul**: Tool for service discovery and configuration management.\n- **MySQL**: Database used for storing event data.\n- **Redis**: Database used for storing weather data.\n\n## Getting Started\n\n### Prerequisites\n- Docker and Docker Compose installed on your machine.\n\n### Installation\n1. **Clone the repository**:\n    ```sh\n    git clone https://github.com/username/repo-name.git\n    cd repo-name\n    ```\n\n2. **Build and run the Docker containers**:\n    ```sh\n    docker-compose up --build\n    ```\n\n## API Usage\n\n### Endpoints\n\n#### Access Citybreak Information\nTo get information about a citybreak for a specific city and date:\n```sh\nGET /citybreak?city=\u003cCITY\u003e\u0026date=\u003cDATE\u003e\n```\n\n#### Post Weather Data\nTo post weather data for a specific city and date:\n```sh\ncurl -X POST http://localhost:8081/weather -d \"city=\u003cCITY\u003e\u0026temperature=\u003cTEMP\u003e\u0026humidity=\u003cHUMIDITY\u003e\u0026wind=\u003cWIND\u003e\u0026date=\u003cDATE\u003e\"\n```\n\n#### Post Event Data\nTo post event data for a specific city and date:\n```sh\ncurl -X POST http://localhost:5000/service_events -d \"city=\u003cCITY\u003e\u0026name=\u003cEVENT_NAME\u003e\u0026date=\u003cDATE\u003e\u0026description=\u003cDESCRIPTION\u003e\"\n```\n\n### Monitoring and Logging\n#### Accessing Kibana\nTo monitor logs and view data visualizations, access Kibana at:\n```sh\nhttp://localhost:5601\n```\n\n### Service Discovery and Configuration\n#### Consul Usage\nConsul is used for service discovery and configuration. Ensure that Consul is properly configured and running. Access the Consul UI at:\n```sh\nhttp://localhost:8500\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanganda%2Fcitybreak-flask-api-with-microservices","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanganda%2Fcitybreak-flask-api-with-microservices","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanganda%2Fcitybreak-flask-api-with-microservices/lists"}