Skip to main content

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

Project description

Falca

Logo

PyPI - Downloads PyPI PyPI - Python Version PyPI - Format PyPI - Status PyPI - License GitHub issues GitHub closed issues Scrutinizer code quality (GitHub/Bitbucket) Black Formatter

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.

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

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-2.4.0.tar.gz (20.8 kB view details)

Uploaded Source

Built Distribution

falca-2.4.0-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

File details

Details for the file falca-2.4.0.tar.gz.

File metadata

  • Download URL: falca-2.4.0.tar.gz
  • Upload date:
  • Size: 20.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.8.2 Linux/5.8.0-1036-azure

File hashes

Hashes for falca-2.4.0.tar.gz
Algorithm Hash digest
SHA256 1a4a7221e4bcd35344f1d50e806ebf1a1f7a8a8b798288cefa1399b91173034a
MD5 790406afb1dce86fdc1df1e4371b0b03
BLAKE2b-256 e02bf6fcce7864ec561707174472e2c65f6b95d231174150a8ca0d6982e3c04c

See more details on using hashes here.

File details

Details for the file falca-2.4.0-py3-none-any.whl.

File metadata

  • Download URL: falca-2.4.0-py3-none-any.whl
  • Upload date:
  • Size: 29.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.8.2 Linux/5.8.0-1036-azure

File hashes

Hashes for falca-2.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a9b59723226fb9652979843c96ed30caba03aa1129295787aea4357cf830e73
MD5 76506654715e7950924bc4c23a2415bd
BLAKE2b-256 6d881b403fab88d38fa4d009ccbeefce5a094f6fc6a90ab5c35af55ae34be542

See more details on using hashes here.

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