Skip to content

Commit fc21ca6

Browse files
committed
Release 0.0.83
1 parent 77805a4 commit fc21ca6

14 files changed

+315
-9
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ except ApiError as e:
8989
### Retries
9090

9191
The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
92-
as the request is deemed retriable and the number of retry attempts has not grown larger than the configured
92+
as the request is deemed retryable and the number of retry attempts has not grown larger than the configured
9393
retry limit (default: 2).
9494

95-
A request is deemed retriable when any of the following HTTP status codes is returned:
95+
A request is deemed retryable when any of the following HTTP status codes is returned:
9696

9797
- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
9898
- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "axiomatic"
33

44
[tool.poetry]
55
name = "axiomatic"
6-
version = "0.0.82"
6+
version = "0.0.83"
77
description = ""
88
readme = "README.md"
99
authors = []

reference.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,6 +1035,77 @@ client.tools.list()
10351035
</dl>
10361036

10371037

1038+
</dd>
1039+
</dl>
1040+
</details>
1041+
1042+
## EquationProcessing
1043+
<details><summary><code>client.equation_processing.<a href="src/axiomatic/equation_processing/client.py">extract_from_document</a>(...)</code></summary>
1044+
<dl>
1045+
<dd>
1046+
1047+
#### 📝 Description
1048+
1049+
<dl>
1050+
<dd>
1051+
1052+
<dl>
1053+
<dd>
1054+
1055+
Extract equations from a document into the database
1056+
</dd>
1057+
</dl>
1058+
</dd>
1059+
</dl>
1060+
1061+
#### 🔌 Usage
1062+
1063+
<dl>
1064+
<dd>
1065+
1066+
<dl>
1067+
<dd>
1068+
1069+
```python
1070+
from axiomatic import Axiomatic
1071+
1072+
client = Axiomatic(
1073+
api_key="YOUR_API_KEY",
1074+
)
1075+
client.equation_processing.extract_from_document()
1076+
1077+
```
1078+
</dd>
1079+
</dl>
1080+
</dd>
1081+
</dl>
1082+
1083+
#### ⚙️ Parameters
1084+
1085+
<dl>
1086+
<dd>
1087+
1088+
<dl>
1089+
<dd>
1090+
1091+
**document:** `from __future__ import annotations
1092+
1093+
core.File` — See core.File for more documentation
1094+
1095+
</dd>
1096+
</dl>
1097+
1098+
<dl>
1099+
<dd>
1100+
1101+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
1102+
1103+
</dd>
1104+
</dl>
1105+
</dd>
1106+
</dl>
1107+
1108+
10381109
</dd>
10391110
</dl>
10401111
</details>

requirements.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
httpx>=0.21.2
2+
pydantic>= 1.9.2
3+
pydantic-core==^2.18.2
4+
requests>2.26.0
5+
types-requests>2.0.0
6+
typing_extensions>= 4.0.0

src/axiomatic/__init__.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
CreateApiKeyrequest,
1212
CreateUserRequest,
1313
CreateUserResponse,
14+
EquationExtraction,
15+
EquationExtractionResponse,
1416
ExecuteCodeResponse,
1517
ExtractConstantsResponse,
1618
ExtractTextResponse,
@@ -71,7 +73,19 @@
7173
Z3Expression,
7274
)
7375
from .errors import UnprocessableEntityError
74-
from . import code_execution, document, experimental, formalization, fso, generic, lean, pic, requirements, tools
76+
from . import (
77+
code_execution,
78+
document,
79+
equation_processing,
80+
experimental,
81+
formalization,
82+
fso,
83+
generic,
84+
lean,
85+
pic,
86+
requirements,
87+
tools,
88+
)
7589
from .client import AsyncAxiomatic, Axiomatic
7690
from .environment import AxiomaticEnvironment
7791
from .version import __version__
@@ -90,6 +104,8 @@
90104
"CreateApiKeyrequest",
91105
"CreateUserRequest",
92106
"CreateUserResponse",
107+
"EquationExtraction",
108+
"EquationExtractionResponse",
93109
"ExecuteCodeResponse",
94110
"ExtractConstantsResponse",
95111
"ExtractTextResponse",
@@ -152,6 +168,7 @@
152168
"__version__",
153169
"code_execution",
154170
"document",
171+
"equation_processing",
155172
"experimental",
156173
"formalization",
157174
"fso",

