Skip to content

Commit ad149d2

Browse files
fix(api): rename python package to mobilerun-sdk
1 parent db9f34b commit ad149d2

121 files changed

Lines changed: 378 additions & 179 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.

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 28
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/droidrun%2Fdroidrun-cloud-e456c6f546e08a8353077aa91570dcfa3cfdce1260d0bdcbd35fee682e031d07.yml
3-
openapi_spec_hash: a18064a4e4dcc29b2729951ef93fb0ea
4-
config_hash: 911fe8eb2055f2295f91878cd485970a
1+
configured_endpoints: 29
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/droidrun%2Fdroidrun-cloud-3f68287ff295847ebe3ad23fe9b8ae43649a3e1f534f7446fae9e9ae14b17af6.yml
3+
openapi_spec_hash: c56a17d68fcd1e0bdba355bd9dd77332
4+
config_hash: be48df5c2f845c70ade19a291422a435

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/droidrun_cloud/lib/` and `examples/` directories.
39+
modify the contents of the `src/mobilerun/lib/` and `examples/` directories.
4040

4141
## Adding and running examples
4242

README.md

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

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

66
The Mobilerun Python library provides convenient access to the Mobilerun 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://git@github.com/droidrun/mobilerun-sdk-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 droidrun_cloud`
24+
> Once this package is [published to PyPI](https://www.stainless.com/docs/guides/publish), this will become: `pip install mobilerun-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 droidrun_cloud import Mobilerun
32+
from mobilerun import Mobilerun
3333

3434
client = Mobilerun(
3535
api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"), # This is the default and can be omitted
@@ -51,7 +51,7 @@ Simply import `AsyncMobilerun` instead of `Mobilerun` and use `await` with each
5151
```python
5252
import os
5353
import asyncio
54-
from droidrun_cloud import AsyncMobilerun
54+
from mobilerun import AsyncMobilerun
5555

5656
client = AsyncMobilerun(
5757
api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"), # This is the default and can be omitted
@@ -76,16 +76,16 @@ You can enable this by installing `aiohttp`:
7676

7777
```sh
7878
# install from the production repo
79-
pip install 'droidrun_cloud[aiohttp] @ git+ssh://git@github.com/droidrun/mobilerun-sdk-python.git'
79+
pip install 'mobilerun-sdk[aiohttp] @ git+ssh://git@github.com/droidrun/mobilerun-sdk-python.git'
8080
```
8181

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

8484
```python
8585
import os
8686
import asyncio
87-
from droidrun_cloud import DefaultAioHttpClient
88-
from droidrun_cloud import AsyncMobilerun
87+
from mobilerun import DefaultAioHttpClient
88+
from mobilerun import AsyncMobilerun
8989

9090

9191
async def main() -> None:
@@ -111,27 +111,27 @@ Typed requests and responses provide autocomplete and documentation within your
111111

112112
## Handling errors
113113

114-
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `droidrun_cloud.APIConnectionError` is raised.
114+
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `mobilerun.APIConnectionError` is raised.
115115

116116
When the API returns a non-success status code (that is, 4xx or 5xx
117-
response), a subclass of `droidrun_cloud.APIStatusError` is raised, containing `status_code` and `response` properties.
117+
response), a subclass of `mobilerun.APIStatusError` is raised, containing `status_code` and `response` properties.
118118

119-
All errors inherit from `droidrun_cloud.APIError`.
119+
All errors inherit from `mobilerun.APIError`.
120120

121121
```python
122-
import droidrun_cloud
123-
from droidrun_cloud import Mobilerun
122+
import mobilerun
123+
from mobilerun import Mobilerun
124124

125125
client = Mobilerun()
126126

127127
try:
128128
client.tasks.list()
129-
except droidrun_cloud.APIConnectionError as e:
129+
except mobilerun.APIConnectionError as e:
130130
print("The server could not be reached")
131131
print(e.__cause__) # an underlying Exception, likely raised within httpx.
132-
except droidrun_cloud.RateLimitError as e:
132+
except mobilerun.RateLimitError as e:
133133
print("A 429 status code was received; we should back off a bit.")
134-
except droidrun_cloud.APIStatusError as e:
134+
except mobilerun.APIStatusError as e:
135135
print("Another non-200-range status code was received")
136136
print(e.status_code)
137137
print(e.response)
@@ -159,7 +159,7 @@ Connection errors (for example, due to a network connectivity problem), 408 Requ
159159
You can use the `max_retries` option to configure or disable retry settings:
160160

161161
```python
162-
from droidrun_cloud import Mobilerun
162+
from mobilerun import Mobilerun
163163

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

179179
```python
180-
from droidrun_cloud import Mobilerun
180+
from mobilerun import Mobilerun
181181

182182
# Configure the default for all requests:
183183
client = Mobilerun(
@@ -229,7 +229,7 @@ if response.my_field is None:
229229
The "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,
230230

231231
```py
232-
from droidrun_cloud import Mobilerun
232+
from mobilerun import Mobilerun
233233

234234
client = Mobilerun()
235235
response = client.tasks.with_raw_response.list()
@@ -239,9 +239,9 @@ task = response.parse() # get the object that `tasks.list()` would have returne
239239
print(task.items)
240240
```
241241

242-
These methods return an [`APIResponse`](https://github.com/droidrun/mobilerun-sdk-python/tree/main/src/droidrun_cloud/_response.py) object.
242+
These methods return an [`APIResponse`](https://github.com/droidrun/mobilerun-sdk-python/tree/main/src/mobilerun/_response.py) object.
243243

244-
The async client returns an [`AsyncAPIResponse`](https://github.com/droidrun/mobilerun-sdk-python/tree/main/src/droidrun_cloud/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
244+
The async client returns an [`AsyncAPIResponse`](https://github.com/droidrun/mobilerun-sdk-python/tree/main/src/mobilerun/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
245245

246246
#### `.with_streaming_response`
247247

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

304304
```python
305305
import httpx
306-
from droidrun_cloud import Mobilerun, DefaultHttpxClient
306+
from mobilerun import Mobilerun, DefaultHttpxClient
307307

308308
client = Mobilerun(
309309
# Or use the `MOBILERUN_BASE_URL` env var
@@ -326,7 +326,7 @@ client.with_options(http_client=DefaultHttpxClient(...))
326326
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.
327327

328328
```py
329-
from droidrun_cloud import Mobilerun
329+
from mobilerun import Mobilerun
330330

331331
with Mobilerun() as client:
332332
# make requests here
@@ -354,8 +354,8 @@ If you've upgraded to the latest version but aren't seeing any new features you
354354
You can determine the version that is being used at runtime with:
355355

356356
```py
357-
import droidrun_cloud
358-
print(droidrun_cloud.__version__)
357+
import mobilerun
358+
print(mobilerun.__version__)
359359
```
360360

361361
## Requirements

0 commit comments

Comments
 (0)