fal 0.14.0__tar.gz → 0.15.0__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.

Files changed (113) hide show
  1. {fal-0.14.0 → fal-0.15.0}/PKG-INFO +40 -38
  2. fal-0.15.0/fal.egg-info/PKG-INFO +91 -0
  3. fal-0.15.0/fal.egg-info/SOURCES.txt +106 -0
  4. fal-0.15.0/fal.egg-info/dependency_links.txt +1 -0
  5. fal-0.15.0/fal.egg-info/entry_points.txt +2 -0
  6. fal-0.15.0/fal.egg-info/requires.txt +41 -0
  7. fal-0.15.0/fal.egg-info/top_level.txt +2 -0
  8. fal-0.15.0/openapi-fal-rest/README.md +89 -0
  9. fal-0.15.0/openapi-fal-rest/pyproject.toml +35 -0
  10. fal-0.15.0/openapi_rest.config.yaml +1 -0
  11. fal-0.15.0/pyproject.toml +71 -0
  12. fal-0.15.0/setup.cfg +4 -0
  13. fal-0.15.0/src/fal/_serialization.py +225 -0
  14. {fal-0.14.0 → fal-0.15.0}/src/fal/api.py +88 -52
  15. {fal-0.14.0 → fal-0.15.0}/src/fal/app.py +2 -7
  16. {fal-0.14.0 → fal-0.15.0}/src/fal/auth/__init__.py +0 -2
  17. {fal-0.14.0 → fal-0.15.0}/src/fal/cli.py +2 -2
  18. {fal-0.14.0 → fal-0.15.0}/src/fal/exceptions/__init__.py +1 -2
  19. fal-0.15.0/src/fal/exceptions/_base.py +6 -0
  20. {fal-0.14.0 → fal-0.15.0}/src/fal/exceptions/auth.py +2 -4
  21. {fal-0.14.0 → fal-0.15.0}/src/fal/exceptions/handlers.py +8 -19
  22. {fal-0.14.0 → fal-0.15.0}/src/fal/sdk.py +2 -3
  23. {fal-0.14.0 → fal-0.15.0}/src/fal/toolkit/__init__.py +0 -2
  24. {fal-0.14.0 → fal-0.15.0}/src/fal/toolkit/exceptions.py +0 -5
  25. {fal-0.14.0 → fal-0.15.0}/src/fal/toolkit/file/file.py +57 -54
  26. {fal-0.14.0 → fal-0.15.0}/src/fal/toolkit/file/providers/fal.py +0 -4
  27. {fal-0.14.0 → fal-0.15.0}/src/fal/toolkit/file/providers/gcp.py +0 -2
  28. {fal-0.14.0 → fal-0.15.0}/src/fal/toolkit/file/providers/r2.py +0 -2
  29. {fal-0.14.0 → fal-0.15.0}/src/fal/toolkit/file/types.py +0 -4
  30. {fal-0.14.0 → fal-0.15.0}/src/fal/toolkit/image/image.py +10 -14
  31. {fal-0.14.0 → fal-0.15.0}/src/fal/toolkit/optimize.py +0 -2
  32. {fal-0.14.0 → fal-0.15.0}/src/fal/toolkit/utils/download_utils.py +1 -14
  33. {fal-0.14.0 → fal-0.15.0}/src/fal/workflows.py +2 -1
  34. fal-0.15.0/tests/__init__.py +0 -0
  35. fal-0.15.0/tests/conftest.py +12 -0
  36. fal-0.15.0/tests/integration_test.py +547 -0
  37. fal-0.15.0/tests/mainify_package/__init__.py +1 -0
  38. fal-0.15.0/tests/mainify_package/impl.py +8 -0
  39. fal-0.15.0/tests/mainify_package/utils.py +2 -0
  40. fal-0.15.0/tests/mainify_target.py +22 -0
  41. fal-0.15.0/tests/test_apps.py +560 -0
  42. fal-0.15.0/tests/test_stability.py +538 -0
  43. fal-0.15.0/tests/toolkit/file_test.py +65 -0
  44. fal-0.15.0/tests/toolkit/image_test.py +129 -0
  45. fal-0.15.0/tools/demo_script.py +16 -0
  46. fal-0.14.0/pyproject.toml +0 -58
  47. fal-0.14.0/src/fal/_serialization.py +0 -201
  48. fal-0.14.0/src/fal/env.py +0 -3
  49. fal-0.14.0/src/fal/exceptions/_base.py +0 -17
  50. fal-0.14.0/src/fal/toolkit/mainify.py +0 -13
  51. {fal-0.14.0 → fal-0.15.0}/README.md +0 -0
  52. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/__init__.py +0 -0
  53. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/api/__init__.py +0 -0
  54. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/api/applications/__init__.py +0 -0
  55. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/api/applications/app_metadata.py +0 -0
  56. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/api/billing/__init__.py +0 -0
  57. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/api/billing/get_user_details.py +0 -0
  58. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/api/files/__init__.py +0 -0
  59. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/api/files/check_dir_hash.py +0 -0
  60. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/api/files/upload_local_file.py +0 -0
  61. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/api/workflows/__init__.py +0 -0
  62. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/api/workflows/create_or_update_workflow_workflows_post.py +0 -0
  63. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/api/workflows/delete_workflow_workflows_user_id_workflow_name_delete.py +0 -0
  64. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/api/workflows/execute_workflow_workflows_user_id_workflow_name_post.py +0 -0
  65. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/api/workflows/get_workflow_workflows_user_id_workflow_name_get.py +0 -0
  66. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/api/workflows/get_workflows_workflows_get.py +0 -0
  67. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/client.py +0 -0
  68. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/errors.py +0 -0
  69. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/models/__init__.py +0 -0
  70. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/models/app_metadata_response_app_metadata.py +0 -0
  71. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/models/body_upload_local_file.py +0 -0
  72. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/models/customer_details.py +0 -0
  73. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/models/execute_workflow_workflows_user_id_workflow_name_post_json_body_type_0.py +0 -0
  74. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/models/execute_workflow_workflows_user_id_workflow_name_post_response_200_type_0.py +0 -0
  75. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/models/hash_check.py +0 -0
  76. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/models/http_validation_error.py +0 -0
  77. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/models/lock_reason.py +0 -0
  78. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/models/page_workflow_item.py +0 -0
  79. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/models/typed_workflow.py +0 -0
  80. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/models/validation_error.py +0 -0
  81. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/models/workflow_contents.py +0 -0
  82. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/models/workflow_contents_nodes.py +0 -0
  83. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/models/workflow_contents_output.py +0 -0
  84. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/models/workflow_detail.py +0 -0
  85. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/models/workflow_detail_contents_type_0.py +0 -0
  86. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/models/workflow_item.py +0 -0
  87. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/models/workflow_node.py +0 -0
  88. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/models/workflow_node_type.py +0 -0
  89. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/models/workflow_schema.py +0 -0
  90. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/models/workflow_schema_input.py +0 -0
  91. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/models/workflow_schema_output.py +0 -0
  92. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/py.typed +0 -0
  93. {fal-0.14.0 → fal-0.15.0}/openapi-fal-rest/openapi_fal_rest/types.py +0 -0
  94. {fal-0.14.0 → fal-0.15.0}/src/fal/__init__.py +0 -0
  95. {fal-0.14.0 → fal-0.15.0}/src/fal/__main__.py +0 -0
  96. {fal-0.14.0 → fal-0.15.0}/src/fal/apps.py +0 -0
  97. {fal-0.14.0 → fal-0.15.0}/src/fal/auth/auth0.py +0 -0
  98. {fal-0.14.0 → fal-0.15.0}/src/fal/auth/local.py +0 -0
  99. {fal-0.14.0 → fal-0.15.0}/src/fal/console/__init__.py +0 -0
  100. {fal-0.14.0 → fal-0.15.0}/src/fal/console/icons.py +0 -0
  101. {fal-0.14.0 → fal-0.15.0}/src/fal/console/ux.py +0 -0
  102. {fal-0.14.0 → fal-0.15.0}/src/fal/flags.py +0 -0
  103. {fal-0.14.0 → fal-0.15.0}/src/fal/logging/__init__.py +0 -0
  104. {fal-0.14.0 → fal-0.15.0}/src/fal/logging/isolate.py +0 -0
  105. {fal-0.14.0 → fal-0.15.0}/src/fal/logging/style.py +0 -0
  106. {fal-0.14.0 → fal-0.15.0}/src/fal/logging/trace.py +0 -0
  107. {fal-0.14.0 → fal-0.15.0}/src/fal/logging/user.py +0 -0
  108. {fal-0.14.0 → fal-0.15.0}/src/fal/py.typed +0 -0
  109. {fal-0.14.0 → fal-0.15.0}/src/fal/rest_client.py +0 -0
  110. {fal-0.14.0 → fal-0.15.0}/src/fal/sync.py +0 -0
  111. {fal-0.14.0 → fal-0.15.0}/src/fal/toolkit/file/__init__.py +0 -0
  112. {fal-0.14.0 → fal-0.15.0}/src/fal/toolkit/image/__init__.py +0 -0
  113. {fal-0.14.0 → fal-0.15.0}/src/fal/toolkit/utils/__init__.py +0 -0
