anyformat 0.2.0__tar.gz → 0.4.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.
Files changed (95) hide show
  1. anyformat-0.4.0/.release-please-manifest.json +3 -0
  2. {anyformat-0.2.0 → anyformat-0.4.0}/CHANGELOG.md +16 -0
  3. {anyformat-0.2.0 → anyformat-0.4.0}/PKG-INFO +18 -6
  4. {anyformat-0.2.0 → anyformat-0.4.0}/README.md +16 -4
  5. {anyformat-0.2.0 → anyformat-0.4.0}/SECURITY.md +4 -0
  6. {anyformat-0.2.0 → anyformat-0.4.0}/api.md +5 -10
  7. {anyformat-0.2.0 → anyformat-0.4.0}/pyproject.toml +2 -2
  8. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/_client.py +0 -6
  9. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/_version.py +1 -1
  10. anyformat-0.4.0/src/anyformat/resources/files.py +169 -0
  11. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/resources/workflows.py +237 -74
  12. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/types/__init__.py +4 -5
  13. anyformat-0.2.0/src/anyformat/types/file_create_params.py → anyformat-0.4.0/src/anyformat/types/workflow_create_file_params.py +2 -4
  14. anyformat-0.2.0/src/anyformat/types/file_create_response.py → anyformat-0.4.0/src/anyformat/types/workflow_create_file_response.py +2 -2
  15. anyformat-0.2.0/src/anyformat/types/file_list_params.py → anyformat-0.4.0/src/anyformat/types/workflow_list_files_params.py +2 -5
  16. anyformat-0.2.0/src/anyformat/types/file_list_response.py → anyformat-0.4.0/src/anyformat/types/workflow_list_files_response.py +2 -2
  17. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/types/workflow_run_params.py +0 -6
  18. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/types/workflow_upload_params.py +0 -6
  19. anyformat-0.4.0/tests/api_resources/test_files.py +106 -0
  20. {anyformat-0.2.0 → anyformat-0.4.0}/tests/api_resources/test_workflows.py +258 -72
  21. anyformat-0.2.0/.release-please-manifest.json +0 -3
  22. anyformat-0.2.0/src/anyformat/resources/files.py +0 -454
  23. anyformat-0.2.0/src/anyformat/types/workflow_results_params.py +0 -14
  24. anyformat-0.2.0/tests/api_resources/test_files.py +0 -342
  25. {anyformat-0.2.0 → anyformat-0.4.0}/.gitignore +0 -0
  26. {anyformat-0.2.0 → anyformat-0.4.0}/CONTRIBUTING.md +0 -0
  27. {anyformat-0.2.0 → anyformat-0.4.0}/LICENSE +0 -0
  28. {anyformat-0.2.0 → anyformat-0.4.0}/bin/check-release-environment +0 -0
  29. {anyformat-0.2.0 → anyformat-0.4.0}/bin/publish-pypi +0 -0
  30. {anyformat-0.2.0 → anyformat-0.4.0}/examples/.keep +0 -0
  31. {anyformat-0.2.0 → anyformat-0.4.0}/release-please-config.json +0 -0
  32. {anyformat-0.2.0 → anyformat-0.4.0}/requirements-dev.lock +0 -0
  33. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/__init__.py +0 -0
  34. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/_base_client.py +0 -0
  35. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/_compat.py +0 -0
  36. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/_constants.py +0 -0
  37. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/_exceptions.py +0 -0
  38. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/_files.py +0 -0
  39. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/_models.py +0 -0
  40. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/_qs.py +0 -0
  41. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/_resource.py +0 -0
  42. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/_response.py +0 -0
  43. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/_streaming.py +0 -0
  44. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/_types.py +0 -0
  45. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/_utils/__init__.py +0 -0
  46. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/_utils/_compat.py +0 -0
  47. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/_utils/_datetime_parse.py +0 -0
  48. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/_utils/_json.py +0 -0
  49. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/_utils/_logs.py +0 -0
  50. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/_utils/_path.py +0 -0
  51. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/_utils/_proxy.py +0 -0
  52. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/_utils/_reflection.py +0 -0
  53. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/_utils/_resources_proxy.py +0 -0
  54. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/_utils/_streams.py +0 -0
  55. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/_utils/_sync.py +0 -0
  56. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/_utils/_transform.py +0 -0
  57. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/_utils/_typing.py +0 -0
  58. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/_utils/_utils.py +0 -0
  59. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/lib/.keep +0 -0
  60. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/py.typed +0 -0
  61. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/resources/__init__.py +0 -0
  62. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/resources/health.py +0 -0
  63. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/resources/webhooks.py +0 -0
  64. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/types/webhook_create_params.py +0 -0
  65. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/types/webhook_create_response.py +0 -0
  66. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/types/webhook_list_response.py +0 -0
  67. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/types/workflow.py +0 -0
  68. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/types/workflow_list_params.py +0 -0
  69. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/types/workflow_list_response.py +0 -0
  70. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/types/workflow_list_runs_params.py +0 -0
  71. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/types/workflow_list_runs_response.py +0 -0
  72. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/types/workflow_run_response.py +0 -0
  73. {anyformat-0.2.0 → anyformat-0.4.0}/src/anyformat/types/workflow_upload_response.py +0 -0
  74. {anyformat-0.2.0 → anyformat-0.4.0}/tests/__init__.py +0 -0
  75. {anyformat-0.2.0 → anyformat-0.4.0}/tests/api_resources/__init__.py +0 -0
  76. {anyformat-0.2.0 → anyformat-0.4.0}/tests/api_resources/test_health.py +0 -0
  77. {anyformat-0.2.0 → anyformat-0.4.0}/tests/api_resources/test_webhooks.py +0 -0
  78. {anyformat-0.2.0 → anyformat-0.4.0}/tests/conftest.py +0 -0
  79. {anyformat-0.2.0 → anyformat-0.4.0}/tests/sample_file.txt +0 -0
  80. {anyformat-0.2.0 → anyformat-0.4.0}/tests/test_client.py +0 -0
  81. {anyformat-0.2.0 → anyformat-0.4.0}/tests/test_extract_files.py +0 -0
  82. {anyformat-0.2.0 → anyformat-0.4.0}/tests/test_files.py +0 -0
  83. {anyformat-0.2.0 → anyformat-0.4.0}/tests/test_models.py +0 -0
  84. {anyformat-0.2.0 → anyformat-0.4.0}/tests/test_qs.py +0 -0
  85. {anyformat-0.2.0 → anyformat-0.4.0}/tests/test_required_args.py +0 -0
  86. {anyformat-0.2.0 → anyformat-0.4.0}/tests/test_response.py +0 -0
  87. {anyformat-0.2.0 → anyformat-0.4.0}/tests/test_streaming.py +0 -0
  88. {anyformat-0.2.0 → anyformat-0.4.0}/tests/test_transform.py +0 -0
  89. {anyformat-0.2.0 → anyformat-0.4.0}/tests/test_utils/test_datetime_parse.py +0 -0
  90. {anyformat-0.2.0 → anyformat-0.4.0}/tests/test_utils/test_json.py +0 -0
  91. {anyformat-0.2.0 → anyformat-0.4.0}/tests/test_utils/test_path.py +0 -0
  92. {anyformat-0.2.0 → anyformat-0.4.0}/tests/test_utils/test_proxy.py +0 -0
  93. {anyformat-0.2.0 → anyformat-0.4.0}/tests/test_utils/test_typing.py +0 -0
  94. {anyformat-0.2.0 → anyformat-0.4.0}/tests/utils.py +0 -0
  95. {anyformat-0.2.0 → anyformat-0.4.0}/uv.lock +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.4.0"
