@@ -20,21 +20,13 @@ A full reference for this library is available [here](./reference.md).
20
20
Instantiate and use the client with the following:
21
21
22
22
``` python
23
- from axiomatic import Axiomatic, UserRequirement
23
+ from axiomatic import Axiomatic
24
24
25
25
client = Axiomatic(
26
26
api_key = " YOUR_API_KEY" ,
27
27
)
28
- client.requirements.check(
29
- request = [
30
- UserRequirement(
31
- latex_symbol = " latex_symbol" ,
32
- requirement_name = " requirement_name" ,
33
- tolerance = 1.1 ,
34
- value = 1.1 ,
35
- units = " units" ,
36
- )
37
- ],
28
+ client.lean.execute(
29
+ code = " code" ,
38
30
)
39
31
```
40
32
@@ -45,24 +37,16 @@ The SDK also exports an `async` client so that you can make non-blocking calls t
45
37
``` python
46
38
import asyncio
47
39
48
- from axiomatic import AsyncAxiomatic, UserRequirement
40
+ from axiomatic import AsyncAxiomatic
49
41
50
42
client = AsyncAxiomatic(
51
43
api_key = " YOUR_API_KEY" ,
52
44
)
53
45
54
46
55
47
async def main () -> None :
56
- await client.requirements.check(
57
- request = [
58
- UserRequirement(
59
- latex_symbol = " latex_symbol" ,
60
- requirement_name = " requirement_name" ,
61
- tolerance = 1.1 ,
62
- value = 1.1 ,
63
- units = " units" ,
64
- )
65
- ],
48
+ await client.lean.execute(
49
+ code = " code" ,
66
50
)
67
51
68
52
@@ -78,7 +62,7 @@ will be thrown.
78
62
from axiomatic.core.api_error import ApiError
79
63
80
64
try :
81
- client.requirements.check (... )
65
+ client.lean.execute (... )
82
66
except ApiError as e:
83
67
print (e.status_code)
84
68
print (e.body)
@@ -101,7 +85,7 @@ A request is deemed retryable when any of the following HTTP status codes is ret
101
85
Use the ` max_retries ` request option to configure this behavior.
102
86
103
87
``` python
104
- client.requirements.check (... , request_options = {
88
+ client.lean.execute (... , request_options = {
105
89
" max_retries" : 1
106
90
})
107
91
```
@@ -121,7 +105,7 @@ client = Axiomatic(
121
105
122
106
123
107
# Override timeout for a specific method
124
- client.requirements.check (... , request_options = {
108
+ client.lean.execute (... , request_options = {
125
109
" timeout_in_seconds" : 1
126
110
})
127
111
```
0 commit comments