Skip to main content

Falca is an intuitive REST APIs framework based on the falcon framework.

Project description

Falca

Falca is an intuitive REST APIs framework.
Powered by https://falconframework.org/.

:warning: Production ready soon! :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
  • OpenAPI (Swagger & Redoc)
  • 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.

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

poetry env use $(which python3.7)

Install dependencies

poetry install --no-dev

Usage

Let's see how beautiful it is

# 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:

falca runserver

NOTE: For the ASGI app, you need to install uvicorn before running it. Also for other examples, you can find them here

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

falca-1.0.0.tar.gz (19.3 kB view hashes)

Uploaded Source

Built Distribution

falca-1.0.0-py3-none-any.whl (27.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page