Fire up your models with the flame 🔥
Project description
Fire up your models with the flame 🔥
Flama
Flama is a python library which establishes a standard framework for development and deployment of APIs with special focus on machine learning (ML). The main aim of the framework is to make ridiculously simple the deployment of ML APIs, simplifying (when possible) the entire process to a single line of code.
The library builds on Starlette, and provides an easy-to-learn philosophy to speed up the building of highly performant GraphQL, REST and ML APIs. Besides, it comprises an ideal solution for the development of asynchronous and production-ready services, offering automatic deployment for ML models.
Some remarkable characteristics:
- Generic classes for API resources with the convenience of standard CRUD methods over SQLAlchemy tables.
- A schema system (based on Marshmallow or Typesystem) which allows the declaration of inputs and outputs of endpoints very easily, with the convenience of reliable and automatic data-type validation.
- Dependency injection to make ease the process of managing parameters needed in endpoints via the use of
Component
s. Flama ASGI objects likeRequest
,Response
,Session
and so on are defined asComponent
s ready to be injected in your endpoints. Component
s as the base of the plugin ecosystem, allowing you to create custom or use those already defined in your endpoints, injected as parameters.- Auto generated API schema using OpenAPI standard.
- Auto generated
docs
, and provides a Swagger UI and ReDoc endpoints. - Automatic handling of pagination, with several methods at your disposal such as
limit-offset
andpage numbering
, to name a few.
Installation
Flama is fully compatible with all supported versions of Python. We recommend you to use the latest version available.
For a detailed explanation on how to install flama visit: https://flama.dev/docs/getting-started/installation.
Getting Started
Visit https://flama.dev/docs/getting-started/quickstart to get started with Flama.
Documentation
Visit https://flama.dev/docs/ to view the full documentation.
Example
from flama import Flama
app = Flama(
title="Hello-🔥",
version="1.0",
description="My first API",
)
@app.route("/")
def home():
"""
tags:
- Salute
summary:
Returns a warming message
description:
This is a more detailed description of the method itself.
Here we can give all the details required and they will appear
automatically in the auto-generated docs.
responses:
200:
description: Warming hello message!
"""
return {"message": "Hello 🔥"}
This example will build and run a Hello 🔥
API. To run it:
flama run examples.hello_flama:app
Authors
- José Antonio Perdiguero López (@perdy)
- Miguel Durán-Olivencia (@migduroli)
Contributing
This project is absolutely open to contributions so if you have a nice idea, please read our contributing docs before submitting a pull request.
Star History
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file flama-1.8.1.tar.gz
.
File metadata
- Download URL: flama-1.8.1.tar.gz
- Upload date:
- Size: 298.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.10.12 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d5c3ff129868864ab426a313a05e22fb129347ecc40cf3f585677b73059025c |
|
MD5 | 3a465bec099b9201f74565a57a7ecf09 |
|
BLAKE2b-256 | 9f7703db4295fe37ae7e366b8a2e44f2285b25be17d0094d54fa2d9ba145e179 |
File details
Details for the file flama-1.8.1-py3-none-any.whl
.
File metadata
- Download URL: flama-1.8.1-py3-none-any.whl
- Upload date:
- Size: 345.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.10.12 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c8b316f7cac161e03d6e41f258596804112bd7230e15974a0fd3b04d526b5c1 |
|
MD5 | 356f02fe7080ff396f7b1761908cf81c |
|
BLAKE2b-256 | e8917392ec7c026c338c8863b7b99e4a1d393226be097fceccaaf1ebdaf2398b |