Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/0xsirsaif/frappe-api
FastAPI for Frappe
https://github.com/0xsirsaif/frappe-api
api fastapi frappe openapi openapi3 pydantic pydantic-v2 python swagger-ui
Last synced: 5 days ago
JSON representation
FastAPI for Frappe
- Host: GitHub
- URL: https://github.com/0xsirsaif/frappe-api
- Owner: 0xsirsaif
- Created: 2024-07-06T18:48:18.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-10-28T20:59:13.000Z (14 days ago)
- Last Synced: 2024-10-28T21:45:28.588Z (14 days ago)
- Topics: api, fastapi, frappe, openapi, openapi3, pydantic, pydantic-v2, python, swagger-ui
- Language: Python
- Homepage: https://0xsirsaif.github.io/frappe-api/
- Size: 758 KB
- Stars: 10
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FrappeAPI
Build APIs for Frappe with the simplicity of FastAPI!
⚠️ **Alert: Beta Version**
This project is currently in beta and not yet ready for production use. Expect changes and improvements as we work towards a stable release.
## Why?
Despite Frappe >= 15.0.0 pushing towards using type hints for API development and enhancing `frappe.whitelist()`, I'd like to take it a step further. This project aims to:
- Better API design
- Automatic API documentation
- Implement response-model-based serializationAnd honestly? Why not? Sometimes you just want to build something cool, even if it might be a bit unnecessary. Who knows, it might just make Frappe developers' lives a little easier (or at least more FastAPI-ish). I'm doing it for the love of coding, and of course, for learning. If it helps someone along the way, that's a bonus!
## Roadmap
### Frappe
- [ ] Frappe V14 support
- [ ] Frappe V15 support### Methods
- [x] Implement `app.get(...)` method
- [ ] Implement `app.post(...)` method
- [ ] Implement `app.put(...)` method
- [ ] Implement `app.patch(...)` method
- [ ] Implement `app.delete(...)` method### Query Parameter Features
- [ ] Automatic query parameter parsing/conversion based on type hints
- [ ] Required query parameters `needy: str`
- [ ] Optional query parameters with default values `skip: int = 0`
- [ ] Optional query parameters without default values `limit: Union[int, None] = None`
- [ ] Automatic Documentation generation for query parameters
- [ ] Enum support for query parameters [path parameters - predefined values](https://fastapi.tiangolo.com/tutorial/path-params/#predefined-values)
- [ ] Additional information and validation for query parameters- [ ] String validations
- [ ] `min_length`
- [ ] `max_length`
- [ ] `regex pattern`
- [ ] Numeric validations
- [ ] `gt`
- [ ] `ge`
- [ ] `lt`
- [ ] `le`
- [ ] Metadata
- [ ] `title`
- [ ] `description`
- [ ] `deprecated`- [ ] to be continued...
## Related Frappe PRs and Issues
- [PR #23135](https://github.com/frappe/frappe/pull/23135): Introducing type hints for API functions
- [PR #22300](https://github.com/frappe/frappe/pull/22300): Enhancing `frappe.whitelist()` functionality
- [PR #19029](https://github.com/frappe/frappe/pull/19029): Efforts to improve type safety in Frappe
- [Issue #14905](https://github.com/frappe/frappe/issues/14905): Discussion on improving API documentation