Skip to content

Commit 2bbd706

Browse files
authored
Merge pull request #2 from miruml/release-please--branches--main--changes--next
release: 0.4.1-beta.0
2 parents a3a0316 + 0ed82f3 commit 2bbd706

File tree

94 files changed

+444
-480
lines changed

Some content is hidden

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

94 files changed

+444
-480
lines changed

.github/workflows/publish-pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ jobs:
2828
run: |
2929
bash ./bin/publish-pypi
3030
env:
31-
PYPI_TOKEN: ${{ secrets.MIRU_SERVER_PYPI_TOKEN || secrets.PYPI_TOKEN }}
31+
PYPI_TOKEN: ${{ secrets.MIRU_PYPI_TOKEN || secrets.PYPI_TOKEN }}

.github/workflows/release-doctor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ jobs:
1818
run: |
1919
bash ./bin/check-release-environment
2020
env:
21-
PYPI_TOKEN: ${{ secrets.MIRU_SERVER_PYPI_TOKEN || secrets.PYPI_TOKEN }}
21+
PYPI_TOKEN: ${{ secrets.MIRU_PYPI_TOKEN || secrets.PYPI_TOKEN }}

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.4.0"
2+
".": "0.4.1-beta.0"
33
}

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 14
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/miru-ml%2Fmiru-server-7d0dd143c8ea9bc230d9810d8cfb3fde8b1d4eb48295ebf2db7ea67916fb96c3.yml
33
openapi_spec_hash: b6667a2e80a356a67bab83f8d5f6e51a
4-
config_hash: a6a12b948f6bbf51b6e6c16c1e99fae7
4+
config_hash: 78c50efd3bbfb4969846973cb0609eff

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## 0.4.1-beta.0 (2025-10-05)
4+
5+
Full Changelog: [v0.4.0...v0.4.1-beta.0](https://github.com/miruml/python-server-sdk/compare/v0.4.0...v0.4.1-beta.0)
6+
7+
### Refactors
8+
9+
* **api:** rename miru-server to miru ([163c465](https://github.com/miruml/python-server-sdk/commit/163c4659c64f6b954d9b91e7b340554f0919efa6))
10+
* **api:** revert package name to miru_server_sdk ([0c8b7d7](https://github.com/miruml/python-server-sdk/commit/0c8b7d74ae67df4005fc069c4575ffae78b975c6))
11+
312
## 0.4.0 (2025-09-23)
413

514
Full Changelog: [v0.0.1...v0.4.0](https://github.com/miruml/python-server-sdk/compare/v0.0.1...v0.4.0)

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

4141
## Adding and running examples
4242

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2025 miru-server
1+
Copyright 2025 miru
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
44

README.md

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Miru Server Python API library
1+
# Miru Python API library
22

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

6-
The Miru Server Python library provides convenient access to the Miru Server REST API from any Python 3.8+
6+
The Miru Python library provides convenient access to the Miru REST API from any Python 3.8+
77
application. The library includes type definitions for all request params and response fields,
88
and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
99

@@ -17,7 +17,7 @@ The full API of this library can be found in [api.md](api.md).
1717

1818
```sh
1919
# install from PyPI
20-
pip install miru_server_sdk
20+
pip install --pre miru_server_sdk
2121
```
2222

2323
## Usage
@@ -26,9 +26,9 @@ The full API of this library can be found in [api.md](api.md).
2626

2727
```python
2828
import os
29-
from miru_server import MiruServer
29+
from miru_server_sdk import Miru
3030

31-
client = MiruServer(
31+
client = Miru(
3232
api_key=os.environ.get("MIRU_SERVER_API_KEY"), # This is the default and can be omitted
3333
)
3434

@@ -45,14 +45,14 @@ so that your API Key is not stored in source control.
4545

4646
## Async usage
4747

48-
Simply import `AsyncMiruServer` instead of `MiruServer` and use `await` with each API call:
48+
Simply import `AsyncMiru` instead of `Miru` and use `await` with each API call:
4949

5050
```python
5151
import os
5252
import asyncio
53-
from miru_server import AsyncMiruServer
53+
from miru_server_sdk import AsyncMiru
5454

55-
client = AsyncMiruServer(
55+
client = AsyncMiru(
5656
api_key=os.environ.get("MIRU_SERVER_API_KEY"), # This is the default and can be omitted
5757
)
5858

@@ -77,19 +77,19 @@ You can enable this by installing `aiohttp`:
7777

7878
```sh
7979
# install from PyPI
80-
pip install miru_server_sdk[aiohttp]
80+
pip install --pre miru_server_sdk[aiohttp]
8181
```
8282

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

8585
```python
8686
import asyncio
87-
from miru_server import DefaultAioHttpClient
88-
from miru_server import AsyncMiruServer
87+
from miru_server_sdk import DefaultAioHttpClient
88+
from miru_server_sdk import AsyncMiru
8989

9090

9191
async def main() -> None:
92-
async with AsyncMiruServer(
92+
async with AsyncMiru(
9393
api_key="My API Key",
9494
http_client=DefaultAioHttpClient(),
9595
) as client:
@@ -113,29 +113,29 @@ Typed requests and responses provide autocomplete and documentation within your
113113

114114
## Handling errors
115115

116-
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `miru_server.APIConnectionError` is raised.
116+
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `miru_server_sdk.APIConnectionError` is raised.
117117

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

121-
All errors inherit from `miru_server.APIError`.
121+
All errors inherit from `miru_server_sdk.APIError`.
122122

123123
```python
124-
import miru_server
125-
from miru_server import MiruServer
124+
import miru_server_sdk
125+
from miru_server_sdk import Miru
126126

127-
client = MiruServer()
127+
client = Miru()
128128

129129
try:
130130
client.config_instances.retrieve(
131131
config_instance_id="cfg_inst_123",
132132
)
133-
except miru_server.APIConnectionError as e:
133+
except miru_server_sdk.APIConnectionError as e:
134134
print("The server could not be reached")
135135
print(e.__cause__) # an underlying Exception, likely raised within httpx.
136-
except miru_server.RateLimitError as e:
136+
except miru_server_sdk.RateLimitError as e:
137137
print("A 429 status code was received; we should back off a bit.")
138-
except miru_server.APIStatusError as e:
138+
except miru_server_sdk.APIStatusError as e:
139139
print("Another non-200-range status code was received")
140140
print(e.status_code)
141141
print(e.response)
@@ -163,10 +163,10 @@ Connection errors (for example, due to a network connectivity problem), 408 Requ
163163
You can use the `max_retries` option to configure or disable retry settings:
164164

165165
```python
166-
from miru_server import MiruServer
166+
from miru_server_sdk import Miru
167167

168168
# Configure the default for all requests:
169-
client = MiruServer(
169+
client = Miru(
170170
# default is 2
171171
max_retries=0,
172172
)
@@ -183,16 +183,16 @@ By default requests time out after 1 minute. You can configure this with a `time
183183
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:
184184

185185
```python
186-
from miru_server import MiruServer
186+
from miru_server_sdk import Miru
187187

188188
# Configure the default for all requests:
189-
client = MiruServer(
189+
client = Miru(
190190
# 20 seconds (default is 1 minute)
191191
timeout=20.0,
192192
)
193193

194194
# More granular control:
195-
client = MiruServer(
195+
client = Miru(
196196
timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),
197197
)
198198

@@ -212,10 +212,10 @@ Note that requests that time out are [retried twice by default](#retries).
212212

213213
We use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.
214214

215-
You can enable logging by setting the environment variable `MIRU_SERVER_LOG` to `info`.
215+
You can enable logging by setting the environment variable `MIRU_LOG` to `info`.
216216

217217
```shell
218-
$ export MIRU_SERVER_LOG=info
218+
$ export MIRU_LOG=info
219219
```
220220

221221
Or to `debug` for more verbose logging.
@@ -237,9 +237,9 @@ if response.my_field is None:
237237
The "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,
238238

239239
```py
240-
from miru_server import MiruServer
240+
from miru_server_sdk import Miru
241241

242-
client = MiruServer()
242+
client = Miru()
243243
response = client.config_instances.with_raw_response.retrieve(
244244
config_instance_id="cfg_inst_123",
245245
)
@@ -249,9 +249,9 @@ config_instance = response.parse() # get the object that `config_instances.retr
249249
print(config_instance.id)
250250
```
251251

252-
These methods return an [`APIResponse`](https://github.com/miruml/python-server-sdk/tree/main/src/miru_server/_response.py) object.
252+
These methods return an [`APIResponse`](https://github.com/miruml/python-server-sdk/tree/main/src/miru_server_sdk/_response.py) object.
253253

254-
The async client returns an [`AsyncAPIResponse`](https://github.com/miruml/python-server-sdk/tree/main/src/miru_server/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
254+
The async client returns an [`AsyncAPIResponse`](https://github.com/miruml/python-server-sdk/tree/main/src/miru_server_sdk/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
255255

256256
#### `.with_streaming_response`
257257

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

316316
```python
317317
import httpx
318-
from miru_server import MiruServer, DefaultHttpxClient
318+
from miru_server_sdk import Miru, DefaultHttpxClient
319319

320-
client = MiruServer(
321-
# Or use the `MIRU_SERVER_BASE_URL` env var
320+
client = Miru(
321+
# Or use the `MIRU_BASE_URL` env var
322322
base_url="http://my.test.server.example.com:8083",
323323
http_client=DefaultHttpxClient(
324324
proxy="http://my.test.proxy.example.com",
@@ -338,9 +338,9 @@ client.with_options(http_client=DefaultHttpxClient(...))
338338
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.
339339

340340
```py
341-
from miru_server import MiruServer
341+
from miru_server_sdk import Miru
342342

343-
with MiruServer() as client:
343+
with Miru() as client:
344344
# make requests here
345345
...
346346

@@ -366,8 +366,8 @@ If you've upgraded to the latest version but aren't seeing any new features you
366366
You can determine the version that is being used at runtime with:
367367

368368
```py
369-
import miru_server
370-
print(miru_server.__version__)
369+
import miru_server_sdk
370+
print(miru_server_sdk.__version__)
371371
```
372372

373373
## Requirements

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ before making any information public.
1616
## Reporting Non-SDK Related Security Issues
1717

1818
If you encounter security issues that are not directly related to SDKs but pertain to the services
19-
or products provided by Miru Server, please follow the respective company's security reporting guidelines.
19+
or products provided by Miru, please follow the respective company's security reporting guidelines.
2020

2121
---
2222

api.md

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

55
```python
6-
from miru_server.types import (
6+
from miru_server_sdk.types import (
77
ConfigInstance,
88
ConfigSchema,
99
ConfigSchemaList,
@@ -15,30 +15,30 @@ from miru_server.types import (
1515

1616
Methods:
1717

18-
- <code title="get /config_instances/{config_instance_id}">client.config_instances.<a href="./src/miru_server/resources/config_instances.py">retrieve</a>(config_instance_id, \*\*<a href="src/miru_server/types/config_instance_retrieve_params.py">params</a>) -> <a href="./src/miru_server/types/config_instance.py">ConfigInstance</a></code>
19-
- <code title="get /config_instances">client.config_instances.<a href="./src/miru_server/resources/config_instances.py">list</a>(\*\*<a href="src/miru_server/types/config_instance_list_params.py">params</a>) -> <a href="./src/miru_server/types/config_instance_list_response.py">ConfigInstanceListResponse</a></code>
18+
- <code title="get /config_instances/{config_instance_id}">client.config_instances.<a href="./src/miru_server_sdk/resources/config_instances.py">retrieve</a>(config_instance_id, \*\*<a href="src/miru_server_sdk/types/config_instance_retrieve_params.py">params</a>) -> <a href="./src/miru_server_sdk/types/config_instance.py">ConfigInstance</a></code>
19+
- <code title="get /config_instances">client.config_instances.<a href="./src/miru_server_sdk/resources/config_instances.py">list</a>(\*\*<a href="src/miru_server_sdk/types/config_instance_list_params.py">params</a>) -> <a href="./src/miru_server_sdk/types/config_instance_list_response.py">ConfigInstanceListResponse</a></code>
2020

2121
# Deployments
2222

2323
Types:
2424

2525
```python
26-
from miru_server.types import Deployment, DeploymentListResponse, DeploymentValidateResponse
26+
from miru_server_sdk.types import Deployment, DeploymentListResponse, DeploymentValidateResponse
2727
```
2828

2929
Methods:
3030

31-
- <code title="post /deployments">client.deployments.<a href="./src/miru_server/resources/deployments.py">create</a>(\*\*<a href="src/miru_server/types/deployment_create_params.py">params</a>) -> <a href="./src/miru_server/types/deployment.py">Deployment</a></code>
32-
- <code title="get /deployments/{deployment_id}">client.deployments.<a href="./src/miru_server/resources/deployments.py">retrieve</a>(deployment_id, \*\*<a href="src/miru_server/types/deployment_retrieve_params.py">params</a>) -> <a href="./src/miru_server/types/deployment.py">Deployment</a></code>
33-
- <code title="get /deployments">client.deployments.<a href="./src/miru_server/resources/deployments.py">list</a>(\*\*<a href="src/miru_server/types/deployment_list_params.py">params</a>) -> <a href="./src/miru_server/types/deployment_list_response.py">DeploymentListResponse</a></code>
34-
- <code title="post /deployments/{deployment_id}/validate">client.deployments.<a href="./src/miru_server/resources/deployments.py">validate</a>(deployment_id, \*\*<a href="src/miru_server/types/deployment_validate_params.py">params</a>) -> <a href="./src/miru_server/types/deployment_validate_response.py">DeploymentValidateResponse</a></code>
31+
- <code title="post /deployments">client.deployments.<a href="./src/miru_server_sdk/resources/deployments.py">create</a>(\*\*<a href="src/miru_server_sdk/types/deployment_create_params.py">params</a>) -> <a href="./src/miru_server_sdk/types/deployment.py">Deployment</a></code>
32+
- <code title="get /deployments/{deployment_id}">client.deployments.<a href="./src/miru_server_sdk/resources/deployments.py">retrieve</a>(deployment_id, \*\*<a href="src/miru_server_sdk/types/deployment_retrieve_params.py">params</a>) -> <a href="./src/miru_server_sdk/types/deployment.py">Deployment</a></code>
33+
- <code title="get /deployments">client.deployments.<a href="./src/miru_server_sdk/resources/deployments.py">list</a>(\*\*<a href="src/miru_server_sdk/types/deployment_list_params.py">params</a>) -> <a href="./src/miru_server_sdk/types/deployment_list_response.py">DeploymentListResponse</a></code>
34+
- <code title="post /deployments/{deployment_id}/validate">client.deployments.<a href="./src/miru_server_sdk/resources/deployments.py">validate</a>(deployment_id, \*\*<a href="src/miru_server_sdk/types/deployment_validate_params.py">params</a>) -> <a href="./src/miru_server_sdk/types/deployment_validate_response.py">DeploymentValidateResponse</a></code>
3535

3636
# Devices
3737

3838
Types:
3939

4040
```python
41-
from miru_server.types import (
41+
from miru_server_sdk.types import (
4242
Device,
4343
DeviceListResponse,
4444
DeviceDeleteResponse,
@@ -48,22 +48,22 @@ from miru_server.types import (
4848

4949
Methods:
5050

51-
- <code title="post /devices">client.devices.<a href="./src/miru_server/resources/devices.py">create</a>(\*\*<a href="src/miru_server/types/device_create_params.py">params</a>) -> <a href="./src/miru_server/types/device.py">Device</a></code>
52-
- <code title="get /devices/{device_id}">client.devices.<a href="./src/miru_server/resources/devices.py">retrieve</a>(device_id) -> <a href="./src/miru_server/types/device.py">Device</a></code>
53-
- <code title="patch /devices/{device_id}">client.devices.<a href="./src/miru_server/resources/devices.py">update</a>(device_id, \*\*<a href="src/miru_server/types/device_update_params.py">params</a>) -> <a href="./src/miru_server/types/device.py">Device</a></code>
54-
- <code title="get /devices">client.devices.<a href="./src/miru_server/resources/devices.py">list</a>(\*\*<a href="src/miru_server/types/device_list_params.py">params</a>) -> <a href="./src/miru_server/types/device_list_response.py">DeviceListResponse</a></code>
55-
- <code title="delete /devices/{device_id}">client.devices.<a href="./src/miru_server/resources/devices.py">delete</a>(device_id) -> <a href="./src/miru_server/types/device_delete_response.py">DeviceDeleteResponse</a></code>
56-
- <code title="post /devices/{device_id}/activation_token">client.devices.<a href="./src/miru_server/resources/devices.py">create_activation_token</a>(device_id, \*\*<a href="src/miru_server/types/device_create_activation_token_params.py">params</a>) -> <a href="./src/miru_server/types/device_create_activation_token_response.py">DeviceCreateActivationTokenResponse</a></code>
51+
- <code title="post /devices">client.devices.<a href="./src/miru_server_sdk/resources/devices.py">create</a>(\*\*<a href="src/miru_server_sdk/types/device_create_params.py">params</a>) -> <a href="./src/miru_server_sdk/types/device.py">Device</a></code>
52+
- <code title="get /devices/{device_id}">client.devices.<a href="./src/miru_server_sdk/resources/devices.py">retrieve</a>(device_id) -> <a href="./src/miru_server_sdk/types/device.py">Device</a></code>
53+
- <code title="patch /devices/{device_id}">client.devices.<a href="./src/miru_server_sdk/resources/devices.py">update</a>(device_id, \*\*<a href="src/miru_server_sdk/types/device_update_params.py">params</a>) -> <a href="./src/miru_server_sdk/types/device.py">Device</a></code>
54+
- <code title="get /devices">client.devices.<a href="./src/miru_server_sdk/resources/devices.py">list</a>(\*\*<a href="src/miru_server_sdk/types/device_list_params.py">params</a>) -> <a href="./src/miru_server_sdk/types/device_list_response.py">DeviceListResponse</a></code>
55+
- <code title="delete /devices/{device_id}">client.devices.<a href="./src/miru_server_sdk/resources/devices.py">delete</a>(device_id) -> <a href="./src/miru_server_sdk/types/device_delete_response.py">DeviceDeleteResponse</a></code>
56+
- <code title="post /devices/{device_id}/activation_token">client.devices.<a href="./src/miru_server_sdk/resources/devices.py">create_activation_token</a>(device_id, \*\*<a href="src/miru_server_sdk/types/device_create_activation_token_params.py">params</a>) -> <a href="./src/miru_server_sdk/types/device_create_activation_token_response.py">DeviceCreateActivationTokenResponse</a></code>
5757

5858
# Releases
5959

6060
Types:
6161

6262
```python
63-
from miru_server.types import Release, ReleaseListResponse
63+
from miru_server_sdk.types import Release, ReleaseListResponse
6464
```
6565

6666
Methods:
6767

68-
- <code title="get /releases/{release_id}">client.releases.<a href="./src/miru_server/resources/releases.py">retrieve</a>(release_id, \*\*<a href="src/miru_server/types/release_retrieve_params.py">params</a>) -> <a href="./src/miru_server/types/release.py">Release</a></code>
69-
- <code title="get /releases">client.releases.<a href="./src/miru_server/resources/releases.py">list</a>(\*\*<a href="src/miru_server/types/release_list_params.py">params</a>) -> <a href="./src/miru_server/types/release_list_response.py">ReleaseListResponse</a></code>
68+
- <code title="get /releases/{release_id}">client.releases.<a href="./src/miru_server_sdk/resources/releases.py">retrieve</a>(release_id, \*\*<a href="src/miru_server_sdk/types/release_retrieve_params.py">params</a>) -> <a href="./src/miru_server_sdk/types/release.py">Release</a></code>
69+
- <code title="get /releases">client.releases.<a href="./src/miru_server_sdk/resources/releases.py">list</a>(\*\*<a href="src/miru_server_sdk/types/release_list_params.py">params</a>) -> <a href="./src/miru_server_sdk/types/release_list_response.py">ReleaseListResponse</a></code>

0 commit comments

Comments
 (0)