@@ -1,44 +1,47 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fal
3
- Version: 0.14.0
3
+ Version: 0.15.0
4
4
  Summary: fal is an easy-to-use Serverless Python Framework
5
- Author: Features & Labels
6
- Author-email: hello@fal.ai
7
- Requires-Python: >=3.8,<4.0
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: Programming Language :: Python :: 3.8
10
- Classifier: Programming Language :: Python :: 3.9
11
- Classifier: Programming Language :: Python :: 3.10
12
- Classifier: Programming Language :: Python :: 3.11
13
- Classifier: Programming Language :: Python :: 3.12
14
- Requires-Dist: attrs (>=21.3.0)
15
- Requires-Dist: click (>=8.1.3,<9.0.0)
16
- Requires-Dist: colorama (>=0.4.6,<0.5.0)
17
- Requires-Dist: dill (==0.3.7)
18
- Requires-Dist: fastapi (==0.99.1)
19
- Requires-Dist: grpc-interceptor (>=0.15.0,<0.16.0)
20
- Requires-Dist: grpcio (>=1.50.0,<2.0.0)
21
- Requires-Dist: httpx (>=0.15.4)
22
- Requires-Dist: importlib-metadata (>=4.4) ; python_version < "3.10"
23
- Requires-Dist: isolate-proto (>=0.3.4,<0.4.0)
24
- Requires-Dist: isolate[build] (>=0.12.3,<1.0)
25
- Requires-Dist: msgpack (>=1.0.7,<2.0.0)
26
- Requires-Dist: opentelemetry-api (>=1.15.0,<2.0.0)
27
- Requires-Dist: opentelemetry-sdk (>=1.15.0,<2.0.0)
28
- Requires-Dist: packaging (>=21.3)
29
- Requires-Dist: pathspec (>=0.11.1,<0.12.0)
30
- Requires-Dist: pillow (>=10.2.0,<11.0.0)
31
- Requires-Dist: portalocker (>=2.7.0,<3.0.0)
32
- Requires-Dist: pydantic (<2.0)
33
- Requires-Dist: pyjwt[crypto] (>=2.8.0,<3.0.0)
34
- Requires-Dist: python-dateutil (>=2.8.0,<3.0.0)
35
- Requires-Dist: rich (>=13.3.2,<14.0.0)
36
- Requires-Dist: rich_click
37
- Requires-Dist: structlog (>=22.3.0,<23.0.0)
38
- Requires-Dist: types-python-dateutil (>=2.8.0,<3.0.0)
39
- Requires-Dist: typing-extensions (>=4.7.1,<5.0.0)
40
- Requires-Dist: websockets (>=12.0,<13.0)
5
+ Author: Features & Labels <hello@fal.ai>
6
+ Requires-Python: >=3.8
41
7
  Description-Content-Type: text/markdown
