Skip to content

Commit aa9d69b

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
chore: update SDK settings (#7)
1 parent 82a6f56 commit aa9d69b

87 files changed

Lines changed: 152 additions & 132 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ $ pip install -r requirements-dev.lock
3232
## Modifying/Adding code
3333

3434
Most of the SDK is generated code, and any modified code will be overridden on the next generation. The
35-
`src/runloop/lib/` and `examples/` directories are exceptions and will never be overridden.
35+
`src/runloop_minus_api_minus_client/lib/` and `examples/` directories are exceptions and will never be overridden.
3636

3737
## Adding and running examples
3838

README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Runloop Python API library
22

3-
[![PyPI version](https://img.shields.io/pypi/v/runloop.svg)](https://pypi.org/project/runloop/)
3+
[![PyPI version](https://img.shields.io/pypi/v/runloop-api-client.svg)](https://pypi.org/project/runloop-api-client/)
44

55
The Runloop Python library provides convenient access to the Runloop REST API from any Python 3.7+
66
application. The library includes type definitions for all request params and response fields,
@@ -16,7 +16,7 @@ The REST API documentation can be found [on runloop.ai](https://runloop.ai). The
1616

1717
```sh
1818
# install from PyPI
19-
pip install --pre runloop
19+
pip install --pre runloop-api-client
2020
```
2121

2222
## Usage
@@ -25,7 +25,7 @@ The full API of this library can be found in [api.md](api.md).
2525

2626
```python
2727
import os
28-
from runloop import Runloop
28+
from runloop_minus_api_minus_client import Runloop
2929

3030
client = Runloop(
3131
# This is the default and can be omitted
@@ -48,7 +48,7 @@ Simply import `AsyncRunloop` instead of `Runloop` and use `await` with each API
4848
```python
4949
import os
5050
import asyncio
51-
from runloop import AsyncRunloop
51+
from runloop_minus_api_minus_client import AsyncRunloop
5252

5353
client = AsyncRunloop(
5454
# This is the default and can be omitted
@@ -77,27 +77,27 @@ Typed requests and responses provide autocomplete and documentation within your
7777

7878
## Handling errors
7979

80-
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `runloop.APIConnectionError` is raised.
80+
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `runloop_minus_api_minus_client.APIConnectionError` is raised.
8181

8282
When the API returns a non-success status code (that is, 4xx or 5xx
83-
response), a subclass of `runloop.APIStatusError` is raised, containing `status_code` and `response` properties.
83+
response), a subclass of `runloop_minus_api_minus_client.APIStatusError` is raised, containing `status_code` and `response` properties.
8484

85-
All errors inherit from `runloop.APIError`.
85+
All errors inherit from `runloop_minus_api_minus_client.APIError`.
8686

8787
```python
88-
import runloop
89-
from runloop import Runloop
88+
import runloop_minus_api_minus_client
89+
from runloop_minus_api_minus_client import Runloop
9090

9191
client = Runloop()
9292

9393
try:
9494
client.devboxes.create()
95-
except runloop.APIConnectionError as e:
95+
except runloop_minus_api_minus_client.APIConnectionError as e:
9696
print("The server could not be reached")
9797
print(e.__cause__) # an underlying Exception, likely raised within httpx.
98-
except runloop.RateLimitError as e:
98+
except runloop_minus_api_minus_client.RateLimitError as e:
9999
print("A 429 status code was received; we should back off a bit.")
100-
except runloop.APIStatusError as e:
100+
except runloop_minus_api_minus_client.APIStatusError as e:
101101
print("Another non-200-range status code was received")
102102
print(e.status_code)
103103
print(e.response)
@@ -125,7 +125,7 @@ Connection errors (for example, due to a network connectivity problem), 408 Requ
125125
You can use the `max_retries` option to configure or disable retry settings:
126126

127127
```python
128-
from runloop import Runloop
128+
from runloop_minus_api_minus_client import Runloop
129129

130130
# Configure the default for all requests:
131131
client = Runloop(
@@ -143,7 +143,7 @@ By default requests time out after 1 minute. You can configure this with a `time
143143
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object:
144144

145145
```python
146-
from runloop import Runloop
146+
from runloop_minus_api_minus_client import Runloop
147147

148148
# Configure the default for all requests:
149149
client = Runloop(
@@ -193,7 +193,7 @@ if response.my_field is None:
193193
The "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,
194194

195195
```py
196-
from runloop import Runloop
196+
from runloop_minus_api_minus_client import Runloop
197197

198198
client = Runloop()
199199
response = client.devboxes.with_raw_response.create()
@@ -203,9 +203,9 @@ devbox = response.parse() # get the object that `devboxes.create()` would have
203203
print(devbox.id)
204204
```
205205

206-
These methods return an [`APIResponse`](https://github.com/runloopai/api-client-python/tree/main/src/runloop/_response.py) object.
206+
These methods return an [`APIResponse`](https://github.com/runloopai/api-client-python/tree/main/src/runloop_minus_api_minus_client/_response.py) object.
207207

208-
The async client returns an [`AsyncAPIResponse`](https://github.com/runloopai/api-client-python/tree/main/src/runloop/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
208+
The async client returns an [`AsyncAPIResponse`](https://github.com/runloopai/api-client-python/tree/main/src/runloop_minus_api_minus_client/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
209209

210210
#### `.with_streaming_response`
211211

@@ -267,7 +267,7 @@ You can directly override the [httpx client](https://www.python-httpx.org/api/#c
267267
- Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality
268268

269269
```python
270-
from runloop import Runloop, DefaultHttpxClient
270+
from runloop_minus_api_minus_client import Runloop, DefaultHttpxClient
271271

272272
client = Runloop(
273273
# Or use the `RUNLOOP_BASE_URL` env var

api.md

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,98 @@
11
# Shared Types
22

33
```python
4-
from runloop.types import FunctionInvocationDetailView, ProjectLogsView
4+
from runloop_minus_api_minus_client.types import FunctionInvocationDetailView, ProjectLogsView
55
```
66

77
# Devboxes
88

99
Types:
1010

1111
```python
12-
from runloop.types import DevboxExecutionDetailView, DevboxListView, DevboxView
12+
from runloop_minus_api_minus_client.types import (
13+
DevboxExecutionDetailView,
14+
DevboxListView,
15+
DevboxView,
16+
)
1317
```
1418

1519
Methods:
1620

17-
- <code title="post /v1/devboxes">client.devboxes.<a href="./src/runloop/resources/devboxes/devboxes.py">create</a>(\*\*<a href="src/runloop/types/devbox_create_params.py">params</a>) -> <a href="./src/runloop/types/devbox_view.py">DevboxView</a></code>
18-
- <code title="get /v1/devboxes/{id}">client.devboxes.<a href="./src/runloop/resources/devboxes/devboxes.py">retrieve</a>(id) -> <a href="./src/runloop/types/devbox_view.py">DevboxView</a></code>
19-
- <code title="get /v1/devboxes">client.devboxes.<a href="./src/runloop/resources/devboxes/devboxes.py">list</a>(\*\*<a href="src/runloop/types/devbox_list_params.py">params</a>) -> <a href="./src/runloop/types/devbox_list_view.py">DevboxListView</a></code>
20-
- <code title="post /v1/devboxes/{id}/execute_sync">client.devboxes.<a href="./src/runloop/resources/devboxes/devboxes.py">execute_sync</a>(id) -> <a href="./src/runloop/types/devbox_execution_detail_view.py">DevboxExecutionDetailView</a></code>
21-
- <code title="post /v1/devboxes/{id}/shutdown">client.devboxes.<a href="./src/runloop/resources/devboxes/devboxes.py">shutdown</a>(id) -> <a href="./src/runloop/types/devbox_view.py">DevboxView</a></code>
21+
- <code title="post /v1/devboxes">client.devboxes.<a href="./src/runloop_minus_api_minus_client/resources/devboxes/devboxes.py">create</a>(\*\*<a href="src/runloop_minus_api_minus_client/types/devbox_create_params.py">params</a>) -> <a href="./src/runloop_minus_api_minus_client/types/devbox_view.py">DevboxView</a></code>
22+
- <code title="get /v1/devboxes/{id}">client.devboxes.<a href="./src/runloop_minus_api_minus_client/resources/devboxes/devboxes.py">retrieve</a>(id) -> <a href="./src/runloop_minus_api_minus_client/types/devbox_view.py">DevboxView</a></code>
23+
- <code title="get /v1/devboxes">client.devboxes.<a href="./src/runloop_minus_api_minus_client/resources/devboxes/devboxes.py">list</a>(\*\*<a href="src/runloop_minus_api_minus_client/types/devbox_list_params.py">params</a>) -> <a href="./src/runloop_minus_api_minus_client/types/devbox_list_view.py">DevboxListView</a></code>
24+
- <code title="post /v1/devboxes/{id}/execute_sync">client.devboxes.<a href="./src/runloop_minus_api_minus_client/resources/devboxes/devboxes.py">execute_sync</a>(id) -> <a href="./src/runloop_minus_api_minus_client/types/devbox_execution_detail_view.py">DevboxExecutionDetailView</a></code>
25+
- <code title="post /v1/devboxes/{id}/shutdown">client.devboxes.<a href="./src/runloop_minus_api_minus_client/resources/devboxes/devboxes.py">shutdown</a>(id) -> <a href="./src/runloop_minus_api_minus_client/types/devbox_view.py">DevboxView</a></code>
2226

2327
## Logs
2428

2529
Types:
2630

2731
```python
28-
from runloop.types.devboxes import DevboxLogsListView
32+
from runloop_minus_api_minus_client.types.devboxes import DevboxLogsListView
2933
```
3034

3135
Methods:
3236

33-
- <code title="get /v1/devboxes/{id}/logs">client.devboxes.logs.<a href="./src/runloop/resources/devboxes/logs.py">list</a>(id) -> <a href="./src/runloop/types/devboxes/devbox_logs_list_view.py">DevboxLogsListView</a></code>
37+
- <code title="get /v1/devboxes/{id}/logs">client.devboxes.logs.<a href="./src/runloop_minus_api_minus_client/resources/devboxes/logs.py">list</a>(id) -> <a href="./src/runloop_minus_api_minus_client/types/devboxes/devbox_logs_list_view.py">DevboxLogsListView</a></code>
3438

3539
# Functions
3640

3741
Types:
3842

3943
```python
40-
from runloop.types import FunctionListView
44+
from runloop_minus_api_minus_client.types import FunctionListView
4145
```
4246

4347
Methods:
4448

45-
- <code title="get /v1/functions">client.functions.<a href="./src/runloop/resources/functions/functions.py">list</a>() -> <a href="./src/runloop/types/function_list_view.py">FunctionListView</a></code>
46-
- <code title="post /v1/functions/{project_name}/{function_name}/invoke_async">client.functions.<a href="./src/runloop/resources/functions/functions.py">invoke_async</a>(function_name, \*, project_name, \*\*<a href="src/runloop/types/function_invoke_async_params.py">params</a>) -> <a href="./src/runloop/types/shared/function_invocation_detail_view.py">FunctionInvocationDetailView</a></code>
47-
- <code title="post /v1/functions/{project_name}/{function_name}/invoke_sync">client.functions.<a href="./src/runloop/resources/functions/functions.py">invoke_sync</a>(function_name, \*, project_name, \*\*<a href="src/runloop/types/function_invoke_sync_params.py">params</a>) -> <a href="./src/runloop/types/shared/function_invocation_detail_view.py">FunctionInvocationDetailView</a></code>
49+
- <code title="get /v1/functions">client.functions.<a href="./src/runloop_minus_api_minus_client/resources/functions/functions.py">list</a>() -> <a href="./src/runloop_minus_api_minus_client/types/function_list_view.py">FunctionListView</a></code>
50+
- <code title="post /v1/functions/{project_name}/{function_name}/invoke_async">client.functions.<a href="./src/runloop_minus_api_minus_client/resources/functions/functions.py">invoke_async</a>(function_name, \*, project_name, \*\*<a href="src/runloop_minus_api_minus_client/types/function_invoke_async_params.py">params</a>) -> <a href="./src/runloop_minus_api_minus_client/types/shared/function_invocation_detail_view.py">FunctionInvocationDetailView</a></code>
51+
- <code title="post /v1/functions/{project_name}/{function_name}/invoke_sync">client.functions.<a href="./src/runloop_minus_api_minus_client/resources/functions/functions.py">invoke_sync</a>(function_name, \*, project_name, \*\*<a href="src/runloop_minus_api_minus_client/types/function_invoke_sync_params.py">params</a>) -> <a href="./src/runloop_minus_api_minus_client/types/shared/function_invocation_detail_view.py">FunctionInvocationDetailView</a></code>
4852

4953
## Invocations
5054

5155
Types:
5256

5357
```python
54-
from runloop.types.functions import FunctionInvocationListView, KillOperationResponse
58+
from runloop_minus_api_minus_client.types.functions import (
59+
FunctionInvocationListView,
60+
KillOperationResponse,
61+
)
5562
```
5663

5764
Methods:
5865

59-
- <code title="get /v1/functions/invocations/{invocationId}">client.functions.invocations.<a href="./src/runloop/resources/functions/invocations/invocations.py">retrieve</a>(invocation_id) -> <a href="./src/runloop/types/shared/function_invocation_detail_view.py">FunctionInvocationDetailView</a></code>
60-
- <code title="get /v1/functions/invocations">client.functions.invocations.<a href="./src/runloop/resources/functions/invocations/invocations.py">list</a>() -> <a href="./src/runloop/types/functions/function_invocation_list_view.py">FunctionInvocationListView</a></code>
61-
- <code title="post /v1/functions/invocations/{invocationId}/kill">client.functions.invocations.<a href="./src/runloop/resources/functions/invocations/invocations.py">kill</a>(invocation_id) -> <a href="./src/runloop/types/functions/kill_operation_response.py">object</a></code>
66+
- <code title="get /v1/functions/invocations/{invocationId}">client.functions.invocations.<a href="./src/runloop_minus_api_minus_client/resources/functions/invocations/invocations.py">retrieve</a>(invocation_id) -> <a href="./src/runloop_minus_api_minus_client/types/shared/function_invocation_detail_view.py">FunctionInvocationDetailView</a></code>
67+
- <code title="get /v1/functions/invocations">client.functions.invocations.<a href="./src/runloop_minus_api_minus_client/resources/functions/invocations/invocations.py">list</a>() -> <a href="./src/runloop_minus_api_minus_client/types/functions/function_invocation_list_view.py">FunctionInvocationListView</a></code>
68+
- <code title="post /v1/functions/invocations/{invocationId}/kill">client.functions.invocations.<a href="./src/runloop_minus_api_minus_client/resources/functions/invocations/invocations.py">kill</a>(invocation_id) -> <a href="./src/runloop_minus_api_minus_client/types/functions/kill_operation_response.py">object</a></code>
6269

6370
### Spans
6471

6572
Types:
6673

6774
```python
68-
from runloop.types.functions.invocations import InvocationSpanListView
75+
from runloop_minus_api_minus_client.types.functions.invocations import InvocationSpanListView
6976
```
7077

7178
Methods:
7279

73-
- <code title="get /v1/functions/invocations/{invocationId}/spans">client.functions.invocations.spans.<a href="./src/runloop/resources/functions/invocations/spans.py">list</a>(invocation_id) -> <a href="./src/runloop/types/functions/invocations/invocation_span_list_view.py">InvocationSpanListView</a></code>
80+
- <code title="get /v1/functions/invocations/{invocationId}/spans">client.functions.invocations.spans.<a href="./src/runloop_minus_api_minus_client/resources/functions/invocations/spans.py">list</a>(invocation_id) -> <a href="./src/runloop_minus_api_minus_client/types/functions/invocations/invocation_span_list_view.py">InvocationSpanListView</a></code>
7481

7582
# Projects
7683

7784
Types:
7885

7986
```python
80-
from runloop.types import ProjectListView
87+
from runloop_minus_api_minus_client.types import ProjectListView
8188
```
8289

8390
Methods:
8491

85-
- <code title="get /v1/projects">client.projects.<a href="./src/runloop/resources/projects/projects.py">list</a>() -> <a href="./src/runloop/types/project_list_view.py">ProjectListView</a></code>
92+
- <code title="get /v1/projects">client.projects.<a href="./src/runloop_minus_api_minus_client/resources/projects/projects.py">list</a>() -> <a href="./src/runloop_minus_api_minus_client/types/project_list_view.py">ProjectListView</a></code>
8693

8794
## Logs
8895

8996
Methods:
9097

91-
- <code title="get /v1/projects/{id}/logs">client.projects.logs.<a href="./src/runloop/resources/projects/logs.py">list</a>(id) -> <a href="./src/runloop/types/shared/project_logs_view.py">ProjectLogsView</a></code>
98+
- <code title="get /v1/projects/{id}/logs">client.projects.logs.<a href="./src/runloop_minus_api_minus_client/resources/projects/logs.py">list</a>(id) -> <a href="./src/runloop_minus_api_minus_client/types/shared/project_logs_view.py">ProjectLogsView</a></code>

mypy.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ show_error_codes = True
55
# Exclude _files.py because mypy isn't smart enough to apply
66
# the correct type narrowing and as this is an internal module
77
# it's fine to just use Pyright.
8-
exclude = ^(src/runloop/_files\.py|_dev/.*\.py)$
8+
exclude = ^(src/runloop_minus_api_minus_client/_files\.py|_dev/.*\.py)$
99

1010
strict_equality = True
1111
implicit_reexport = True

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[project]
2-
name = "runloop"
2+
name = "runloop-api-client"
33
version = "0.0.1-alpha.0"
44
description = "The official Python library for the runloop API"
55
dynamic = ["readme"]
@@ -84,7 +84,7 @@ typecheck = { chain = [
8484
"typecheck:mypy"
8585
]}
8686
"typecheck:pyright" = "pyright"
87-
"typecheck:verify-types" = "pyright --verifytypes runloop --ignoreexternal"
87+
"typecheck:verify-types" = "pyright --verifytypes runloop_minus_api_minus_client --ignoreexternal"
8888
"typecheck:mypy" = "mypy ."
8989

9090
[build-system]
@@ -97,7 +97,7 @@ include = [
9797
]
9898

9999
[tool.hatch.build.targets.wheel]
100-
packages = ["src/runloop"]
100+
packages = ["src/runloop_minus_api_minus_client"]
101101

102102
[tool.hatch.metadata.hooks.fancy-pypi-readme]
103103
content-type = "text/markdown"
@@ -187,7 +187,7 @@ length-sort = true
187187
length-sort-straight = true
188188
combine-as-imports = true
189189
extra-standard-library = ["typing_extensions"]
190-
known-first-party = ["runloop", "tests"]
190+
known-first-party = ["runloop_minus_api_minus_client", "tests"]
191191

192192
[tool.ruff.per-file-ignores]
193193
"bin/**.py" = ["T201", "T203"]

release-please-config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,6 @@
6161
],
6262
"release-type": "python",
6363
"extra-files": [
64-
"src/runloop/_version.py"
64+
"src/runloop_minus_api_minus_client/_version.py"
6565
]
6666
}

requirements-dev.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ annotated-types==0.6.0
1212
# via pydantic
1313
anyio==4.1.0
1414
# via httpx
15-
# via runloop
15+
# via runloop-api-client
1616
argcomplete==3.1.2
1717
# via nox
1818
attrs==23.1.0
@@ -26,7 +26,7 @@ dirty-equals==0.6.0
2626
distlib==0.3.7
2727
# via virtualenv
2828
distro==1.8.0
29-
# via runloop
29+
# via runloop-api-client
3030
exceptiongroup==1.1.3
3131
# via anyio
3232
filelock==3.12.4
@@ -37,7 +37,7 @@ httpcore==1.0.2
3737
# via httpx
3838
httpx==0.25.2
3939
# via respx
40-
# via runloop
40+
# via runloop-api-client
4141
idna==3.4
4242
# via anyio
4343
# via httpx
@@ -60,7 +60,7 @@ pluggy==1.3.0
6060
py==1.11.0
6161
# via pytest
6262
pydantic==2.7.1
63-
# via runloop
63+
# via runloop-api-client
6464
pydantic-core==2.18.2
6565
# via pydantic
6666
pyright==1.1.364
@@ -80,7 +80,7 @@ six==1.16.0
8080
sniffio==1.3.0
8181
# via anyio
8282
# via httpx
83-
# via runloop
83+
# via runloop-api-client
8484
time-machine==2.9.0
8585
tomli==2.0.1
8686
# via mypy
@@ -89,7 +89,7 @@ typing-extensions==4.8.0
8989
# via mypy
9090
# via pydantic
9191
# via pydantic-core
92-
# via runloop
92+
# via runloop-api-client
9393
virtualenv==20.24.5
9494
# via nox
9595
zipp==3.17.0

requirements.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,32 @@ annotated-types==0.6.0
1212
# via pydantic
1313
anyio==4.1.0
1414
# via httpx
15-
# via runloop
15+
# via runloop-api-client
1616
certifi==2023.7.22
1717
# via httpcore
1818
# via httpx
1919
distro==1.8.0
20-
# via runloop
20+
# via runloop-api-client
2121
exceptiongroup==1.1.3
2222
# via anyio
2323
h11==0.14.0
2424
# via httpcore
2525
httpcore==1.0.2
2626
# via httpx
2727
httpx==0.25.2
28-
# via runloop
28+
# via runloop-api-client
2929
idna==3.4
3030
# via anyio
3131
# via httpx
3232
pydantic==2.7.1
33-
# via runloop
33+
# via runloop-api-client
3434
pydantic-core==2.18.2
3535
# via pydantic
3636
sniffio==1.3.0
3737
# via anyio
3838
# via httpx
39-
# via runloop
39+
# via runloop-api-client
4040
typing-extensions==4.8.0
4141
# via pydantic
4242
# via pydantic-core
43-
# via runloop
43+
# via runloop-api-client

0 commit comments

Comments
 (0)