Skip to main content

Fire up your models with the flame 🔥

Project description

Flama

Fire up your models with the flame 🔥

Test And Publish workflow status Package version PyPI - Python Version


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 Components. Flama ASGI objects like Request, Response, Session and so on are defined as Components ready to be injected in your endpoints.
  • Components 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 and page 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()


@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

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

Star History Chart

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

flama-1.12.2.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flama-1.12.2-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

Details for the file flama-1.12.2.tar.gz.

File metadata

  • Download URL: flama-1.12.2.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.12 {"installer":{"name":"uv","version":"0.9.12"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for flama-1.12.2.tar.gz
Algorithm Hash digest
SHA256 e122f37ddd7ac3202635fbb6cd999f8d1d07bbd8e5793268677435e562858b8e
MD5 f28fc2161f121f3f25307275e11de847
BLAKE2b-256 a31886e9bfe71773a3be203cc7f4aa603e03156da2f3bc4e863d17c0a20a88e2

See more details on using hashes here.

File details

Details for the file flama-1.12.2-py3-none-any.whl.

File metadata

  • Download URL: flama-1.12.2-py3-none-any.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.12 {"installer":{"name":"uv","version":"0.9.12"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for flama-1.12.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4f712ee602569ac6efa17bb053ee4a90c6857d4d1c2ab914c9c0617bf3830226
MD5 99c8d62368314d11b8db3e3bb7004830
BLAKE2b-256 8a41160f37e558e445b165a3fe162aa022a655e8862fc1b593b41cbb9dfb55e7

See more details on using hashes here.

Supported by

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