8
+ Requires-Dist: isolate[build]<1.0,>=0.12.3
9
+ Requires-Dist: isolate-proto==0.3.4
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; extra == "test"
40
+ Requires-Dist: pytest-xdist; extra == "test"
41
+ Requires-Dist: pytest-asyncio; extra == "test"
42
+ Provides-Extra: dev
43
+ Requires-Dist: fal[test]; extra == "dev"
44
+ Requires-Dist: openapi-python-client<1,>=0.14.1; extra == "dev"
42
45
 
43
46
  [![PyPI](https://img.shields.io/pypi/v/fal.svg?logo=PyPI)](https://pypi.org/project/fal)
44
47
  [![Tests](https://img.shields.io/github/actions/workflow/status/fal-ai/fal/integration_tests.yaml?label=Tests)](https://github.com/fal-ai/fal/actions)
@@ -86,4 +89,3 @@ A new virtual environment will be created by fal in the cloud and the set of req
86
89
  ## Next steps
87
90
 
88
91
  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.
89
-
@@ -0,0 +1,91 @@
1
+ Metadata-Version: 2.1
2
+ Name: fal
3
+ Version: 0.15.0
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.3.4
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; extra == "test"
40
+ Requires-Dist: pytest-xdist; extra == "test"
41
+ Requires-Dist: pytest-asyncio; extra == "test"
42
+ Provides-Extra: dev
43
+ Requires-Dist: fal[test]; extra == "dev"
44
+ Requires-Dist: openapi-python-client<1,>=0.14.1; extra == "dev"
45
+
46
+ [![PyPI](https://img.shields.io/pypi/v/fal.svg?logo=PyPI)](https://pypi.org/project/fal)
47
+ [![Tests](https://img.shields.io/github/actions/workflow/status/fal-ai/fal/integration_tests.yaml?label=Tests)](https://github.com/fal-ai/fal/actions)
48
+
49
+ # fal
50
+
51
+ fal is a serverless Python runtime that lets you run and scale code in the cloud with no infra management.
52
+
53
+ 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.
54
+
55
+ ## Quickstart
56
+
57
+ First, you need to install the `fal` package. You can do so using pip:
58
+ ```shell
59
+ pip install fal
60
+ ```
61
+
62
+ Then you need to authenticate:
63
+ ```shell
64
+ fal auth login
65
+ ```
66
+
67
+ You can also use fal keys that you can get from [our dashboard](https://fal.ai/dashboard/keys).
68
+
69
+ Now can use the fal package in your Python scripts as follows:
70
+
71
+ ```py
72
+ import fal
73
+
74
+ @fal.function(
75
+ "virtualenv",
76
+ requirements=["pyjokes"],
77
+ )
78
+ def tell_joke() -> str:
79
+ import pyjokes
80
+
81
+ joke = pyjokes.get_joke()
82
+ return joke
83
+
84
+ print("Joke from the clouds: ", tell_joke())
85
+ ```
86
+
87
+ 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.
88
+
89
+ ## Next steps
90
+
91
+ 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.
@@ -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,2 @@
1
+ [console_scripts]
2
+ fal = fal.cli:cli
@@ -0,0 +1,41 @@
1
+ isolate[build]<1.0,>=0.12.3
2
+ isolate-proto==0.3.4
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
40
+ pytest-xdist
41
+ pytest-asyncio
@@ -0,0 +1,2 @@
1
+ fal
2
+ openapi_fal_rest
@@ -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,71 @@
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.3.4",
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",
62
+ "pytest-xdist",
63
+ "pytest-asyncio",
64
+ ]
65
+ dev = [
66
+ "fal[test]",
67
+ "openapi-python-client>=0.14.1,<1",
68
+ ]
69
+
70
+ [project.scripts]
71
+ fal = "fal.cli:cli"
fal-0.15.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+