{"id":17988254,"url":"https://github.com/paulescu/taxi-data-api-python","last_synced_at":"2025-04-09T07:08:08.500Z","repository":{"id":259875811,"uuid":"863965641","full_name":"Paulescu/taxi-data-api-python","owner":"Paulescu","description":"Build and deploy a REST API for taxi trip data 🚕","archived":false,"fork":false,"pushed_at":"2024-11-01T12:13:42.000Z","size":2614,"stargazers_count":71,"open_issues_count":0,"forks_count":18,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T03:45:59.908Z","etag":null,"topics":["docker","fastapi","kubernetes","python"],"latest_commit_sha":null,"homepage":"https://www.realworldml.net/courses","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/Paulescu.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-09-27T08:40:55.000Z","updated_at":"2025-03-16T21:58:05.000Z","dependencies_parsed_at":"2024-10-28T15:25:53.576Z","dependency_job_id":"1739493a-2419-4d0e-affc-72455e17d2ed","html_url":"https://github.com/Paulescu/taxi-data-api-python","commit_stats":null,"previous_names":["paulescu/taxi-data-api-python"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paulescu%2Ftaxi-data-api-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paulescu%2Ftaxi-data-api-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paulescu%2Ftaxi-data-api-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paulescu%2Ftaxi-data-api-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Paulescu","download_url":"https://codeload.github.com/Paulescu/taxi-data-api-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247994121,"owners_count":21030050,"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":["docker","fastapi","kubernetes","python"],"created_at":"2024-10-29T19:11:09.846Z","updated_at":"2025-04-09T07:08:08.469Z","avatar_url":"https://github.com/Paulescu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003ch2\u003eReal-World ML\u003c/h2\u003e\n    \u003ch1\u003eBuild and deploy a professional REST API to Kubernetes with \u003ca href=\"https://gimlet.io\"\u003eGimlet\u003c/a\u003e 🚀\u003c/h1\u003e\n    \u003c!-- \u003cimg src=\"./media/kubernetes_cluster.gif\" width='600' /\u003e --\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://www.youtube.com/watch?v=3rDMQLE0DKA\"\u003e\n    \u003cimg src=\"media/yt_cover.png\" alt=\"Deploy to Kubernetes with Gimlet\" style=\"width:100%;\"\u003e\n    \u003cp\u003eClick here to watch the video 🎬\u003c/p\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\n#### Table of contents\n* [Our goal 🎯](#our-goal)\n* [How to run the API locally? 🏃](#how-to-run-the-api-locally)\n* [How to deploy the API to Kubernetes with Gimlet? 🚀](#how-to-deploy-the-api-to-kubernetes-with-gimlet)\n* [How to monitor our API with Elasticsearch and Kibana? 🔎](#how-to-monitor-our-api-with-elasticsearch-and-kibana)\n* [See it in action 🎬](#see-it-in-action)\n* [Wanna learn more real-world ML? 🧠](#wanna-learn-more-real-world-ml)\n\n## Our goal\n\nLet’s **build** and **deploy** a production-ready REST API that can serve data on historical taxi rides in NYC.\n\nThe original data is stored in one-month parquet files [on this website](https://www.nyc.gov/site/tlc/about/tlc-trip-record-data.page), and our goal is to make it easily accessible to the WORLD through a REST API.\n\n\n## How to run the API locally?\n\nGit clone this repository, cd into the root directory of the project and then run the following commands using make.\n\n1. Install [Python Poetry](https://python-poetry.org/docs/#installation) (if necessary)\nand create an isolated virtual environmnet for development purposes.\n    ```\n    $ make install\n    ```\n\n2. Test, build and run the dockerized REST API with\n    ```\n    $ make all\n    ```\n\n3. Check the API is up and running locally, and that you can connect to it\n    ```\n    $ make health-check-local\n    ```\n\n4. Send a sample request to the local API\n    ```\n    $ make sample-request-local\n    ```\n\nGood job. The API is up and running locally. However, until you don’t deploy it to a production environment, and make it accessible to\n\n* your clients 💁🏻‍♀️\n* your colleagues 👨🏻‍💼\n* or the whole world 🌏\n\nyour real-world impact is **ZERO**.\n\nLet me show you how to deploy this API to a production Kubernetes cluster.\n\n\n\u003e **What is Kubernetes? ☸📦** \n\u003e\n\u003e Kubernetes is an open-source container orchestration platform that automates the deployment, scaling, and management of your Dockerized apps\n\u003e\n\u003e It is currently the most widely used container orchestration platform in the world, and it has become the de facto standard due to its robust features, large community support, and backing from major tech companies.\n\n## How to deploy the API to Kubernetes with Gimlet?\n\n[Gimlet](https://gimlet.io/) is a tool that helps you quickly deploy your apps to ANY Kubernetes cluster.\n\n- You can do it entirely from the Gimlet UI, as explained in this article.\n\nor\n\n- You can adjust the [gimlet manifest in this repository](https://github.com/Paulescu/taxi-data-api-python/blob/main/.gimlet/electric-paper-taxi-data-api-python.yaml), to automatically deploy your code changes to the main branch.\n\n## How to monitor our API with Elasticsearch and Kibana?\n\nThese are the steps:\n\n1. Spin up Elasticsearch and Kibana with the docker compose\n2. Add middleware to FastAPI app\n3. Build a dashboard with Kibana\n\n\u003cimg src=\"./media/kibana.gif\" width='600' /\u003e\n\n## See it in action\n\n[👉🏽 Click here to try the API](https://paulescu-taxi-data-api-python-ayolbhnl.gimlet.app/trips?from_ms=1674561817000\u0026n_results=100)\n\n\n## Wanna learn more real-world ML?\n\nJoin more than 19k builders to the [**Real-World ML Newsletter**](https://www.realworldml.net/subscribe). Every Saturday morning.\n\n### [👉🏽 Click here to subscribe for FREE](https://www.realworldml.net/subscribe)\n\n### [**👉🏽 My live courses on Real World ML**](https://www.realworldml.net/courses)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulescu%2Ftaxi-data-api-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulescu%2Ftaxi-data-api-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulescu%2Ftaxi-data-api-python/lists"}