Metadata-Version: 2.1
Name: falca
Version: 1.0.0
Summary: Falca is an intuitive REST APIs framework based on the falcon framework.
Home-page: https://github.com/aprilahijriyan/falca
License: MIT
Keywords: wsgi,asgi,framework,rest api
Author: aprilahijriyan
Author-email: hijriyan23@gmail.com
Requires-Python: >=3.7,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Requires-Dist: Mako (>=1.1.4,<2.0.0)
Requires-Dist: falcon (>=3.0.0,<4.0.0)
Requires-Dist: ipython (>=7.23.1,<8.0.0)
Requires-Dist: requests-toolbelt (>=0.9.1,<0.10.0)
Requires-Dist: rich (>=10.1.0,<11.0.0)
Requires-Dist: six (>=1.15.0,<2.0.0)
Requires-Dist: typer[all] (>=0.3.2,<0.4.0)
Requires-Dist: typing-inspect (>=0.6.0,<0.7.0)
Project-URL: Repository, https://github.com/aprilahijriyan/falca
Description-Content-Type: text/markdown

# Falca

<p align="center">
<img width="90%" height="330" src="https://raw.githubusercontent.com/aprilahijriyan/falca/main/falca.png">
</p>

<p align="center">
Falca is an intuitive REST APIs framework.<br>
Powered by https://falconframework.org/.<br><br>
:warning: <i><strong>Production ready soon!</strong></i> :construction:<br>
</p>

Goals of this project:

- [x] Validates request body based on type hints.
- [x] (Pydantic & Marshmallow) support as object serialization and deserialization
- [x] Request body mapping
- [x] Nested routers
- [x] Plugin support
- [x] Settings (Global Configuration) support
- [x] Async Support
- [ ] OpenAPI (Swagger & Redoc)
- [x] CLI
- [x] Dependency injection
- [x] 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).

# Installation

Clone this repository and go to the 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)

