{"id":31792718,"url":"https://github.com/ppmpreetham/fastrapi","last_synced_at":"2025-10-10T17:15:53.692Z","repository":{"id":316924358,"uuid":"1063412601","full_name":"ppmpreetham/fastrapi","owner":"ppmpreetham","description":"⚡FastAPI alternative in Python, but actually (~88x) FASTER. Written in Rust.","archived":false,"fork":false,"pushed_at":"2025-10-04T11:38:50.000Z","size":41,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-05T05:03:21.342Z","etag":null,"topics":["api","async","fastapi","fasterapi","fastrapi","framework","json","json-schema","python","python3","rest","web"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/fastrapi/","language":"Rust","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/ppmpreetham.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-24T15:36:09.000Z","updated_at":"2025-10-04T11:38:54.000Z","dependencies_parsed_at":"2025-09-27T17:23:36.027Z","dependency_job_id":"0fac4319-5641-4b32-a342-b59d77f749bb","html_url":"https://github.com/ppmpreetham/fastrapi","commit_stats":null,"previous_names":["ppmpreetham/fastrapi"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ppmpreetham/fastrapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppmpreetham%2Ffastrapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppmpreetham%2Ffastrapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppmpreetham%2Ffastrapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppmpreetham%2Ffastrapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ppmpreetham","download_url":"https://codeload.github.com/ppmpreetham/fastrapi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppmpreetham%2Ffastrapi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278411261,"owners_count":25982368,"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-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["api","async","fastapi","fasterapi","fastrapi","framework","json","json-schema","python","python3","rest","web"],"created_at":"2025-10-10T17:15:52.634Z","updated_at":"2025-10-10T17:15:53.679Z","avatar_url":"https://github.com/ppmpreetham.png","language":"Rust","readme":"# FastrAPI (Fast + Rust + API)\n\n\u003cimg src=\"https://raw.githubusercontent.com/ppmpreetham/fastrapi/refs/heads/main/readme/fastrapi.gif?raw=true\" width=\"100%\" alt=\"FastRAPI GIF\"\u003e\nFastrAPI is a high-performance web framework that supercharges your Python APIs with the power of Rust. Built on Axum and PyO3, it delivers unmatched speed, type safety, and developer-friendly Python syntax. Create robust, async-ready APIs with minimal overhead and maximum throughput. FastrAPI is your drop-in replacement for FastAPI, offering familiar syntax with up to 9.5x faster performance.\n\n## Key Features\n\n- **Lightning Speed**: Powered by Rust and Axum, FastrAPI delivers up to 9.5x faster performance than FastAPI, making your APIs scream.\n- **Python-First**: Write clean, familiar Python code—no Rust knowledge needed. FastrAPI handles the heavy lifting behind the scenes.\n- **Ironclad Type Safety**: Inherits Rust's robust type system for rock-solid reliability, catching errors before they hit production.\n- **Pydantic Powered**: Seamless integration with Pydantic for effortless request and response validation, keeping your data in check.\n- **Async Native**: Built on Tokio's async runtime, FastrAPI maximizes concurrency for handling thousands of requests with ease.\n- **Ultra Lightweight**: Minimal runtime overhead with maximum throughput.\n- **Drop-in Replacement**: Drop-in compatibility with FastAPI's beloved decorator syntax, so you can switch without rewriting your codebase.\n\n---\n\n#### Is it as fast as claimed?\nYes. Powered by Rust and Axum, FastrAPI outperforms FastAPI by up to 9.5x in real-world benchmarks, with no compromises on usability. Check it out [here](https://github.com/ppmpreetham/fastrapi?tab=readme-ov-file#performance)\n\n#### Do I need to know Rust?\nNope. FastrAPI lets you write 100% Python code while leveraging Rust's performance under the hood.\n\n#### Can it handle complex APIs?\nAbsolutely. With full Pydantic integration and async support, FastrAPI scales effortlessly for small projects and enterprise-grade APIs alike.\n\n#### Will it keep up with FastAPI updates?\nYes. FastrAPI mirrors FastAPI's decorator-based syntax, ensuring compatibility and instant access to familiar workflows.\n\n## Installation\n\n### uv\n```bash\nuv install fastrapi\n```\n\n### pip\n```bash\npip install fastrapi\n```\n\n## Quick Start\n\n```python\nfrom fastrapi import FastrAPI\napp = FastrAPI()\n\n@app.get(\"/hello\")\ndef hello():\n    return {\"Hello\": \"World\"}\n\n@app.post(\"/echo\")\ndef echo(data):\n    return {\"received\": data}\n\nif __name__ == \"__main__\":\n    app.serve(\"127.0.0.1\", 8080)\n```\n\n### Now, test it with:\n```bash\ncurl http://127.0.0.1:8080/hello\n```\n\nFor the `POST` endpoint:\n```bash\ncurl --location 'http://127.0.0.1:8080/echo' \\\n--header 'Content-Type: application/json' \\\n--data '{\"foo\": 123, \"bar\": [1, 2, 3]}'\n```\n\n\n\u003cdetails\u003e\n  \u003csummary\u003eShow Pydantic example\u003c/summary\u003e\n\n```python\nfrom pydantic import BaseModel\nfrom fastrapi import FastrAPI\n\napi = FastrAPI()\n\nclass User(BaseModel):\n    name: str\n    age: int\n\n@api.post(\"/create_user\")\ndef create_user(data: User):\n    return {\"msg\": f\"Hello {data.name}, age {data.age}\"}\n\napi.serve(\"127.0.0.1\", 8080)\n```\n\n\u003c/details\u003e\n\n## Performance\nBenchmarks using [k6](https://k6.io/) show it outperforms FastAPI + Guvicorn across multiple worker configurations.\n\n### 🖥️ Test Environment\n- **Kernel:** 6.16.8-arch3-1  \n- **CPU:** AMD Ryzen 7 7735HS (16 cores, 4.83 GHz)  \n- **Memory:** 15 GB  \n- **Load Test:** 20 Virtual Users (VUs), 30s  \n\n### ⚡ Benchmark Results\n\n| Framework                          | Avg Latency (ms) | Median Latency (ms) | Requests/sec | P95 Latency (ms) | P99 Latency (ms) |\n|------------------------------------|-----------------|-------------------|--------------|-----------------|-----------------|\n| **FASTRAPI**                       | 2.19            | 2.16              | **8881**     | 3.79            | 11.67           |\n| FastAPI + Guvicorn (workers: 1)    | 21.08           | 19.67             | 937          | 38.47           | 93.42           |\n| FastAPI + Guvicorn (workers: 16)   | 4.84            | 4.17              | 3882         | 10.22           | 81.20           |\n\n\n\u003e **TLDR;** FASTRAPI handles thousands of requests per second with ultra-low latency — making it **~9.5× faster** than FastAPI + Guvicorn with 1 worker.\n\n## Current Limitations\n- Limited validation features compared to FastAPI's Pydantic integration\n- Some advanced features are still in development\n\n## Contributing\nContributions are welcome! Please feel free to submit a Pull Request.\n\n- Fork the repository\n- Create your feature branch (git checkout -b feature/amazing-feature)\n- Commit your changes (git commit -m 'Add some amazing feature')\n- Push to the branch (git push origin feature/amazing-feature)\n- Open a Pull Request\n\n## License\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Acknowledgments\nInspired by FastAPI\nBuilt with [PyO3](https://github.com/PyO3/pyo3/) and [Axum](https://github.com/tokio-rs/axum/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fppmpreetham%2Ffastrapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fppmpreetham%2Ffastrapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fppmpreetham%2Ffastrapi/lists"}