Skip to content

Commit cd0ec74

Browse files
feat(api): manual updates
1 parent 0621933 commit cd0ec74

Some content is hidden

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

68 files changed

+133
-129
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 3
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-c4c5f89f67a73e4d17377d2b96fc201a63cd5458cbebaa23e78f92b59b90cc5b.yml
33
openapi_spec_hash: 931c6189a4fc4ee320963646b1b7edbe
4-
config_hash: 2089a6e46e0dfc89128dd5757a7bcf60
4+
config_hash: 554356d6e2bebaa59aaebbc75eebf525

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ $ pip install -r requirements-dev.lock
3636

3737
Most of the SDK is generated code. Modifications to code will be persisted between generations, but may
3838
result in merge conflicts between manual patches and changes from the generator. The generator will never
39-
modify the contents of the `src/warp_api/lib/` and `examples/` directories.
39+
modify the contents of the `src/warp_sdk/lib/` and `examples/` directories.
4040

4141
## Adding and running examples
4242

README.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Warp API Python API library
22

33
<!-- prettier-ignore -->
4-
[![PyPI version](https://img.shields.io/pypi/v/warp_api.svg?label=pypi%20(stable))](https://pypi.org/project/warp_api/)
4+
[![PyPI version](https://img.shields.io/pypi/v/warp_sdk.svg?label=pypi%20(stable))](https://pypi.org/project/warp_sdk/)
55

66
The Warp API Python library provides convenient access to the Warp API REST API from any Python 3.9+
77
application. The library includes type definitions for all request params and response fields,
@@ -21,15 +21,15 @@ pip install git+ssh://[email protected]/stainless-sdks/warp-api-python.git
2121
```
2222

2323
> [!NOTE]
24-
> Once this package is [published to PyPI](https://www.stainless.com/docs/guides/publish), this will become: `pip install warp_api`
24+
> Once this package is [published to PyPI](https://www.stainless.com/docs/guides/publish), this will become: `pip install warp_sdk`
2525
2626
## Usage
2727

2828
The full API of this library can be found in [api.md](api.md).
2929

3030
```python
3131
import os
32-
from warp_api import WarpAPI
32+
from warp_sdk import WarpAPI
3333

3434
client = WarpAPI(
3535
api_key=os.environ.get("WARP_API_API_KEY"), # This is the default and can be omitted
@@ -53,7 +53,7 @@ Simply import `AsyncWarpAPI` instead of `WarpAPI` and use `await` with each API
5353
```python
5454
import os
5555
import asyncio
56-
from warp_api import AsyncWarpAPI
56+
from warp_sdk import AsyncWarpAPI
5757

5858
client = AsyncWarpAPI(
5959
api_key=os.environ.get("WARP_API_API_KEY"), # This is the default and can be omitted
@@ -80,16 +80,16 @@ You can enable this by installing `aiohttp`:
8080

8181
```sh
8282
# install from this staging repo
83-
pip install 'warp_api[aiohttp] @ git+ssh://[email protected]/stainless-sdks/warp-api-python.git'
83+
pip install 'warp_sdk[aiohttp] @ git+ssh://[email protected]/stainless-sdks/warp-api-python.git'
8484
```
8585

8686
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
8787

8888
```python
8989
import os
9090
import asyncio
91-
from warp_api import DefaultAioHttpClient
92-
from warp_api import AsyncWarpAPI
91+
from warp_sdk import DefaultAioHttpClient
92+
from warp_sdk import AsyncWarpAPI
9393

9494

9595
async def main() -> None:
@@ -120,7 +120,7 @@ Typed requests and responses provide autocomplete and documentation within your
120120
Nested parameters are dictionaries, typed using `TypedDict`, for example:
121121

122122
```python
123-
from warp_api import WarpAPI
123+
from warp_sdk import WarpAPI
124124

125125
client = WarpAPI()
126126

@@ -133,29 +133,29 @@ print(response.config)
133133

134134
## Handling errors
135135

136-
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `warp_api.APIConnectionError` is raised.
136+
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `warp_sdk.APIConnectionError` is raised.
137137

138138
When the API returns a non-success status code (that is, 4xx or 5xx
139-
response), a subclass of `warp_api.APIStatusError` is raised, containing `status_code` and `response` properties.
139+
response), a subclass of `warp_sdk.APIStatusError` is raised, containing `status_code` and `response` properties.
140140

141-
All errors inherit from `warp_api.APIError`.
141+
All errors inherit from `warp_sdk.APIError`.
142142

143143
```python
144-
import warp_api
145-
from warp_api import WarpAPI
144+
import warp_sdk
145+
from warp_sdk import WarpAPI
146146

147147
client = WarpAPI()
148148

149149
try:
150150
client.agent.run(
151151
prompt="Fix the bug in auth.go",
152152
)
153-
except warp_api.APIConnectionError as e:
153+
except warp_sdk.APIConnectionError as e:
154154
print("The server could not be reached")
155155
print(e.__cause__) # an underlying Exception, likely raised within httpx.
156-
except warp_api.RateLimitError as e:
156+
except warp_sdk.RateLimitError as e:
157157
print("A 429 status code was received; we should back off a bit.")
158-
except warp_api.APIStatusError as e:
158+
except warp_sdk.APIStatusError as e:
159159
print("Another non-200-range status code was received")
160160
print(e.status_code)
161161
print(e.response)
@@ -183,7 +183,7 @@ Connection errors (for example, due to a network connectivity problem), 408 Requ
183183
You can use the `max_retries` option to configure or disable retry settings:
184184

185185
```python
186-
from warp_api import WarpAPI
186+
from warp_sdk import WarpAPI
187187

188188
# Configure the default for all requests:
189189
client = WarpAPI(
@@ -203,7 +203,7 @@ By default requests time out after 1 minute. You can configure this with a `time
203203
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:
204204

205205
```python
206-
from warp_api import WarpAPI
206+
from warp_sdk import WarpAPI
207207

208208
# Configure the default for all requests:
209209
client = WarpAPI(
@@ -257,7 +257,7 @@ if response.my_field is None:
257257
The "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,
258258

259259
```py
260-
from warp_api import WarpAPI
260+
from warp_sdk import WarpAPI
261261

262262
client = WarpAPI()
263263
response = client.agent.with_raw_response.run(
@@ -269,9 +269,9 @@ agent = response.parse() # get the object that `agent.run()` would have returne
269269
print(agent.task_id)
270270
```
271271

272-
These methods return an [`APIResponse`](https://github.com/stainless-sdks/warp-api-python/tree/main/src/warp_api/_response.py) object.
272+
These methods return an [`APIResponse`](https://github.com/stainless-sdks/warp-api-python/tree/main/src/warp_sdk/_response.py) object.
273273

274-
The async client returns an [`AsyncAPIResponse`](https://github.com/stainless-sdks/warp-api-python/tree/main/src/warp_api/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
274+
The async client returns an [`AsyncAPIResponse`](https://github.com/stainless-sdks/warp-api-python/tree/main/src/warp_sdk/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
275275

276276
#### `.with_streaming_response`
277277

@@ -335,7 +335,7 @@ You can directly override the [httpx client](https://www.python-httpx.org/api/#c
335335

336336
```python
337337
import httpx
338-
from warp_api import WarpAPI, DefaultHttpxClient
338+
from warp_sdk import WarpAPI, DefaultHttpxClient
339339

340340
client = WarpAPI(
341341
# Or use the `WARP_API_BASE_URL` env var
@@ -358,7 +358,7 @@ client.with_options(http_client=DefaultHttpxClient(...))
358358
By default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.
359359

360360
```py
361-
from warp_api import WarpAPI
361+
from warp_sdk import WarpAPI
362362

363363
with WarpAPI() as client:
364364
# make requests here
@@ -386,8 +386,8 @@ If you've upgraded to the latest version but aren't seeing any new features you
386386
You can determine the version that is being used at runtime with:
387387

388388
```py
389-
import warp_api
390-
print(warp_api.__version__)
389+
import warp_sdk
390+
print(warp_sdk.__version__)
391391
```
392392

393393
## Requirements

api.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
33
Types:
44

55
```python
6-
from warp_api.types import AmbientAgentConfig, AgentRunResponse
6+
from warp_sdk.types import AmbientAgentConfig, AgentRunResponse
77
```
88

99
Methods:
1010

11-
- <code title="post /agent/run">client.agent.<a href="./src/warp_api/resources/agent/agent.py">run</a>(\*\*<a href="src/warp_api/types/agent_run_params.py">params</a>) -> <a href="./src/warp_api/types/agent_run_response.py">AgentRunResponse</a></code>
11+
- <code title="post /agent/run">client.agent.<a href="./src/warp_sdk/resources/agent/agent.py">run</a>(\*\*<a href="src/warp_sdk/types/agent_run_params.py">params</a>) -> <a href="./src/warp_sdk/types/agent_run_response.py">AgentRunResponse</a></code>
1212

1313
## Tasks
1414

1515
Types:
1616

1717
```python
18-
from warp_api.types.agent import TaskItem, TaskSourceType, TaskState, TaskListResponse
18+
from warp_sdk.types.agent import TaskItem, TaskSourceType, TaskState, TaskListResponse
1919
```
2020

2121
Methods:
2222

23-
- <code title="get /agent/tasks/{taskId}">client.agent.tasks.<a href="./src/warp_api/resources/agent/tasks.py">retrieve</a>(task_id) -> <a href="./src/warp_api/types/agent/task_item.py">TaskItem</a></code>
24-
- <code title="get /agent/tasks">client.agent.tasks.<a href="./src/warp_api/resources/agent/tasks.py">list</a>(\*\*<a href="src/warp_api/types/agent/task_list_params.py">params</a>) -> <a href="./src/warp_api/types/agent/task_list_response.py">TaskListResponse</a></code>
23+
- <code title="get /agent/tasks/{taskId}">client.agent.tasks.<a href="./src/warp_sdk/resources/agent/tasks.py">retrieve</a>(task_id) -> <a href="./src/warp_sdk/types/agent/task_item.py">TaskItem</a></code>
24+
- <code title="get /agent/tasks">client.agent.tasks.<a href="./src/warp_sdk/resources/agent/tasks.py">list</a>(\*\*<a href="src/warp_sdk/types/agent/task_list_params.py">params</a>) -> <a href="./src/warp_sdk/types/agent/task_list_response.py">TaskListResponse</a></code>

pyproject.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[project]
2-
name = "warp_api"
2+
name = "warp_sdk"
33
version = "0.0.1"
44
description = "The official Python library for the warp-api API"
55
dynamic = ["readme"]
@@ -80,14 +80,14 @@ format = { chain = [
8080
"check:ruff" = "ruff check ."
8181
"fix:ruff" = "ruff check --fix ."
8282

83-
"check:importable" = "python -c 'import warp_api'"
83+
"check:importable" = "python -c 'import warp_sdk'"
8484

8585
typecheck = { chain = [
8686
"typecheck:pyright",
8787
"typecheck:mypy"
8888
]}
8989
"typecheck:pyright" = "pyright"
90-
"typecheck:verify-types" = "pyright --verifytypes warp_api --ignoreexternal"
90+
"typecheck:verify-types" = "pyright --verifytypes warp_sdk --ignoreexternal"
9191
"typecheck:mypy" = "mypy ."
9292

9393
[build-system]
@@ -100,7 +100,7 @@ include = [
100100
]
101101

102102
[tool.hatch.build.targets.wheel]
103-
packages = ["src/warp_api"]
103+
packages = ["src/warp_sdk"]
104104

105105
[tool.hatch.build.targets.sdist]
106106
# Basically everything except hidden files/directories (such as .github, .devcontainers, .python-version, etc)
@@ -168,7 +168,7 @@ show_error_codes = true
168168
#
169169
# We also exclude our `tests` as mypy doesn't always infer
170170
# types correctly and Pyright will still catch any type errors.
171-
exclude = ['src/warp_api/_files.py', '_dev/.*.py', 'tests/.*']
171+
exclude = ['src/warp_sdk/_files.py', '_dev/.*.py', 'tests/.*']
172172

173173
strict_equality = true
174174
implicit_reexport = true
@@ -260,7 +260,7 @@ length-sort = true
260260
length-sort-straight = true
261261
combine-as-imports = true
262262
extra-standard-library = ["typing_extensions"]
263-
known-first-party = ["warp_api", "tests"]
263+
known-first-party = ["warp_sdk", "tests"]
264264

265265
[tool.ruff.lint.per-file-ignores]
266266
"bin/**.py" = ["T201", "T203"]

requirements-dev.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ aiohappyeyeballs==2.6.1
1414
# via aiohttp
1515
aiohttp==3.13.2
1616
# via httpx-aiohttp
17-
# via warp-api
17+
# via warp-sdk
1818
aiosignal==1.4.0
1919
# via aiohttp
2020
annotated-types==0.7.0
2121
# via pydantic
2222
anyio==4.12.0
2323
# via httpx
24-
# via warp-api
24+
# via warp-sdk
2525
argcomplete==3.6.3
2626
# via nox
2727
async-timeout==5.0.1
@@ -42,7 +42,7 @@ dirty-equals==0.11
4242
distlib==0.4.0
4343
# via virtualenv
4444
distro==1.9.0
45-
# via warp-api
45+
# via warp-sdk
4646
exceptiongroup==1.3.1
4747
# via anyio
4848
# via pytest
@@ -60,9 +60,9 @@ httpcore==1.0.9
6060
httpx==0.28.1
6161
# via httpx-aiohttp
6262
# via respx
63-
# via warp-api
63+
# via warp-sdk
6464
httpx-aiohttp==0.1.9
65-
# via warp-api
65+
# via warp-sdk
6666
humanize==4.13.0
6767
# via nox
6868
idna==3.11
@@ -99,7 +99,7 @@ propcache==0.4.1
9999
# via aiohttp
100100
# via yarl
101101
pydantic==2.12.5
102-
# via warp-api
102+
# via warp-sdk
103103
pydantic-core==2.41.5
104104
# via pydantic
105105
pygments==2.19.2
@@ -119,7 +119,7 @@ ruff==0.14.7
119119
six==1.17.0
120120
# via python-dateutil
121121
sniffio==1.3.1
122-
# via warp-api
122+
# via warp-sdk
123123
time-machine==2.19.0
124124
tomli==2.3.0
125125
# via dependency-groups
@@ -138,7 +138,7 @@ typing-extensions==4.15.0
138138
# via pytest-asyncio
139139
# via typing-inspection
140140
# via virtualenv
141-
# via warp-api
141+
# via warp-sdk
142142
typing-inspection==0.4.2
143143
# via pydantic
144144
virtualenv==20.35.4

requirements.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ aiohappyeyeballs==2.6.1
1414
# via aiohttp
1515
aiohttp==3.13.2
1616
# via httpx-aiohttp
17-
# via warp-api
17+
# via warp-sdk
1818
aiosignal==1.4.0
1919
# via aiohttp
2020
annotated-types==0.7.0
2121
# via pydantic
2222
anyio==4.12.0
2323
# via httpx
24-
# via warp-api
24+
# via warp-sdk
2525
async-timeout==5.0.1
2626
# via aiohttp
2727
attrs==25.4.0
@@ -30,7 +30,7 @@ certifi==2025.11.12
3030
# via httpcore
3131
# via httpx
3232
distro==1.9.0
33-
# via warp-api
33+
# via warp-sdk
3434
exceptiongroup==1.3.1
3535
# via anyio
3636
frozenlist==1.8.0
@@ -42,9 +42,9 @@ httpcore==1.0.9
4242
# via httpx
4343
httpx==0.28.1
4444
# via httpx-aiohttp
45-
# via warp-api
45+
# via warp-sdk
4646
httpx-aiohttp==0.1.9
47-
# via warp-api
47+
# via warp-sdk
4848
idna==3.11
4949
# via anyio
5050
# via httpx
@@ -56,11 +56,11 @@ propcache==0.4.1
5656
# via aiohttp
5757
# via yarl
5858
pydantic==2.12.5
59-
# via warp-api
59+
# via warp-sdk
6060
pydantic-core==2.41.5
6161
# via pydantic
6262
sniffio==1.3.1
63-
# via warp-api
63+
# via warp-sdk
6464
typing-extensions==4.15.0
6565
# via aiosignal
6666
# via anyio
@@ -69,7 +69,7 @@ typing-extensions==4.15.0
6969
# via pydantic
7070
# via pydantic-core
7171
# via typing-inspection
72-
# via warp-api
72+
# via warp-sdk
7373
typing-inspection==0.4.2
7474
# via pydantic
7575
yarl==1.22.0

scripts/lint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ echo "==> Running lints"
88
rye run lint
99

1010
echo "==> Making sure it imports"
11-
rye run python -c 'import warp_api'
11+
rye run python -c 'import warp_sdk'

0 commit comments

Comments
 (0)