falca-2.4.0
توضیحات
Falca is an intuitive REST APIs framework based on the falcon framework.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | falca-2.4.0 |
| نام | falca |
| نسخه کتابخانه | 2.4.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | aprilahijriyan |
| ایمیل نویسنده | hijriyan23@gmail.com |
| آدرس صفحه اصلی | https://github.com/aprilahijriyan/falca |
| آدرس اینترنتی | https://pypi.org/project/falca/ |
| مجوز | MIT |
# Falca

         
<p align="center">
Falca is an intuitive REST APIs framework.<br>
Powered by https://falconframework.org/.<br><br>
:warning: <i><strong>This is a BETA version please don't use it in a production environment. Thank you!</strong></i> :construction:<br>
</p>
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.py
from typing import Optional
from falca.app import ASGI
from falca.depends.pydantic import Query
from falca.responses import JSONResponse
from falca.serializers.pydantic import Schema
class 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)
نیازمندی
| مقدار | نام |
|---|---|
| >=3.0.0,<4.0.0 | falcon |
| >=1.1.4,<2.0.0 | Mako |
| >=1.15.0,<2.0.0 | six |
| >=0.3.2,<0.4.0 | typer[all] |
| >=10.1.0,<11.0.0 | rich |
| >=0.9.1,<0.10.0 | requests-toolbelt |
| >=7.23.1,<8.0.0 | ipython |
| >=0.6.0,<0.7.0 | typing-inspect |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7,<4.0 | Python |
نحوه نصب
نصب پکیج whl falca-2.4.0:
pip install falca-2.4.0.whl
نصب پکیج tar.gz falca-2.4.0:
pip install falca-2.4.0.tar.gz