fal 0.14.0__tar.gz → 0.15.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fal might be problematic. Click here for more details.
- fal-0.15.2/PKG-INFO +119 -0
- {fal-0.14.0 → fal-0.15.2}/README.md +27 -0
- fal-0.15.2/fal.egg-info/PKG-INFO +119 -0
- fal-0.15.2/fal.egg-info/SOURCES.txt +106 -0
- fal-0.15.2/fal.egg-info/dependency_links.txt +1 -0
- fal-0.15.2/fal.egg-info/entry_points.txt +2 -0
- fal-0.15.2/fal.egg-info/requires.txt +42 -0
- fal-0.15.2/fal.egg-info/top_level.txt +2 -0
- fal-0.15.2/openapi-fal-rest/README.md +89 -0
- fal-0.15.2/openapi-fal-rest/pyproject.toml +35 -0
- fal-0.15.2/openapi_rest.config.yaml +1 -0
- fal-0.15.2/pyproject.toml +81 -0
- fal-0.15.2/setup.cfg +4 -0
- fal-0.15.2/src/fal/__init__.py +25 -0
- fal-0.15.2/src/fal/_serialization.py +231 -0
- {fal-0.14.0 → fal-0.15.2}/src/fal/api.py +106 -61
- {fal-0.14.0 → fal-0.15.2}/src/fal/app.py +25 -9
- {fal-0.14.0 → fal-0.15.2}/src/fal/auth/__init__.py +2 -3
- {fal-0.14.0 → fal-0.15.2}/src/fal/auth/auth0.py +4 -2
- {fal-0.14.0 → fal-0.15.2}/src/fal/auth/local.py +2 -1
- {fal-0.14.0 → fal-0.15.2}/src/fal/cli.py +10 -7
- {fal-0.14.0 → fal-0.15.2}/src/fal/exceptions/__init__.py +3 -3
- fal-0.15.2/src/fal/exceptions/_base.py +6 -0
- {fal-0.14.0 → fal-0.15.2}/src/fal/exceptions/auth.py +2 -4
- {fal-0.14.0 → fal-0.15.2}/src/fal/exceptions/handlers.py +8 -19
- {fal-0.14.0 → fal-0.15.2}/src/fal/flags.py +0 -2
- {fal-0.14.0 → fal-0.15.2}/src/fal/logging/isolate.py +4 -4
- {fal-0.14.0 → fal-0.15.2}/src/fal/sdk.py +40 -5
- {fal-0.14.0 → fal-0.15.2}/src/fal/sync.py +7 -3
- {fal-0.14.0 → fal-0.15.2}/src/fal/toolkit/__init__.py +0 -2
- {fal-0.14.0 → fal-0.15.2}/src/fal/toolkit/exceptions.py +0 -5
- {fal-0.14.0 → fal-0.15.2}/src/fal/toolkit/file/file.py +61 -50
- {fal-0.14.0 → fal-0.15.2}/src/fal/toolkit/file/providers/fal.py +20 -7
- {fal-0.14.0 → fal-0.15.2}/src/fal/toolkit/file/providers/gcp.py +0 -2
- {fal-0.14.0 → fal-0.15.2}/src/fal/toolkit/file/providers/r2.py +0 -2
- {fal-0.14.0 → fal-0.15.2}/src/fal/toolkit/file/types.py +0 -4
- {fal-0.14.0 → fal-0.15.2}/src/fal/toolkit/image/image.py +11 -15
- {fal-0.14.0 → fal-0.15.2}/src/fal/toolkit/optimize.py +0 -3
- {fal-0.14.0 → fal-0.15.2}/src/fal/toolkit/utils/download_utils.py +7 -17
- {fal-0.14.0 → fal-0.15.2}/src/fal/workflows.py +9 -3
- fal-0.15.2/tests/__init__.py +0 -0
- fal-0.15.2/tests/conftest.py +11 -0
- fal-0.15.2/tests/integration_test.py +566 -0
- fal-0.15.2/tests/mainify_package/__init__.py +1 -0
- fal-0.15.2/tests/mainify_package/impl.py +8 -0
- fal-0.15.2/tests/mainify_package/utils.py +2 -0
- fal-0.15.2/tests/mainify_target.py +22 -0
- fal-0.15.2/tests/test_apps.py +560 -0
- fal-0.15.2/tests/test_stability.py +562 -0
- fal-0.15.2/tests/toolkit/file_test.py +66 -0
- fal-0.15.2/tests/toolkit/image_test.py +138 -0
- fal-0.15.2/tools/demo_script.py +16 -0
- fal-0.14.0/PKG-INFO +0 -89
- fal-0.14.0/pyproject.toml +0 -58
- fal-0.14.0/src/fal/__init__.py +0 -37
- fal-0.14.0/src/fal/_serialization.py +0 -201
- fal-0.14.0/src/fal/env.py +0 -3
- fal-0.14.0/src/fal/exceptions/_base.py +0 -17
- fal-0.14.0/src/fal/toolkit/mainify.py +0 -13
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/__init__.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/api/__init__.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/api/applications/__init__.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/api/applications/app_metadata.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/api/billing/__init__.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/api/billing/get_user_details.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/api/files/__init__.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/api/files/check_dir_hash.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/api/files/upload_local_file.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/api/workflows/__init__.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/api/workflows/create_or_update_workflow_workflows_post.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/api/workflows/delete_workflow_workflows_user_id_workflow_name_delete.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/api/workflows/execute_workflow_workflows_user_id_workflow_name_post.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/api/workflows/get_workflow_workflows_user_id_workflow_name_get.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/api/workflows/get_workflows_workflows_get.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/client.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/errors.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/models/__init__.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/models/app_metadata_response_app_metadata.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/models/body_upload_local_file.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/models/customer_details.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/models/execute_workflow_workflows_user_id_workflow_name_post_json_body_type_0.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/models/execute_workflow_workflows_user_id_workflow_name_post_response_200_type_0.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/models/hash_check.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/models/http_validation_error.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/models/lock_reason.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/models/page_workflow_item.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/models/typed_workflow.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/models/validation_error.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/models/workflow_contents.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/models/workflow_contents_nodes.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/models/workflow_contents_output.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/models/workflow_detail.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/models/workflow_detail_contents_type_0.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/models/workflow_item.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/models/workflow_node.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/models/workflow_node_type.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/models/workflow_schema.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/models/workflow_schema_input.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/models/workflow_schema_output.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/py.typed +0 -0
- {fal-0.14.0 → fal-0.15.2}/openapi-fal-rest/openapi_fal_rest/types.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/src/fal/__main__.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/src/fal/apps.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/src/fal/console/__init__.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/src/fal/console/icons.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/src/fal/console/ux.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/src/fal/logging/__init__.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/src/fal/logging/style.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/src/fal/logging/trace.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/src/fal/logging/user.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/src/fal/py.typed +0 -0
- {fal-0.14.0 → fal-0.15.2}/src/fal/rest_client.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/src/fal/toolkit/file/__init__.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/src/fal/toolkit/image/__init__.py +0 -0
- {fal-0.14.0 → fal-0.15.2}/src/fal/toolkit/utils/__init__.py +0 -0
fal-0.15.2/PKG-INFO
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: fal
|
|
3
|
+
Version: 0.15.2
|
|
4
|
+
Summary: fal is an easy-to-use Serverless Python Framework
|
|
5
|
+
Author: Features & Labels <hello@fal.ai>
|
|
6
|
+
Requires-Python: >=3.8
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
Requires-Dist: isolate[build]<1.0,>=0.12.3
|
|
9
|
+
Requires-Dist: isolate-proto==0.4.0
|
|
10
|
+
Requires-Dist: grpcio<2,>=1.50.0
|
|
11
|
+
Requires-Dist: dill==0.3.7
|
|
12
|
+
Requires-Dist: cloudpickle==3.0.0
|
|
13
|
+
Requires-Dist: typing-extensions<5,>=4.7.1
|
|
14
|
+
Requires-Dist: click<9,>=8.1.3
|
|
15
|
+
Requires-Dist: structlog<23,>=22.3.0
|
|
16
|
+
Requires-Dist: opentelemetry-api<2,>=1.15.0
|
|
17
|
+
Requires-Dist: opentelemetry-sdk<2,>=1.15.0
|
|
18
|
+
Requires-Dist: grpc-interceptor<1,>=0.15.0
|
|
19
|
+
Requires-Dist: colorama<1,>=0.4.6
|
|
20
|
+
Requires-Dist: portalocker<3,>=2.7.0
|
|
21
|
+
Requires-Dist: rich<14,>=13.3.2
|
|
22
|
+
Requires-Dist: rich_click
|
|
23
|
+
Requires-Dist: packaging<22,>=21.3
|
|
24
|
+
Requires-Dist: pathspec<1,>=0.11.1
|
|
25
|
+
Requires-Dist: pydantic!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,<3
|
|
26
|
+
Requires-Dist: fastapi<1,>=0.99.1
|
|
27
|
+
Requires-Dist: starlette-exporter>=0.21.0
|
|
28
|
+
Requires-Dist: httpx>=0.15.4
|
|
29
|
+
Requires-Dist: attrs>=21.3.0
|
|
30
|
+
Requires-Dist: python-dateutil<3,>=2.8.0
|
|
31
|
+
Requires-Dist: types-python-dateutil<3,>=2.8.0
|
|
32
|
+
Requires-Dist: importlib-metadata>=4.4; python_version < "3.10"
|
|
33
|
+
Requires-Dist: msgpack<2,>=1.0.7
|
|
34
|
+
Requires-Dist: websockets<13,>=12.0
|
|
35
|
+
Requires-Dist: pillow<11,>=10.2.0
|
|
36
|
+
Requires-Dist: pyjwt[crypto]<3,>=2.8.0
|
|
37
|
+
Requires-Dist: uvicorn<1,>=0.29.0
|
|
38
|
+
Provides-Extra: test
|
|
39
|
+
Requires-Dist: pytest<8; extra == "test"
|
|
40
|
+
Requires-Dist: pytest-asyncio; extra == "test"
|
|
41
|
+
Requires-Dist: pytest-xdist; extra == "test"
|
|
42
|
+
Requires-Dist: flaky; extra == "test"
|
|
43
|
+
Provides-Extra: dev
|
|
44
|
+
Requires-Dist: fal[test]; extra == "dev"
|
|
45
|
+
Requires-Dist: openapi-python-client<1,>=0.14.1; extra == "dev"
|
|
46
|
+
|
|
47
|
+
[](https://pypi.org/project/fal)
|
|
48
|
+
[](https://github.com/fal-ai/fal/actions)
|
|
49
|
+
|
|
50
|
+
# fal
|
|
51
|
+
|
|
52
|
+
fal is a serverless Python runtime that lets you run and scale code in the cloud with no infra management.
|
|
53
|
+
|
|
54
|
+
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.
|
|
55
|
+
|
|
56
|
+
## Quickstart
|
|
57
|
+
|
|
58
|
+
First, you need to install the `fal` package. You can do so using pip:
|
|
59
|
+
```shell
|
|
60
|
+
pip install fal
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Then you need to authenticate:
|
|
64
|
+
```shell
|
|
65
|
+
fal auth login
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
You can also use fal keys that you can get from [our dashboard](https://fal.ai/dashboard/keys).
|
|
69
|
+
|
|
70
|
+
Now can use the fal package in your Python scripts as follows:
|
|
71
|
+
|
|
72
|
+
```py
|
|
73
|
+
import fal
|
|
74
|
+
|
|
75
|
+
@fal.function(
|
|
76
|
+
"virtualenv",
|
|
77
|
+
requirements=["pyjokes"],
|
|
78
|
+
)
|
|
79
|
+
def tell_joke() -> str:
|
|
80
|
+
import pyjokes
|
|
81
|
+
|
|
82
|
+
joke = pyjokes.get_joke()
|
|
83
|
+
return joke
|
|
84
|
+
|
|
85
|
+
print("Joke from the clouds: ", tell_joke())
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
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.
|
|
89
|
+
|
|
90
|
+
## Next steps
|
|
91
|
+
|
|
92
|
+
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.
|
|
93
|
+
|
|
94
|
+
## Contributing
|
|
95
|
+
|
|
96
|
+
### Installing in editable mode with dev dependencies
|
|
97
|
+
|
|
98
|
+
```py
|
|
99
|
+
pip install -e 'projects/fal[dev]'
|
|
100
|
+
pip install -e 'projects/fal_client[dev]'
|
|
101
|
+
pip install -e 'projects/isolate_proto[dev]'
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Running tests
|
|
105
|
+
|
|
106
|
+
```py
|
|
107
|
+
pytest
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Pre-commit
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
cd projects/fal
|
|
114
|
+
pre-commit install
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Commit format
|
|
118
|
+
|
|
119
|
+
Please follow [conventional commits specification](https://www.conventionalcommits.org/) for descriptions/messages.
|
|
@@ -44,3 +44,30 @@ A new virtual environment will be created by fal in the cloud and the set of req
|
|
|
44
44
|
## Next steps
|
|
45
45
|
|
|
46
46
|
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.
|
|
47
|
+
|
|
48
|
+
## Contributing
|
|
49
|
+
|
|
50
|
+
### Installing in editable mode with dev dependencies
|
|
51
|
+
|
|
52
|
+
```py
|
|
53
|
+
pip install -e 'projects/fal[dev]'
|
|
54
|
+
pip install -e 'projects/fal_client[dev]'
|
|
55
|
+
pip install -e 'projects/isolate_proto[dev]'
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Running tests
|
|
59
|
+
|
|
60
|
+
```py
|
|
61
|
+
pytest
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Pre-commit
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
cd projects/fal
|
|
68
|
+
pre-commit install
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Commit format
|
|
72
|
+
|
|
73
|
+
Please follow [conventional commits specification](https://www.conventionalcommits.org/) for descriptions/messages.
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: fal
|
|
3
|
+
Version: 0.15.2
|
|
4
|
+
Summary: fal is an easy-to-use Serverless Python Framework
|
|
5
|
+
Author: Features & Labels <hello@fal.ai>
|
|
6
|
+
Requires-Python: >=3.8
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
Requires-Dist: isolate[build]<1.0,>=0.12.3
|
|
9
|
+
Requires-Dist: isolate-proto==0.4.0
|
|
10
|
+
Requires-Dist: grpcio<2,>=1.50.0
|
|
11
|
+
Requires-Dist: dill==0.3.7
|
|
12
|
+
Requires-Dist: cloudpickle==3.0.0
|
|
13
|
+
Requires-Dist: typing-extensions<5,>=4.7.1
|
|
14
|
+
Requires-Dist: click<9,>=8.1.3
|
|
15
|
+
Requires-Dist: structlog<23,>=22.3.0
|
|
16
|
+
Requires-Dist: opentelemetry-api<2,>=1.15.0
|
|
17
|
+
Requires-Dist: opentelemetry-sdk<2,>=1.15.0
|
|
18
|
+
Requires-Dist: grpc-interceptor<1,>=0.15.0
|
|
19
|
+
Requires-Dist: colorama<1,>=0.4.6
|
|
20
|
+
Requires-Dist: portalocker<3,>=2.7.0
|
|
21
|
+
Requires-Dist: rich<14,>=13.3.2
|
|
22
|
+
Requires-Dist: rich_click
|
|
23
|
+
Requires-Dist: packaging<22,>=21.3
|
|
24
|
+
Requires-Dist: pathspec<1,>=0.11.1
|
|
25
|
+
Requires-Dist: pydantic!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,<3
|
|
26
|
+
Requires-Dist: fastapi<1,>=0.99.1
|
|
27
|
+
Requires-Dist: starlette-exporter>=0.21.0
|
|
28
|
+
Requires-Dist: httpx>=0.15.4
|
|
29
|
+
Requires-Dist: attrs>=21.3.0
|
|
30
|
+
Requires-Dist: python-dateutil<3,>=2.8.0
|
|
31
|
+
Requires-Dist: types-python-dateutil<3,>=2.8.0
|
|
32
|
+
Requires-Dist: importlib-metadata>=4.4; python_version < "3.10"
|
|
33
|
+
Requires-Dist: msgpack<2,>=1.0.7
|
|
34
|
+
Requires-Dist: websockets<13,>=12.0
|
|
35
|
+
Requires-Dist: pillow<11,>=10.2.0
|
|
36
|
+
Requires-Dist: pyjwt[crypto]<3,>=2.8.0
|
|
37
|
+
Requires-Dist: uvicorn<1,>=0.29.0
|
|
38
|
+
Provides-Extra: test
|
|
39
|
+
Requires-Dist: pytest<8; extra == "test"
|
|
40
|
+
Requires-Dist: pytest-asyncio; extra == "test"
|
|
41
|
+
Requires-Dist: pytest-xdist; extra == "test"
|
|
42
|
+
Requires-Dist: flaky; extra == "test"
|
|
43
|
+
Provides-Extra: dev
|
|
44
|
+
Requires-Dist: fal[test]; extra == "dev"
|
|
45
|
+
Requires-Dist: openapi-python-client<1,>=0.14.1; extra == "dev"
|
|
46
|
+
|
|
47
|
+
[](https://pypi.org/project/fal)
|
|
48
|
+
[](https://github.com/fal-ai/fal/actions)
|
|
49
|
+
|
|
50
|
+
# fal
|
|
51
|
+
|
|
52
|
+
fal is a serverless Python runtime that lets you run and scale code in the cloud with no infra management.
|
|
53
|
+
|
|
54
|
+
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.
|
|
55
|
+
|
|
56
|
+
## Quickstart
|
|
57
|
+
|
|
58
|
+
First, you need to install the `fal` package. You can do so using pip:
|
|
59
|
+
```shell
|
|
60
|
+
pip install fal
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Then you need to authenticate:
|
|
64
|
+
```shell
|
|
65
|
+
fal auth login
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
You can also use fal keys that you can get from [our dashboard](https://fal.ai/dashboard/keys).
|
|
69
|
+
|
|
70
|
+
Now can use the fal package in your Python scripts as follows:
|
|
71
|
+
|
|
72
|
+
```py
|
|
73
|
+
import fal
|
|
74
|
+
|
|
75
|
+
@fal.function(
|
|
76
|
+
"virtualenv",
|
|
77
|
+
requirements=["pyjokes"],
|
|
78
|
+
)
|
|
79
|
+
def tell_joke() -> str:
|
|
80
|
+
import pyjokes
|
|
81
|
+
|
|
82
|
+
joke = pyjokes.get_joke()
|
|
83
|
+
return joke
|
|
84
|
+
|
|
85
|
+
print("Joke from the clouds: ", tell_joke())
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
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.
|
|
89
|
+
|
|
90
|
+
## Next steps
|
|
91
|
+
|
|
92
|
+
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.
|
|
93
|
+
|
|
94
|
+
## Contributing
|
|
95
|
+
|
|
96
|
+
### Installing in editable mode with dev dependencies
|
|
97
|
+
|
|
98
|
+
```py
|
|
99
|
+
pip install -e 'projects/fal[dev]'
|
|
100
|
+
pip install -e 'projects/fal_client[dev]'
|
|
101
|
+
pip install -e 'projects/isolate_proto[dev]'
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Running tests
|
|
105
|
+
|
|
106
|
+
```py
|
|
107
|
+
pytest
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Pre-commit
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
cd projects/fal
|
|
114
|
+
pre-commit install
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Commit format
|
|
118
|
+
|
|
119
|
+
Please follow [conventional commits specification](https://www.conventionalcommits.org/) for descriptions/messages.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
openapi_rest.config.yaml
|
|
3
|
+
pyproject.toml
|
|
4
|
+
fal.egg-info/PKG-INFO
|
|
5
|
+
fal.egg-info/SOURCES.txt
|
|
6
|
+
fal.egg-info/dependency_links.txt
|
|
7
|
+
fal.egg-info/entry_points.txt
|
|
8
|
+
fal.egg-info/requires.txt
|
|
9
|
+
fal.egg-info/top_level.txt
|
|
10
|
+
openapi-fal-rest/README.md
|
|
11
|
+
openapi-fal-rest/pyproject.toml
|
|
12
|
+
openapi-fal-rest/openapi_fal_rest/__init__.py
|
|
13
|
+
openapi-fal-rest/openapi_fal_rest/client.py
|
|
14
|
+
openapi-fal-rest/openapi_fal_rest/errors.py
|
|
15
|
+
openapi-fal-rest/openapi_fal_rest/py.typed
|
|
16
|
+
openapi-fal-rest/openapi_fal_rest/types.py
|
|
17
|
+
openapi-fal-rest/openapi_fal_rest/api/__init__.py
|
|
18
|
+
openapi-fal-rest/openapi_fal_rest/api/applications/__init__.py
|
|
19
|
+
openapi-fal-rest/openapi_fal_rest/api/applications/app_metadata.py
|
|
20
|
+
openapi-fal-rest/openapi_fal_rest/api/billing/__init__.py
|
|
21
|
+
openapi-fal-rest/openapi_fal_rest/api/billing/get_user_details.py
|
|
22
|
+
openapi-fal-rest/openapi_fal_rest/api/files/__init__.py
|
|
23
|
+
openapi-fal-rest/openapi_fal_rest/api/files/check_dir_hash.py
|
|
24
|
+
openapi-fal-rest/openapi_fal_rest/api/files/upload_local_file.py
|
|
25
|
+
openapi-fal-rest/openapi_fal_rest/api/workflows/__init__.py
|
|
26
|
+
openapi-fal-rest/openapi_fal_rest/api/workflows/create_or_update_workflow_workflows_post.py
|
|
27
|
+
openapi-fal-rest/openapi_fal_rest/api/workflows/delete_workflow_workflows_user_id_workflow_name_delete.py
|
|
28
|
+
openapi-fal-rest/openapi_fal_rest/api/workflows/execute_workflow_workflows_user_id_workflow_name_post.py
|
|
29
|
+
openapi-fal-rest/openapi_fal_rest/api/workflows/get_workflow_workflows_user_id_workflow_name_get.py
|
|
30
|
+
openapi-fal-rest/openapi_fal_rest/api/workflows/get_workflows_workflows_get.py
|
|
31
|
+
openapi-fal-rest/openapi_fal_rest/models/__init__.py
|
|
32
|
+
openapi-fal-rest/openapi_fal_rest/models/app_metadata_response_app_metadata.py
|
|
33
|
+
openapi-fal-rest/openapi_fal_rest/models/body_upload_local_file.py
|
|
34
|
+
openapi-fal-rest/openapi_fal_rest/models/customer_details.py
|
|
35
|
+
openapi-fal-rest/openapi_fal_rest/models/execute_workflow_workflows_user_id_workflow_name_post_json_body_type_0.py
|
|
36
|
+
openapi-fal-rest/openapi_fal_rest/models/execute_workflow_workflows_user_id_workflow_name_post_response_200_type_0.py
|
|
37
|
+
openapi-fal-rest/openapi_fal_rest/models/hash_check.py
|
|
38
|
+
openapi-fal-rest/openapi_fal_rest/models/http_validation_error.py
|
|
39
|
+
openapi-fal-rest/openapi_fal_rest/models/lock_reason.py
|
|
40
|
+
openapi-fal-rest/openapi_fal_rest/models/page_workflow_item.py
|
|
41
|
+
openapi-fal-rest/openapi_fal_rest/models/typed_workflow.py
|
|
42
|
+
openapi-fal-rest/openapi_fal_rest/models/validation_error.py
|
|
43
|
+
openapi-fal-rest/openapi_fal_rest/models/workflow_contents.py
|
|
44
|
+
openapi-fal-rest/openapi_fal_rest/models/workflow_contents_nodes.py
|
|
45
|
+
openapi-fal-rest/openapi_fal_rest/models/workflow_contents_output.py
|
|
46
|
+
openapi-fal-rest/openapi_fal_rest/models/workflow_detail.py
|
|
47
|
+
openapi-fal-rest/openapi_fal_rest/models/workflow_detail_contents_type_0.py
|
|
48
|
+
openapi-fal-rest/openapi_fal_rest/models/workflow_item.py
|
|
49
|
+
openapi-fal-rest/openapi_fal_rest/models/workflow_node.py
|
|
50
|
+
openapi-fal-rest/openapi_fal_rest/models/workflow_node_type.py
|
|
51
|
+
openapi-fal-rest/openapi_fal_rest/models/workflow_schema.py
|
|
52
|
+
openapi-fal-rest/openapi_fal_rest/models/workflow_schema_input.py
|
|
53
|
+
openapi-fal-rest/openapi_fal_rest/models/workflow_schema_output.py
|
|
54
|
+
src/fal/__init__.py
|
|
55
|
+
src/fal/__main__.py
|
|
56
|
+
src/fal/_serialization.py
|
|
57
|
+
src/fal/api.py
|
|
58
|
+
src/fal/app.py
|
|
59
|
+
src/fal/apps.py
|
|
60
|
+
src/fal/cli.py
|
|
61
|
+
src/fal/flags.py
|
|
62
|
+
src/fal/py.typed
|
|
63
|
+
src/fal/rest_client.py
|
|
64
|
+
src/fal/sdk.py
|
|
65
|
+
src/fal/sync.py
|
|
66
|
+
src/fal/workflows.py
|
|
67
|
+
src/fal/auth/__init__.py
|
|
68
|
+
src/fal/auth/auth0.py
|
|
69
|
+
src/fal/auth/local.py
|
|
70
|
+
src/fal/console/__init__.py
|
|
71
|
+
src/fal/console/icons.py
|
|
72
|
+
src/fal/console/ux.py
|
|
73
|
+
src/fal/exceptions/__init__.py
|
|
74
|
+
src/fal/exceptions/_base.py
|
|
75
|
+
src/fal/exceptions/auth.py
|
|
76
|
+
src/fal/exceptions/handlers.py
|
|
77
|
+
src/fal/logging/__init__.py
|
|
78
|
+
src/fal/logging/isolate.py
|
|
79
|
+
src/fal/logging/style.py
|
|
80
|
+
src/fal/logging/trace.py
|
|
81
|
+
src/fal/logging/user.py
|
|
82
|
+
src/fal/toolkit/__init__.py
|
|
83
|
+
src/fal/toolkit/exceptions.py
|
|
84
|
+
src/fal/toolkit/optimize.py
|
|
85
|
+
src/fal/toolkit/file/__init__.py
|
|
86
|
+
src/fal/toolkit/file/file.py
|
|
87
|
+
src/fal/toolkit/file/types.py
|
|
88
|
+
src/fal/toolkit/file/providers/fal.py
|
|
89
|
+
src/fal/toolkit/file/providers/gcp.py
|
|
90
|
+
src/fal/toolkit/file/providers/r2.py
|
|
91
|
+
src/fal/toolkit/image/__init__.py
|
|
92
|
+
src/fal/toolkit/image/image.py
|
|
93
|
+
src/fal/toolkit/utils/__init__.py
|
|
94
|
+
src/fal/toolkit/utils/download_utils.py
|
|
95
|
+
tests/__init__.py
|
|
96
|
+
tests/conftest.py
|
|
97
|
+
tests/integration_test.py
|
|
98
|
+
tests/mainify_target.py
|
|
99
|
+
tests/test_apps.py
|
|
100
|
+
tests/test_stability.py
|
|
101
|
+
tests/mainify_package/__init__.py
|
|
102
|
+
tests/mainify_package/impl.py
|
|
103
|
+
tests/mainify_package/utils.py
|
|
104
|
+
tests/toolkit/file_test.py
|
|
105
|
+
tests/toolkit/image_test.py
|
|
106
|
+
tools/demo_script.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
isolate[build]<1.0,>=0.12.3
|
|
2
|
+
isolate-proto==0.4.0
|
|
3
|
+
grpcio<2,>=1.50.0
|
|
4
|
+
dill==0.3.7
|
|
5
|
+
cloudpickle==3.0.0
|
|
6
|
+
typing-extensions<5,>=4.7.1
|
|
7
|
+
click<9,>=8.1.3
|
|
8
|
+
structlog<23,>=22.3.0
|
|
9
|
+
opentelemetry-api<2,>=1.15.0
|
|
10
|
+
opentelemetry-sdk<2,>=1.15.0
|
|
11
|
+
grpc-interceptor<1,>=0.15.0
|
|
12
|
+
colorama<1,>=0.4.6
|
|
13
|
+
portalocker<3,>=2.7.0
|
|
14
|
+
rich<14,>=13.3.2
|
|
15
|
+
rich_click
|
|
16
|
+
packaging<22,>=21.3
|
|
17
|
+
pathspec<1,>=0.11.1
|
|
18
|
+
pydantic!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,<3
|
|
19
|
+
fastapi<1,>=0.99.1
|
|
20
|
+
starlette-exporter>=0.21.0
|
|
21
|
+
httpx>=0.15.4
|
|
22
|
+
attrs>=21.3.0
|
|
23
|
+
python-dateutil<3,>=2.8.0
|
|
24
|
+
types-python-dateutil<3,>=2.8.0
|
|
25
|
+
msgpack<2,>=1.0.7
|
|
26
|
+
websockets<13,>=12.0
|
|
27
|
+
pillow<11,>=10.2.0
|
|
28
|
+
pyjwt[crypto]<3,>=2.8.0
|
|
29
|
+
uvicorn<1,>=0.29.0
|
|
30
|
+
|
|
31
|
+
[:python_version < "3.10"]
|
|
32
|
+
importlib-metadata>=4.4
|
|
33
|
+
|
|
34
|
+
[dev]
|
|
35
|
+
fal[test]
|
|
36
|
+
openapi-python-client<1,>=0.14.1
|
|
37
|
+
|
|
38
|
+
[test]
|
|
39
|
+
pytest<8
|
|
40
|
+
pytest-asyncio
|
|
41
|
+
pytest-xdist
|
|
42
|
+
flaky
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# openapi-fal-rest
|
|
2
|
+
A client library for accessing FastAPI
|
|
3
|
+
|
|
4
|
+
## Usage
|
|
5
|
+
First, create a client:
|
|
6
|
+
|
|
7
|
+
```python
|
|
8
|
+
from openapi_fal_rest import Client
|
|
9
|
+
|
|
10
|
+
client = Client(base_url="https://api.example.com")
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
If the endpoints you're going to hit require authentication, use `AuthenticatedClient` instead:
|
|
14
|
+
|
|
15
|
+
```python
|
|
16
|
+
from openapi_fal_rest import AuthenticatedClient
|
|
17
|
+
|
|
18
|
+
client = AuthenticatedClient(base_url="https://api.example.com", token="SuperSecretToken")
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Now call your endpoint and use your models:
|
|
22
|
+
|
|
23
|
+
```python
|
|
24
|
+
from openapi_fal_rest.models import MyDataModel
|
|
25
|
+
from openapi_fal_rest.api.my_tag import get_my_data_model
|
|
26
|
+
from openapi_fal_rest.types import Response
|
|
27
|
+
|
|
28
|
+
my_data: MyDataModel = get_my_data_model.sync(client=client)
|
|
29
|
+
# or if you need more info (e.g. status_code)
|
|
30
|
+
response: Response[MyDataModel] = get_my_data_model.sync_detailed(client=client)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Or do the same thing with an async version:
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
from openapi_fal_rest.models import MyDataModel
|
|
37
|
+
from openapi_fal_rest.api.my_tag import get_my_data_model
|
|
38
|
+
from openapi_fal_rest.types import Response
|
|
39
|
+
|
|
40
|
+
my_data: MyDataModel = await get_my_data_model.asyncio(client=client)
|
|
41
|
+
response: Response[MyDataModel] = await get_my_data_model.asyncio_detailed(client=client)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
By default, when you're calling an HTTPS API it will attempt to verify that SSL is working correctly. Using certificate verification is highly recommended most of the time, but sometimes you may need to authenticate to a server (especially an internal server) using a custom certificate bundle.
|
|
45
|
+
|
|
46
|
+
```python
|
|
47
|
+
client = AuthenticatedClient(
|
|
48
|
+
base_url="https://internal_api.example.com",
|
|
49
|
+
token="SuperSecretToken",
|
|
50
|
+
verify_ssl="/path/to/certificate_bundle.pem",
|
|
51
|
+
)
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
You can also disable certificate validation altogether, but beware that **this is a security risk**.
|
|
55
|
+
|
|
56
|
+
```python
|
|
57
|
+
client = AuthenticatedClient(
|
|
58
|
+
base_url="https://internal_api.example.com",
|
|
59
|
+
token="SuperSecretToken",
|
|
60
|
+
verify_ssl=False
|
|
61
|
+
)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
There are more settings on the generated `Client` class which let you control more runtime behavior, check out the docstring on that class for more info.
|
|
65
|
+
|
|
66
|
+
Things to know:
|
|
67
|
+
1. Every path/method combo becomes a Python module with four functions:
|
|
68
|
+
1. `sync`: Blocking request that returns parsed data (if successful) or `None`
|
|
69
|
+
1. `sync_detailed`: Blocking request that always returns a `Request`, optionally with `parsed` set if the request was successful.
|
|
70
|
+
1. `asyncio`: Like `sync` but async instead of blocking
|
|
71
|
+
1. `asyncio_detailed`: Like `sync_detailed` but async instead of blocking
|
|
72
|
+
|
|
73
|
+
1. All path/query params, and bodies become method arguments.
|
|
74
|
+
1. If your endpoint had any tags on it, the first tag will be used as a module name for the function (my_tag above)
|
|
75
|
+
1. Any endpoint which did not have a tag will be in `openapi_fal_rest.api.default`
|
|
76
|
+
|
|
77
|
+
## Building / publishing this Client
|
|
78
|
+
This project uses [Poetry](https://python-poetry.org/) to manage dependencies and packaging. Here are the basics:
|
|
79
|
+
1. Update the metadata in pyproject.toml (e.g. authors, version)
|
|
80
|
+
1. If you're using a private repository, configure it with Poetry
|
|
81
|
+
1. `poetry config repositories.<your-repository-name> <url-to-your-repository>`
|
|
82
|
+
1. `poetry config http-basic.<your-repository-name> <username> <password>`
|
|
83
|
+
1. Publish the client with `poetry publish --build -r <your-repository-name>` or, if for public PyPI, just `poetry publish --build`
|
|
84
|
+
|
|
85
|
+
If you want to install this client into another project without publishing it (e.g. for development) then:
|
|
86
|
+
1. If that project **is using Poetry**, you can simply do `poetry add <path-to-this-client>` from that project
|
|
87
|
+
1. If that project is not using Poetry:
|
|
88
|
+
1. Build a wheel with `poetry build -f wheel`
|
|
89
|
+
1. Install that wheel from the other project `pip install <path-to-wheel>`
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
[tool.poetry]
|
|
2
|
+
name = "openapi-fal-rest"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "A client library for accessing FastAPI"
|
|
5
|
+
|
|
6
|
+
authors = []
|
|
7
|
+
|
|
8
|
+
readme = "README.md"
|
|
9
|
+
packages = [
|
|
10
|
+
{include = "openapi_fal_rest"},
|
|
11
|
+
]
|
|
12
|
+
include = ["CHANGELOG.md", "openapi_fal_rest/py.typed"]
|
|
13
|
+
|
|
14
|
+
[tool.poetry.dependencies]
|
|
15
|
+
python = "^3.8"
|
|
16
|
+
httpx = ">=0.15.4,<0.25.0"
|
|
17
|
+
attrs = ">=21.3.0"
|
|
18
|
+
python-dateutil = "^2.8.0"
|
|
19
|
+
|
|
20
|
+
[build-system]
|
|
21
|
+
requires = ["poetry-core>=1.0.0"]
|
|
22
|
+
build-backend = "poetry.core.masonry.api"
|
|
23
|
+
|
|
24
|
+
[tool.black]
|
|
25
|
+
line-length = 120
|
|
26
|
+
target_version = ['py38', 'py39', 'py310', 'py311']
|
|
27
|
+
exclude = '''
|
|
28
|
+
(
|
|
29
|
+
/(
|
|
30
|
+
| \.git
|
|
31
|
+
| \.venv
|
|
32
|
+
| \.mypy_cache
|
|
33
|
+
)/
|
|
34
|
+
)
|
|
35
|
+
'''
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
project_name_override: openapi-fal-rest
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools", "wheel", "setuptools_scm[toml]>=7"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[tool.setuptools_scm]
|
|
6
|
+
root = "../../"
|
|
7
|
+
git_describe_command= 'git describe --tags --abbrev=0 --dirty --match "fal_v*"'
|
|
8
|
+
tag_regex = "^fal_v(?P<version>.*)$"
|
|
9
|
+
fallback_version = "0.0.0"
|
|
10
|
+
|
|
11
|
+
[tool.setuptools.packages.find]
|
|
12
|
+
where = ["src", "openapi-fal-rest"]
|
|
13
|
+
include = ["fal", "openapi_fal_rest"]
|
|
14
|
+
namespaces = false
|
|
15
|
+
|
|
16
|
+
[project]
|
|
17
|
+
name = "fal"
|
|
18
|
+
dynamic = ["version"]
|
|
19
|
+
description = "fal is an easy-to-use Serverless Python Framework"
|
|
20
|
+
authors = [{ name = "Features & Labels <hello@fal.ai>"}]
|
|
21
|
+
readme = "README.md"
|
|
22
|
+
requires-python = ">=3.8"
|
|
23
|
+
dependencies = [
|
|
24
|
+
"isolate[build]>=0.12.3,<1.0",
|
|
25
|
+
"isolate-proto==0.4.0",
|
|
26
|
+
"grpcio>=1.50.0,<2",
|
|
27
|
+
"dill==0.3.7",
|
|
28
|
+
"cloudpickle==3.0.0",
|
|
29
|
+
"typing-extensions>=4.7.1,<5",
|
|
30
|
+
"click>=8.1.3,<9",
|
|
31
|
+
"structlog>=22.3.0,<23",
|
|
32
|
+
"opentelemetry-api>=1.15.0,<2",
|
|
33
|
+
"opentelemetry-sdk>=1.15.0,<2",
|
|
34
|
+
"grpc-interceptor>=0.15.0,<1",
|
|
35
|
+
"colorama>=0.4.6,<1",
|
|
36
|
+
"portalocker>=2.7.0,<3",
|
|
37
|
+
"rich>=13.3.2,<14",
|
|
38
|
+
"rich_click",
|
|
39
|
+
"packaging>=21.3,<22",
|
|
40
|
+
"pathspec>=0.11.1,<1",
|
|
41
|
+
"pydantic!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,<3",
|
|
42
|
+
# serve=True dependencies
|
|
43
|
+
"fastapi>=0.99.1,<1",
|
|
44
|
+
"starlette-exporter>=0.21.0",
|
|
45
|
+
# rest-api-client dependencies
|
|
46
|
+
"httpx>=0.15.4",
|
|
47
|
+
"attrs>=21.3.0",
|
|
48
|
+
"python-dateutil>=2.8.0,<3",
|
|
49
|
+
"types-python-dateutil>=2.8.0,<3",
|
|
50
|
+
# For 3.9 and earlier, importlib-metadata's newer versions are included in the standard library.
|
|
51
|
+
'importlib-metadata>=4.4; python_version < "3.10"',
|
|
52
|
+
"msgpack>=1.0.7,<2",
|
|
53
|
+
"websockets>=12.0,<13",
|
|
54
|
+
"pillow>=10.2.0,<11",
|
|
55
|
+
"pyjwt[crypto]>=2.8.0,<3",
|
|
56
|
+
"uvicorn>=0.29.0,<1",
|
|
57
|
+
]
|
|
58
|
+
|
|
59
|
+
[project.optional-dependencies]
|
|
60
|
+
test = [
|
|
61
|
+
"pytest<8",
|
|
62
|
+
"pytest-asyncio",
|
|
63
|
+
"pytest-xdist",
|
|
64
|
+
"flaky",
|
|
65
|
+
]
|
|
66
|
+
dev = [
|
|
67
|
+
"fal[test]",
|
|
68
|
+
"openapi-python-client>=0.14.1,<1",
|
|
69
|
+
]
|
|
70
|
+
|
|
71
|
+
[project.scripts]
|
|
72
|
+
fal = "fal.cli:cli"
|
|
73
|
+
|
|
74
|
+
[tool.ruff]
|
|
75
|
+
target-version = "py38"
|
|
76
|
+
|
|
77
|
+
[tool.ruff.lint]
|
|
78
|
+
select = ["E", "F", "W", "PLC", "PLE", "PLW", "I", "UP"]
|
|
79
|
+
|
|
80
|
+
[tool.ruff.lint.pyupgrade]
|
|
81
|
+
keep-runtime-typing = true
|
fal-0.15.2/setup.cfg
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from fal import apps # noqa: F401
|
|
4
|
+
from fal.api import FalServerlessHost, LocalHost, cached, function
|
|
5
|
+
from fal.api import function as isolated # noqa: F401
|
|
6
|
+
from fal.app import App, endpoint, realtime, wrap_app # noqa: F401
|
|
7
|
+
from fal.sdk import FalServerlessKeyCredentials
|
|
8
|
+
from fal.sync import sync_dir
|
|
9
|
+
|
|
10
|
+
local = LocalHost()
|
|
11
|
+
serverless = FalServerlessHost()
|
|
12
|
+
|
|
13
|
+
# DEPRECATED - use serverless instead
|
|
14
|
+
cloud = FalServerlessHost()
|
|
15
|
+
|
|
16
|
+
__all__ = [
|
|
17
|
+
"function",
|
|
18
|
+
"cached",
|
|
19
|
+
"App",
|
|
20
|
+
"endpoint",
|
|
21
|
+
"realtime",
|
|
22
|
+
# "wrap_app",
|
|
23
|
+
"FalServerlessKeyCredentials",
|
|
24
|
+
"sync_dir",
|
|
25
|
+
]
|