src/axiomatic/base_client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from .generic.client import GenericClient
1414
from .document.client import DocumentClient
1515
from .tools.client import ToolsClient
16+
from .equation_processing.client import EquationProcessingClient
1617
from .code_execution.client import CodeExecutionClient
1718
from .fso.client import FsoClient
1819
from .pic.client import PicClient
@@ -27,6 +28,7 @@
2728
from .generic.client import AsyncGenericClient
2829
from .document.client import AsyncDocumentClient
2930
from .tools.client import AsyncToolsClient
31+
from .equation_processing.client import AsyncEquationProcessingClient
3032
from .code_execution.client import AsyncCodeExecutionClient
3133
from .fso.client import AsyncFsoClient
3234
from .pic.client import AsyncPicClient
@@ -101,6 +103,7 @@ def __init__(
101103
self.generic = GenericClient(client_wrapper=self._client_wrapper)
102104
self.document = DocumentClient(client_wrapper=self._client_wrapper)
103105
self.tools = ToolsClient(client_wrapper=self._client_wrapper)
106+
self.equation_processing = EquationProcessingClient(client_wrapper=self._client_wrapper)
104107
self.code_execution = CodeExecutionClient(client_wrapper=self._client_wrapper)
105108
self.fso = FsoClient(client_wrapper=self._client_wrapper)
106109
self.pic = PicClient(client_wrapper=self._client_wrapper)
@@ -259,6 +262,7 @@ def __init__(
259262
self.generic = AsyncGenericClient(client_wrapper=self._client_wrapper)
260263
self.document = AsyncDocumentClient(client_wrapper=self._client_wrapper)
261264
self.tools = AsyncToolsClient(client_wrapper=self._client_wrapper)
265+
self.equation_processing = AsyncEquationProcessingClient(client_wrapper=self._client_wrapper)
262266
self.code_execution = AsyncCodeExecutionClient(client_wrapper=self._client_wrapper)
263267
self.fso = AsyncFsoClient(client_wrapper=self._client_wrapper)
264268
self.pic = AsyncPicClient(client_wrapper=self._client_wrapper)

src/axiomatic/core/client_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def get_headers(self) -> typing.Dict[str, str]:
1616
headers: typing.Dict[str, str] = {
1717
"X-Fern-Language": "Python",
1818
"X-Fern-SDK-Name": "axiomatic",
19-
"X-Fern-SDK-Version": "0.0.82",
19+
"X-Fern-SDK-Version": "0.0.83",
2020
}
2121
headers["X-API-Key"] = self.api_key
2222
return headers

src/axiomatic/core/http_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ def _retry_timeout(response: httpx.Response, retries: int) -> float:
8585

8686

8787
def _should_retry(response: httpx.Response) -> bool:
88-
retriable_400s = [429, 408, 409]
89-
return response.status_code >= 500 or response.status_code in retriable_400s
88+
retryable_400s = [429, 408, 409]
89+
return response.status_code >= 500 or response.status_code in retryable_400s
9090

9191

9292
def remove_omit_from_dict(

src/axiomatic/core/pydantic_utilities.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def to_jsonable_with_fallback(
7979
class UniversalBaseModel(pydantic.BaseModel):
8080
if IS_PYDANTIC_V2:
8181
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
82-
# Allow fields begining with `model_` to be used in the model
82+
# Allow fields beginning with `model_` to be used in the model
8383
protected_namespaces=(),
8484
) # type: ignore # Pydantic v2
8585

@@ -128,7 +128,7 @@ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
128128
Override the default dict method to `exclude_unset` by default. This function patches
129129
`exclude_unset` to work include fields within non-None default values.
130130
"""
131-
# Note: the logic here is multi-plexed given the levers exposed in Pydantic V1 vs V2
131+
# Note: the logic here is multiplexed given the levers exposed in Pydantic V1 vs V2
132132
# Pydantic V1's .dict can be extremely slow, so we do not want to call it twice.
133133
#
134134
# We'd ideally do the same for Pydantic V2, but it shells out to a library to serialize models
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+

0 commit comments

Comments
 (0)