Metadata-Version: 2.1
Name: fal
Version: 0.12.7
Summary: fal is an easy-to-use Serverless Python Framework
Author: Features & Labels
Author-email: hello@fal.ai
Requires-Python: >=3.8,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: attrs (>=21.3.0)
Requires-Dist: click (>=8.1.3,<9.0.0)
Requires-Dist: colorama (>=0.4.6,<0.5.0)
Requires-Dist: dill (==0.3.7)
Requires-Dist: fastapi (==0.99.1)
Requires-Dist: grpc-interceptor (>=0.15.0,<0.16.0)
Requires-Dist: grpcio (>=1.50.0,<2.0.0)
Requires-Dist: httpx (>=0.15.4)
Requires-Dist: importlib-metadata (>=4.4) ; python_version < "3.10"
Requires-Dist: isolate-proto (>=0.3.4,<0.4.0)
Requires-Dist: isolate[build] (>=0.12.3,<1.0)
Requires-Dist: msgpack (>=1.0.7,<2.0.0)
Requires-Dist: opentelemetry-api (>=1.15.0,<2.0.0)
Requires-Dist: opentelemetry-sdk (>=1.15.0,<2.0.0)
Requires-Dist: packaging (>=21.3)
Requires-Dist: pathspec (>=0.11.1,<0.12.0)
Requires-Dist: pillow (>=10.2.0,<11.0.0)
Requires-Dist: portalocker (>=2.7.0,<3.0.0)
Requires-Dist: pydantic (<2.0)
Requires-Dist: pyjwt[crypto] (>=2.8.0,<3.0.0)
Requires-Dist: python-dateutil (>=2.8.0,<3.0.0)
Requires-Dist: rich (>=13.3.2,<14.0.0)
Requires-Dist: rich_click
Requires-Dist: structlog (>=22.3.0,<23.0.0)
Requires-Dist: types-python-dateutil (>=2.8.0,<3.0.0)
Requires-Dist: typing-extensions (>=4.7.1,<5.0.0)
Requires-Dist: websockets (>=12.0,<13.0)
Description-Content-Type: text/markdown

[![PyPI](https://img.shields.io/pypi/v/fal.svg?logo=PyPI)](https://pypi.org/project/fal)
[![Tests](https://img.shields.io/github/actions/workflow/status/fal-ai/fal/integration_tests.yaml?label=Tests)](https://github.com/fal-ai/fal/actions)

# fal

fal is a serverless Python runtime that lets you run and scale code in the cloud with no infra management.

With fal, you can build pipelines, serve ML models and scale them up to many users. You scale down to 0 when you don't use any resources.

## Quickstart

First, you need to install the `fal` package. You can do so using pip:
```shell
pip install fal
```

Then you need to authenticate:
```shell
fal auth login
```

You can also use fal keys that you can get from [our dashboard](https://fal.ai/dashboard/keys).

Now can use the fal package in your Python scripts as follows:

```py
import fal

@fal.function(
    "virtualenv",
    requirements=["pyjokes"],
)
def tell_joke() -> str:
    import pyjokes

    joke = pyjokes.get_joke()
    return joke

print("Joke from the clouds: ", tell_joke())
```

A new virtual environment will be created by fal in the cloud and the set of requirements that we passed will be installed as soon as this function is called. From that point on, our code will be executed as if it were running locally, and the joke prepared by the pyjokes library will be returned.

## Next steps

If you would like to find out more about the capabilities of fal, check out to the [docs](https://fal.ai/docs). You can learn more about persistent storage, function caches and deploying your functions as API endpoints.

