{"id":18003797,"url":"https://github.com/samarpan-rai/serveitlearn","last_synced_at":"2026-04-12T09:05:37.111Z","repository":{"id":49713578,"uuid":"278891447","full_name":"samarpan-rai/serveitlearn","owner":"samarpan-rai","description":"It creates an extremely thin layer around FastAPI library which allows you to create an end point super fast.","archived":false,"fork":false,"pushed_at":"2021-06-10T15:49:00.000Z","size":2514,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-30T01:43:34.632Z","etag":null,"topics":["fastapi","inference","ml","pypi","scikit-learn"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/serveitlearn/","language":"Python","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/samarpan-rai.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-11T15:42:33.000Z","updated_at":"2020-08-10T09:03:12.000Z","dependencies_parsed_at":"2022-09-13T01:35:01.944Z","dependency_job_id":null,"html_url":"https://github.com/samarpan-rai/serveitlearn","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samarpan-rai%2Fserveitlearn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samarpan-rai%2Fserveitlearn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samarpan-rai%2Fserveitlearn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samarpan-rai%2Fserveitlearn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samarpan-rai","download_url":"https://codeload.github.com/samarpan-rai/serveitlearn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247157076,"owners_count":20893202,"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":["fastapi","inference","ml","pypi","scikit-learn"],"created_at":"2024-10-30T00:11:57.117Z","updated_at":"2025-10-18T01:04:48.389Z","avatar_url":"https://github.com/samarpan-rai.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Introduction\n\nThis project is inspired by  [Vincent D. Warmerdam's brain fart](https://twitter.com/fishnets88/status/1279731745483624453). \n\nYou may train the most awesome model in the world but if you can't deploy it then people can't enjoy your work. In my experience, deployment is a topic that gets least discussed during courses. It is assumed that you can just do this without any formal training. In my experience, it not as easy to deploy models that's why I thought it woulbe be great to create `serveitlearn`. It creates an extremely thin layer around FastAPI library which allows you to create an end point super fast.  More specifically, It provides `/predict` end point. You can only send POST request with JSON body. The following code sample will make it clear. \n\n### Code sample : \n\n```py\n\nfrom serveitlearn.decorator import app, predict, initalize\n\n# Declare function that initalizes the model and any other data sources\n@initalize\ndef my_initalization():\n    pass\n\n# Declare function that will make the prediction based on the query\n\n@predict\ndef my_prediction(query_dict):\n    pass\n```\n\n## Installation\n\nYou need at least python 3.7. I will use conda for this \n\n1. Create environment (if you don't already have one)\n    `conda create -n serveitlearn_env python=3.7`\n\n2. Activate it\n    `conda activate serveitlearn_env`\n\n3. Install it\n    `pip install serveitlearn`\n\n\n## Hello World!\n\n\nThe example, loads iris dataset, trains a simple SVC model and deploys it using `serveitlearn`.\n\n\n```\n$ git clone https://github.com/samarpan-rai/serveitlearn\n\n$ cd serveitlearn/examples/\n\n$ pip install -r requirements.txt\n\n$ uvicorn svc_iris_example:app --reload\n\n$ curl --location --request POST 'localhost:8000/predict' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\"plant_dimensions\" : [[5.1,3.5,1.4,0.2],[5.1,3.5,1.4,0.2]]}'\n```\n\n## Limitations\n\n1. No authentication or security measures implemented. \n2. The documentation could be better.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamarpan-rai%2Fserveitlearn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamarpan-rai%2Fserveitlearn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamarpan-rai%2Fserveitlearn/lists"}