3
+ }
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.0 (2026-04-21)
4
+
5
+ Full Changelog: [v0.3.0...v0.4.0](https://github.com/anyformat-ai/anyformat-python/compare/v0.3.0...v0.4.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** manual updates ([a28bbe1](https://github.com/anyformat-ai/anyformat-python/commit/a28bbe1423b06e5cf9c7f5a79eafc9be72a91bd9))
10
+
11
+ ## 0.3.0 (2026-04-20)
12
+
13
+ Full Changelog: [v0.2.0...v0.3.0](https://github.com/anyformat-ai/anyformat-python/compare/v0.2.0...v0.3.0)
14
+
15
+ ### Features
16
+
17
+ * **api:** api update ([7a801c6](https://github.com/anyformat-ai/anyformat-python/commit/7a801c6fe3aaa1c5f74c1508634bfbc06bd29910))
18
+
3
19
  ## 0.2.0 (2026-04-18)
4
20
 
5
21
  Full Changelog: [v0.1.2...v0.2.0](https://github.com/anyformat-ai/anyformat-python/compare/v0.1.2...v0.2.0)
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: anyformat
3
- Version: 0.2.0
3
+ Version: 0.4.0
4
4
  Summary: The official Python library for the anyformat API
5
5
  Project-URL: Homepage, https://github.com/anyformat-ai/anyformat-python
6
6
  Project-URL: Repository, https://github.com/anyformat-ai/anyformat-python
7
- Author: Anyformat
7
+ Author-email: Anyformat <support@anyformat.ai>
8
8
  License: Apache-2.0
9
9
  Classifier: Intended Audience :: Developers
10
10
  Classifier: License :: OSI Approved :: Apache Software License
@@ -55,7 +55,7 @@ Use the Anyformat MCP Server to enable AI assistants to interact with this API,
55
55
 
56
56
  ## Documentation
57
57
 
58
- The full API of this library can be found in [api.md](https://github.com/anyformat-ai/anyformat-python/tree/main/api.md).
58
+ The REST API documentation can be found on [docs.anyformat.ai](https://docs.anyformat.ai). The full API of this library can be found in [api.md](https://github.com/anyformat-ai/anyformat-python/tree/main/api.md).
59
59
 
60
60
  ## Installation
61
61
 
@@ -76,7 +76,11 @@ client = Anyformat(
76
76
  api_key=os.environ.get("ANYFORMAT_API_KEY"), # This is the default and can be omitted
77
77
  )
78
78
 
79
- response = client.health.check()
79
+ response = client.workflows.run(
80
+ workflow_id="0686bb97-8c30-70f0-8000-97669e000eb8",
81
+ text="Invoice #12345\nDate: 2025-01-15\nAmount: $1,250.00\nVendor: Acme Corp",
82
+ )
83
+ print(response.id)
80
84
  ```
81
85
 
82
86
  While you can provide an `api_key` keyword argument,
@@ -99,7 +103,11 @@ client = AsyncAnyformat(
99
103
 
100
104
 
101
105
  async def main() -> None:
102
- response = await client.health.check()
106
+ response = await client.workflows.run(
107
+ workflow_id="0686bb97-8c30-70f0-8000-97669e000eb8",
108
+ text="Invoice #12345\nDate: 2025-01-15\nAmount: $1,250.00\nVendor: Acme Corp",
109
+ )
110
+ print(response.id)
103
111
 
104
112
 
105
113
  asyncio.run(main())
@@ -132,7 +140,11 @@ async def main() -> None:
132
140
  api_key=os.environ.get("ANYFORMAT_API_KEY"), # This is the default and can be omitted
133
141
  http_client=DefaultAioHttpClient(),
134
142
  ) as client:
135
- response = await client.health.check()
143
+ response = await client.workflows.run(
144
+ workflow_id="0686bb97-8c30-70f0-8000-97669e000eb8",
145
+ text="Invoice #12345\nDate: 2025-01-15\nAmount: $1,250.00\nVendor: Acme Corp",
146
+ )
147
+ print(response.id)
136
148
 
137
149
 
138
150
  asyncio.run(main())
@@ -20,7 +20,7 @@ Use the Anyformat MCP Server to enable AI assistants to interact with this API,
20
20
 
21
21
  ## Documentation
22
22
 
23
- The full API of this library can be found in [api.md](api.md).
23
+ The REST API documentation can be found on [docs.anyformat.ai](https://docs.anyformat.ai). The full API of this library can be found in [api.md](api.md).
24
24
 
25
25
  ## Installation
26
26
 
@@ -41,7 +41,11 @@ client = Anyformat(
41
41
  api_key=os.environ.get("ANYFORMAT_API_KEY"), # This is the default and can be omitted
42
42
  )
43
43
 
44
- response = client.health.check()
44
+ response = client.workflows.run(
45
+ workflow_id="0686bb97-8c30-70f0-8000-97669e000eb8",
46
+ text="Invoice #12345\nDate: 2025-01-15\nAmount: $1,250.00\nVendor: Acme Corp",
47
+ )
48
+ print(response.id)
45
49
  ```
46
50
 
47
51
  While you can provide an `api_key` keyword argument,
@@ -64,7 +68,11 @@ client = AsyncAnyformat(
64
68
 
65
69
 
66
70
  async def main() -> None:
67
- response = await client.health.check()
71
+ response = await client.workflows.run(
72
+ workflow_id="0686bb97-8c30-70f0-8000-97669e000eb8",
73
+ text="Invoice #12345\nDate: 2025-01-15\nAmount: $1,250.00\nVendor: Acme Corp",
74
+ )
75
+ print(response.id)
68
76
 
69
77
 
70
78
  asyncio.run(main())
@@ -97,7 +105,11 @@ async def main() -> None:
97
105
  api_key=os.environ.get("ANYFORMAT_API_KEY"), # This is the default and can be omitted
98
106
  http_client=DefaultAioHttpClient(),
99
107
  ) as client:
100
- response = await client.health.check()
108
+ response = await client.workflows.run(
109
+ workflow_id="0686bb97-8c30-70f0-8000-97669e000eb8",
110
+ text="Invoice #12345\nDate: 2025-01-15\nAmount: $1,250.00\nVendor: Acme Corp",
111
+ )
112
+ print(response.id)
101
113
 
102
114
 
103
115
  asyncio.run(main())
@@ -18,6 +18,10 @@ before making any information public.
18
18
  If you encounter security issues that are not directly related to SDKs but pertain to the services
19
19
  or products provided by Anyformat, please follow the respective company's security reporting guidelines.
20
20
 
21
+ ### Anyformat Terms and Policies
22
+
23
+ Please contact support@anyformat.ai for any questions or concerns regarding the security of our services.
24
+
21
25
  ---
22
26
 
23
27
  Thank you for helping us keep the SDKs and systems they interact with secure.
@@ -20,18 +20,9 @@ Methods:
20
20
 
21
21
  # Files
22
22
 
23
- Types:
24
-
25
- ```python
26
- from anyformat.types import FileCreateResponse, FileListResponse
27
- ```
28
-
29
23
  Methods:
30
24
 
31
- - <code title="post /v2/files/">client.files.<a href="./src/anyformat/resources/files.py">create</a>(\*\*<a href="src/anyformat/types/file_create_params.py">params</a>) -> <a href="./src/anyformat/types/file_create_response.py">FileCreateResponse</a></code>
32
- - <code title="get /v2/files/">client.files.<a href="./src/anyformat/resources/files.py">list</a>(\*\*<a href="src/anyformat/types/file_list_params.py">params</a>) -> <a href="./src/anyformat/types/file_list_response.py">FileListResponse</a></code>
33
25
  - <code title="delete /v2/files/{collection_id}/">client.files.<a href="./src/anyformat/resources/files.py">delete</a>(collection_id) -> None</code>
34
- - <code title="get /v2/files/{collection_id}/extraction/">client.files.<a href="./src/anyformat/resources/files.py">get_extraction_results</a>(collection_id) -> object</code>
35
26
 
36
27
  # Workflows
37
28
 
@@ -41,6 +32,8 @@ Types:
41
32
  from anyformat.types import (
42
33
  Workflow,
43
34
  WorkflowListResponse,
35
+ WorkflowCreateFileResponse,
36
+ WorkflowListFilesResponse,
44
37
  WorkflowListRunsResponse,
45
38
  WorkflowRunResponse,
46
39
  WorkflowUploadResponse,
@@ -53,7 +46,9 @@ Methods:
53
46
  - <code title="get /v2/workflows/{workflow_id}/">client.workflows.<a href="./src/anyformat/resources/workflows.py">retrieve</a>(workflow_id) -> <a href="./src/anyformat/types/workflow.py">Workflow</a></code>
54
47
  - <code title="get /v2/workflows/">client.workflows.<a href="./src/anyformat/resources/workflows.py">list</a>(\*\*<a href="src/anyformat/types/workflow_list_params.py">params</a>) -> <a href="./src/anyformat/types/workflow_list_response.py">WorkflowListResponse</a></code>
55
48
  - <code title="delete /v2/workflows/{workflow_id}/">client.workflows.<a href="./src/anyformat/resources/workflows.py">delete</a>(workflow_id) -> None</code>
49
+ - <code title="post /v2/workflows/{workflow_id}/files/">client.workflows.<a href="./src/anyformat/resources/workflows.py">create_file</a>(workflow_id, \*\*<a href="src/anyformat/types/workflow_create_file_params.py">params</a>) -> <a href="./src/anyformat/types/workflow_create_file_response.py">WorkflowCreateFileResponse</a></code>
50
+ - <code title="get /v2/workflows/{workflow_id}/files/{collection_id}/results/">client.workflows.<a href="./src/anyformat/resources/workflows.py">get_file_results</a>(collection_id, \*, workflow_id) -> object</code>
51
+ - <code title="get /v2/workflows/{workflow_id}/files/">client.workflows.<a href="./src/anyformat/resources/workflows.py">list_files</a>(workflow_id, \*\*<a href="src/anyformat/types/workflow_list_files_params.py">params</a>) -> <a href="./src/anyformat/types/workflow_list_files_response.py">WorkflowListFilesResponse</a></code>
56
52
  - <code title="get /v2/workflows/{workflow_id}/runs/">client.workflows.<a href="./src/anyformat/resources/workflows.py">list_runs</a>(workflow_id, \*\*<a href="src/anyformat/types/workflow_list_runs_params.py">params</a>) -> <a href="./src/anyformat/types/workflow_list_runs_response.py">WorkflowListRunsResponse</a></code>
57
- - <code title="get /v2/workflows/{workflow_id}/results/">client.workflows.<a href="./src/anyformat/resources/workflows.py">results</a>(workflow_id, \*\*<a href="src/anyformat/types/workflow_results_params.py">params</a>) -> object</code>
58
53
  - <code title="post /v2/workflows/{workflow_id}/run/">client.workflows.<a href="./src/anyformat/resources/workflows.py">run</a>(workflow_id, \*\*<a href="src/anyformat/types/workflow_run_params.py">params</a>) -> <a href="./src/anyformat/types/workflow_run_response.py">WorkflowRunResponse</a></code>
59
54
  - <code title="post /v2/workflows/{workflow_id}/upload/">client.workflows.<a href="./src/anyformat/resources/workflows.py">upload</a>(workflow_id, \*\*<a href="src/anyformat/types/workflow_upload_params.py">params</a>) -> <a href="./src/anyformat/types/workflow_upload_response.py">WorkflowUploadResponse</a></code>
@@ -1,11 +1,11 @@
1
1
  [project]
2
2
  name = "anyformat"
3
- version = "0.2.0"
3
+ version = "0.4.0"
4
4
  description = "The official Python library for the anyformat API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
7
7
  authors = [
8
- { name = "Anyformat", email = "" },
8
+ { name = "Anyformat", email = "support@anyformat.ai" },
9
9
  ]
10
10
 
11
11
  dependencies = [
@@ -125,7 +125,6 @@ class Anyformat(SyncAPIClient):
125
125
 
126
126
  @cached_property
127
127
  def workflows(self) -> WorkflowsResource:
128
- """Workflow CRUD, execution, runs, and results."""
129
128
  from .resources.workflows import WorkflowsResource
130
129
 
131
130
  return WorkflowsResource(self)
@@ -333,7 +332,6 @@ class AsyncAnyformat(AsyncAPIClient):
333
332
 
334
333
  @cached_property
335
334
  def workflows(self) -> AsyncWorkflowsResource:
336
- """Workflow CRUD, execution, runs, and results."""
337
335
  from .resources.workflows import AsyncWorkflowsResource
338
336
 
339
337
  return AsyncWorkflowsResource(self)
@@ -496,7 +494,6 @@ class AnyformatWithRawResponse:
496
494
 
497
495
  @cached_property
498
496
  def workflows(self) -> workflows.WorkflowsResourceWithRawResponse:
499
- """Workflow CRUD, execution, runs, and results."""
500
497
  from .resources.workflows import WorkflowsResourceWithRawResponse
501
498
 
502
499
  return WorkflowsResourceWithRawResponse(self._client.workflows)
@@ -531,7 +528,6 @@ class AsyncAnyformatWithRawResponse:
531
528
 
532
529
  @cached_property
533
530
  def workflows(self) -> workflows.AsyncWorkflowsResourceWithRawResponse:
534
- """Workflow CRUD, execution, runs, and results."""
535
531
  from .resources.workflows import AsyncWorkflowsResourceWithRawResponse
536
532
 
537
533
  return AsyncWorkflowsResourceWithRawResponse(self._client.workflows)
@@ -566,7 +562,6 @@ class AnyformatWithStreamedResponse:
566
562
 
567
563
  @cached_property
568
564
  def workflows(self) -> workflows.WorkflowsResourceWithStreamingResponse:
569
- """Workflow CRUD, execution, runs, and results."""
570
565
  from .resources.workflows import WorkflowsResourceWithStreamingResponse
571
566
 
572
567
  return WorkflowsResourceWithStreamingResponse(self._client.workflows)
@@ -601,7 +596,6 @@ class AsyncAnyformatWithStreamedResponse:
601
596
 
602
597
  @cached_property
603
598
  def workflows(self) -> workflows.AsyncWorkflowsResourceWithStreamingResponse:
604
- """Workflow CRUD, execution, runs, and results."""
605
599
  from .resources.workflows import AsyncWorkflowsResourceWithStreamingResponse
606
600
 
607
601
  return AsyncWorkflowsResourceWithStreamingResponse(self._client.workflows)
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "anyformat"
4
- __version__ = "0.2.0" # x-release-please-version
4
+ __version__ = "0.4.0" # x-release-please-version
@@ -0,0 +1,169 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ import httpx
6
+
7
+ from .._types import Body, Query, Headers, NoneType, NotGiven, not_given
8
+ from .._utils import path_template
9
+ from .._compat import cached_property
10
+ from .._resource import SyncAPIResource, AsyncAPIResource
11
+ from .._response import (
12
+ to_raw_response_wrapper,
13
+ to_streamed_response_wrapper,
14
+ async_to_raw_response_wrapper,
15
+ async_to_streamed_response_wrapper,
16
+ )
17
+ from .._base_client import make_request_options
18
+
19
+ __all__ = ["FilesResource", "AsyncFilesResource"]
20
+
21
+
22
+ class FilesResource(SyncAPIResource):
23
+ """File collection management."""
24
+
25
+ @cached_property
26
+ def with_raw_response(self) -> FilesResourceWithRawResponse:
27
+ """
28
+ This property can be used as a prefix for any HTTP method call to return
29
+ the raw response object instead of the parsed content.
30
+
31
+ For more information, see https://www.github.com/anyformat-ai/anyformat-python#accessing-raw-response-data-eg-headers
32
+ """
33
+ return FilesResourceWithRawResponse(self)
34
+
35
+ @cached_property
36
+ def with_streaming_response(self) -> FilesResourceWithStreamingResponse:
37
+ """
38
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
39
+
40
+ For more information, see https://www.github.com/anyformat-ai/anyformat-python#with_streaming_response
41
+ """
42
+ return FilesResourceWithStreamingResponse(self)
43
+
44
+ def delete(
45
+ self,
46
+ collection_id: str,
47
+ *,
48
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
49
+ # The extra values given here take precedence over values defined on the client or passed to this method.
50
+ extra_headers: Headers | None = None,
51
+ extra_query: Query | None = None,
52
+ extra_body: Body | None = None,
53
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
54
+ ) -> None:
55
+ """
56
+ Delete a file collection and all its files.
57
+
58
+ Args:
59
+ extra_headers: Send extra headers
60
+
61
+ extra_query: Add additional query parameters to the request
62
+
63
+ extra_body: Add additional JSON properties to the request
64
+
65
+ timeout: Override the client-level default timeout for this request, in seconds
66
+ """
67
+ if not collection_id:
68
+ raise ValueError(f"Expected a non-empty value for `collection_id` but received {collection_id!r}")
69
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
70
+ return self._delete(
71
+ path_template("/v2/files/{collection_id}/", collection_id=collection_id),
72
+ options=make_request_options(
73
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
74
+ ),
75
+ cast_to=NoneType,
76
+ )
77
+
78
+
79
+ class AsyncFilesResource(AsyncAPIResource):
80
+ """File collection management."""
81
+
82
+ @cached_property
83
+ def with_raw_response(self) -> AsyncFilesResourceWithRawResponse:
84
+ """
85
+ This property can be used as a prefix for any HTTP method call to return
86
+ the raw response object instead of the parsed content.
87
+
88
+ For more information, see https://www.github.com/anyformat-ai/anyformat-python#accessing-raw-response-data-eg-headers
89
+ """
90
+ return AsyncFilesResourceWithRawResponse(self)
91
+
92
+ @cached_property
93
+ def with_streaming_response(self) -> AsyncFilesResourceWithStreamingResponse:
94
+ """
95
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
96
+
97
+ For more information, see https://www.github.com/anyformat-ai/anyformat-python#with_streaming_response
98
+ """
99
+ return AsyncFilesResourceWithStreamingResponse(self)
100
+
101
+ async def delete(
102
+ self,
103
+ collection_id: str,
104
+ *,
105
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
106
+ # The extra values given here take precedence over values defined on the client or passed to this method.
107
+ extra_headers: Headers | None = None,
108
+ extra_query: Query | None = None,
109
+ extra_body: Body | None = None,
110
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
111
+ ) -> None:
112
+ """
113
+ Delete a file collection and all its files.
114
+
115
+ Args:
116
+ extra_headers: Send extra headers
117
+
118
+ extra_query: Add additional query parameters to the request
119
+
120
+ extra_body: Add additional JSON properties to the request
121
+
122
+ timeout: Override the client-level default timeout for this request, in seconds
123
+ """
124
+ if not collection_id:
125
+ raise ValueError(f"Expected a non-empty value for `collection_id` but received {collection_id!r}")
126
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
127
+ return await self._delete(
128
+ path_template("/v2/files/{collection_id}/", collection_id=collection_id),
129
+ options=make_request_options(
130
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
131
+ ),
132
+ cast_to=NoneType,
133
+ )
134
+
135
+
136
+ class FilesResourceWithRawResponse:
137
+ def __init__(self, files: FilesResource) -> None:
138
+ self._files = files
139
+
140
+ self.delete = to_raw_response_wrapper(
141
+ files.delete,
142
+ )
143
+
144
+
145
+ class AsyncFilesResourceWithRawResponse:
146
+ def __init__(self, files: AsyncFilesResource) -> None:
147
+ self._files = files
148
+
149
+ self.delete = async_to_raw_response_wrapper(
150
+ files.delete,
151
+ )
152
+
153
+
154
+ class FilesResourceWithStreamingResponse:
155
+ def __init__(self, files: FilesResource) -> None:
156
+ self._files = files
157
+
158
+ self.delete = to_streamed_response_wrapper(
159
+ files.delete,
160
+ )
161
+
162
+
163
+ class AsyncFilesResourceWithStreamingResponse:
164
+ def __init__(self, files: AsyncFilesResource) -> None:
165
+ self._files = files
166
+
167
+ self.delete = async_to_streamed_response_wrapper(
168
+ files.delete,
169
+ )