{"id":18983582,"url":"https://github.com/alivx/ocr-fastapi-demo","last_synced_at":"2026-05-03T21:33:43.616Z","repository":{"id":264499658,"uuid":"571383746","full_name":"alivx/ocr-fastapi-demo","owner":"alivx","description":"Demo app for sync and asyncio using fastAPI","archived":false,"fork":false,"pushed_at":"2024-05-10T14:08:18.000Z","size":107,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-19T07:36:58.823Z","etag":null,"topics":["async","fastapi","fastapi-crud","redis","rq","synchronization"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alivx.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}},"created_at":"2022-11-28T02:07:10.000Z","updated_at":"2024-05-10T14:08:16.000Z","dependencies_parsed_at":"2024-11-24T19:16:38.076Z","dependency_job_id":"6d8d9106-e7cb-49a4-bced-1b9d0da9dbf8","html_url":"https://github.com/alivx/ocr-fastapi-demo","commit_stats":null,"previous_names":["alivx/ocr-fastapi-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alivx/ocr-fastapi-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alivx%2Focr-fastapi-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alivx%2Focr-fastapi-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alivx%2Focr-fastapi-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alivx%2Focr-fastapi-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alivx","download_url":"https://codeload.github.com/alivx/ocr-fastapi-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alivx%2Focr-fastapi-demo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266302934,"owners_count":23908265,"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","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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":["async","fastapi","fastapi-crud","redis","rq","synchronization"],"created_at":"2024-11-08T16:17:41.210Z","updated_at":"2026-05-03T21:33:38.593Z","avatar_url":"https://github.com/alivx.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OCR Service\n\ntesting OCR API using FastAPI to demonstrate asyncio, async, and queueing\n\n### Dependencies\n1. Docker\n2. Docker-compose\n\n\n### AsyncIO\nUsing:\n1. aiofile\n2. aiopytesseract\n3. miniopy_async\n\nhttps://github.com/alivx/ocr-fastapi-demo/blob/master\n\n\u003cimg src=\"https://raw.githubusercontent.com/alivx/ocr-fastapi-demo/master/files/async.jpg\" alt=\"sample1\" style=\"zoom:50%;\" /\u003e\n\n\n### Sync\n\n1. pytesseract\n\n\u003cimg src=\"https://raw.githubusercontent.com/alivx/ocr-fastapi-demo/master/files/sync.jpg\" alt=\"sample1\" style=\"zoom:50%;\" /\u003e\n\n\n \n\n### AsyncIO with queue\nUsing:\n1. aiofile\n2. aiopytesseract\n3. miniopy_async\n4. RQ\n\n\n### Start the service\n\n```\ndocker-compose build\ndocker-compose up\n```\n\n### API request\n\nSync\n```\ncurl --location --request POST 'http://127.0.0.1:8000/upload' \\\n--form 'image=@\"/${path}.png\"'\n```\nAsyncIO\n```\ncurl --location --request POST 'http://127.0.0.1:8001s/upload' \\\n--form 'image=@\"/${path}.png\"'\n```\nAsyncIO with queue\n```\ncurl --location --request POST 'http://127.0.0.1:8002/upload' \\\n--form 'image=@\"/${path}.png\"'\n```\n\n\n### Stress test\n\n```\n locust -f stress.py\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falivx%2Focr-fastapi-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falivx%2Focr-fastapi-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falivx%2Focr-fastapi-demo/lists"}