{"id":21712267,"url":"https://github.com/ashutoshsahoo/python-microservices-grpc","last_synced_at":"2026-04-15T18:02:30.785Z","repository":{"id":216675402,"uuid":"741990722","full_name":"ashutoshsahoo/python-microservices-grpc","owner":"ashutoshsahoo","description":"GRPC protobuf example with python microservice","archived":false,"fork":false,"pushed_at":"2024-01-11T15:23:30.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-20T18:26:07.907Z","etag":null,"topics":["docker-compose","flask","grpc","grpc-python","microservice","protobuf","python"],"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/ashutoshsahoo.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-11T14:34:29.000Z","updated_at":"2024-01-11T15:44:45.000Z","dependencies_parsed_at":"2024-01-11T23:30:42.504Z","dependency_job_id":"9406c028-9ab4-407f-aaa4-8d88bb9993a7","html_url":"https://github.com/ashutoshsahoo/python-microservices-grpc","commit_stats":null,"previous_names":["ashutoshsahoo/python-microservices-grpc"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ashutoshsahoo/python-microservices-grpc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashutoshsahoo%2Fpython-microservices-grpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashutoshsahoo%2Fpython-microservices-grpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashutoshsahoo%2Fpython-microservices-grpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashutoshsahoo%2Fpython-microservices-grpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ashutoshsahoo","download_url":"https://codeload.github.com/ashutoshsahoo/python-microservices-grpc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashutoshsahoo%2Fpython-microservices-grpc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31853279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["docker-compose","flask","grpc","grpc-python","microservice","protobuf","python"],"created_at":"2024-11-25T23:36:31.886Z","updated_at":"2026-04-15T18:02:30.765Z","avatar_url":"https://github.com/ashutoshsahoo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# python-microservices-grpc\n\n## Use case: Example Microservices\n\nTo keep things manageable, you’ll define only two microservices:\n\nMarketplace will be a very minimal web app that displays a list of books to the user.\nRecommendations will be a microservice that provides a list of books in which the user may be interested.\nHere’s a diagram that shows how your user interacts with the microservices:\n\n![application-diagram](./application-design.png)\n\nYou can see that the user will interact with the Marketplace microservice via their browser, and the Marketplace microservice will interact with the Recommendations microservice.\n\nThink for a moment about the Recommendations API. You want the recommendations request to have a few features:\n\n- User ID: You could use this to personalize the recommendations. However, for simplicity, all recommendations in this tutorial will be random.\n- Book category: To make the API a little more interesting, you’ll add book categories, such as mystery, self-help, and so on.\n- Max results: You don’t want to return every book in stock, so you’ll add a limit to the request.\n\nThe response will be a list of books. Each book will have the following data:\n\n- Book ID: A unique numeric ID for the book.\n- Book title: The title you can display to the user.\n  A real website would have more data, but you’ll keep the number of features limited for the sake of this example.\n\n## Coding\n\n- Define the API with `protobufs/recommendations.proto`\n- Generate the python code using `grpcio-tools`. This will be done in docker build stage.\n- Write necessary code for the user to interact with browser.\n\n## Run the application\n\n```sh\ndocker compose build\ndocker compose up -d\n```\n\nOpen application dashboard at [localhost](http://127.0.0.1:5000).\n\n## Run integration tests\n\n```sh\ndocker compose exec marketplace pytest marketplace_integration_test.py\n```\n\n## Stop and remove container\n\n```sh\ndocker compose down\n```\n\n## Reference\n\n- [The Python Tutorial](https://docs.python.org/3/tutorial/index.html)\n- [Python packages](https://pypi.org)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashutoshsahoo%2Fpython-microservices-grpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashutoshsahoo%2Fpython-microservices-grpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashutoshsahoo%2Fpython-microservices-grpc/lists"}