Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aprilahijriyan/falca
Falca is an intuitive REST APIs framework based on the falcon framework.
https://github.com/aprilahijriyan/falca
asgi framework python rest-api wsgi
Last synced: about 2 months ago
JSON representation
Falca is an intuitive REST APIs framework based on the falcon framework.
- Host: GitHub
- URL: https://github.com/aprilahijriyan/falca
- Owner: aprilahijriyan
- License: mit
- Created: 2021-04-18T22:33:25.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-02T20:02:22.000Z (almost 3 years ago)
- Last Synced: 2024-09-05T11:39:30.945Z (4 months ago)
- Topics: asgi, framework, python, rest-api, wsgi
- Language: Python
- Homepage:
- Size: 387 KB
- Stars: 7
- Watchers: 0
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Falca
![Logo](https://raw.githubusercontent.com/aprilahijriyan/falca/main/falca.png)
![PyPI - Downloads](https://img.shields.io/pypi/dm/falca?color=yellow&logo=python) ![PyPI](https://img.shields.io/pypi/v/falca?color=yellow&logo=python) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/falca?color=purple&logo=python&logoColor=yellow) ![PyPI - Format](https://img.shields.io/pypi/format/falca?logo=python&logoColor=yellow) ![PyPI - Status](https://img.shields.io/pypi/status/falca?color=red) ![PyPI - License](https://img.shields.io/pypi/l/falca?color=black) ![GitHub issues](https://img.shields.io/github/issues/aprilahijriyan/falca?logo=github) ![GitHub closed issues](https://img.shields.io/github/issues-closed/aprilahijriyan/falca?color=green&logo=github) ![Scrutinizer code quality (GitHub/Bitbucket)](https://img.shields.io/scrutinizer/quality/g/aprilahijriyan/falca/main?logo=scrutinizer) ![Black Formatter](https://img.shields.io/badge/code%20style-black-000000.svg)
Falca is an intuitive REST APIs framework.
Powered by https://falconframework.org/.
:warning: This is a BETA version please don't use it in a production environment. Thank you! :construction:
Goals of this project:
* Validates request body based on type hints.
* (Pydantic & Marshmallow) support as object serialization and deserialization
* Request body mapping
* Nested routers
* Plugin support
* Settings (Global Configuration) support
* Async Support
* Routing sub-application
* CLI
* Dependency injection
* Resource shortcut (`get`, `post`, `put`, `delete`, `websocket`, etc)# Contribution
**Do not hesitate!**
if you want to contribute like bug fixes, feature additions, etc. Please read our [contribution guidelines](https://github.com/aprilahijriyan/falca/blob/main/CONTRIBUTING.md).
Also bug reports are welcome :)
# Installation
Using `pip`:
```
pip install falca
```Alternatively, clone this repository and go to the `falca` directory:
```
git clone https://github.com/aprilahijriyan/falca
cd falca
```Initialize the environment with python v3.7 using [poetry](https://python-poetry.org/)
```
poetry env use $(which python3.7)
```Install dependencies
```
poetry install --no-dev
```# Usage
Let's see how beautiful it is
```python
# app.pyfrom typing import Optional
from falca.app import ASGI
from falca.depends.pydantic import Query
from falca.responses import JSONResponse
from falca.serializers.pydantic import Schemaclass LimitOffsetSchema(Schema):
limit: Optional[int]
offset: Optional[int]class Simple:
async def on_get(self, query: dict = Query(LimitOffsetSchema)):
return JSONResponse(query)app = ASGI(__name__)
app.add_route("/", Simple())```
Save the code above with filename `app.py`
And run it with the command:```sh
falca runserver
```**NOTE**: For the ASGI app, you need to install `uvicorn` before running it.
Also for other examples, you can find them [here](https://github.com/aprilahijriyan/falca/tree/main/examples)