{"id":16319527,"url":"https://github.com/syntaxsdev/microservice-demo","last_synced_at":"2025-06-24T10:07:57.651Z","repository":{"id":220438584,"uuid":"751620099","full_name":"syntaxsdev/microservice-demo","owner":"syntaxsdev","description":"Python Microservice Demo Using FastAPI for Red Hat Learning Experience Workshop","archived":false,"fork":false,"pushed_at":"2024-02-08T15:57:33.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-14T01:59:12.451Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","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/syntaxsdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2024-02-02T00:54:07.000Z","updated_at":"2024-02-02T02:28:07.000Z","dependencies_parsed_at":"2024-02-02T03:31:16.168Z","dependency_job_id":"df631f39-b854-4fde-82e6-723433bae84c","html_url":"https://github.com/syntaxsdev/microservice-demo","commit_stats":null,"previous_names":["syntaxsdev/microservice-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/syntaxsdev/microservice-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syntaxsdev%2Fmicroservice-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syntaxsdev%2Fmicroservice-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syntaxsdev%2Fmicroservice-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syntaxsdev%2Fmicroservice-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/syntaxsdev","download_url":"https://codeload.github.com/syntaxsdev/microservice-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syntaxsdev%2Fmicroservice-demo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261649854,"owners_count":23189751,"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":[],"created_at":"2024-10-10T22:27:18.756Z","updated_at":"2025-06-24T10:07:57.583Z","avatar_url":"https://github.com/syntaxsdev.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python Micorservices Demo\n\n### Red Hat Learning Experience Workshop: Building Microservices w/FastAPI.\nIn this workshop we will discover how to work with FastAPI, a web framework tool similar to Flask. \nIt is just as easy to use, but more powerful.\n\n### What does this cover?\n1. We explore how to use GET methods\n2. Demonstrate how to query a list of users\n3. Show how to handle pictures\n4. Create a basic webpage in HTML and JavaScript\n\n## Requirements:\n1. Laptop running Windows, Mac, or Linux\n2. Python 3.9+ installed\n3. A browser\n\n## How To Setup\n\n1. Clone the project\n```sh\ngit clone git@github.com:syntaxsdev/microservice-demo.git\n```\n\n2. Change into directory\n```sh\ncd microservice-demo\n```\n\n3. Open `exercise.ipynb` and follow along!\n\n## Running the FastAPI service in a Container\n\nAs an extension of Ryan Gniadek's [podman demo](https://github.com/ryangniadek/podman-demo) for Red Hat Edge to Cloud Learning Experience 2024 Hackathon, you can use the [Containerfile](./Containerfile) to build and run this application in a container.\n\nSee podman-demo [How to buld a container image](https://github.com/ryangniadek/podman-demo?tab=readme-ov-file#how-to-build-a-container-image) [Run your container image](https://github.com/ryangniadek/podman-demo?tab=readme-ov-file#run-your-container-image) for a detailed explanation of the commands below\n\n```bash\n# Build the container\n$ podman build -f Containerfile -t python-fastapi-demo\n\n# Run the container and expose port 8000 on the host system as a redirect to port 8000 in the container\n$ podman run --rm -d --name fastapi-demo -p 8000:8000 localhost/python-fastapi-demo\n\n# Query the FastAPI endpoint\n$ curl http://localhost:8000\n\n...\n\n# Stop the FastAPI container\n$ podman stop fastapi-demo\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyntaxsdev%2Fmicroservice-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyntaxsdev%2Fmicroservice-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyntaxsdev%2Fmicroservice-demo/lists"}