You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,14 @@
1
1
# Changelog
2
2
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
+
3
12
## 0.4.0 (2025-09-23)
4
13
5
14
Full Changelog: [v0.0.1...v0.4.0](https://github.com/miruml/python-server-sdk/compare/v0.0.1...v0.4.0)
Copy file name to clipboardExpand all lines: LICENSE
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
Copyright 2025 miru-server
1
+
Copyright 2025 miru
2
2
3
3
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:
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+
7
7
application. The library includes type definitions for all request params and response fields,
8
8
and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
9
9
@@ -17,7 +17,7 @@ The full API of this library can be found in [api.md](api.md).
17
17
18
18
```sh
19
19
# install from PyPI
20
-
pip install miru_server_sdk
20
+
pip install --pre miru_server_sdk
21
21
```
22
22
23
23
## Usage
@@ -26,9 +26,9 @@ The full API of this library can be found in [api.md](api.md).
26
26
27
27
```python
28
28
import os
29
-
frommiru_serverimportMiruServer
29
+
frommiru_server_sdkimportMiru
30
30
31
-
client =MiruServer(
31
+
client =Miru(
32
32
api_key=os.environ.get("MIRU_SERVER_API_KEY"), # This is the default and can be omitted
33
33
)
34
34
@@ -45,14 +45,14 @@ so that your API Key is not stored in source control.
45
45
46
46
## Async usage
47
47
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:
49
49
50
50
```python
51
51
import os
52
52
import asyncio
53
-
frommiru_serverimportAsyncMiruServer
53
+
frommiru_server_sdkimportAsyncMiru
54
54
55
-
client =AsyncMiruServer(
55
+
client =AsyncMiru(
56
56
api_key=os.environ.get("MIRU_SERVER_API_KEY"), # This is the default and can be omitted
57
57
)
58
58
@@ -77,19 +77,19 @@ You can enable this by installing `aiohttp`:
77
77
78
78
```sh
79
79
# install from PyPI
80
-
pip install miru_server_sdk[aiohttp]
80
+
pip install --pre miru_server_sdk[aiohttp]
81
81
```
82
82
83
83
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
84
84
85
85
```python
86
86
import asyncio
87
-
frommiru_serverimport DefaultAioHttpClient
88
-
frommiru_serverimportAsyncMiruServer
87
+
frommiru_server_sdkimport DefaultAioHttpClient
88
+
frommiru_server_sdkimportAsyncMiru
89
89
90
90
91
91
asyncdefmain() -> None:
92
-
asyncwithAsyncMiruServer(
92
+
asyncwithAsyncMiru(
93
93
api_key="My API Key",
94
94
http_client=DefaultAioHttpClient(),
95
95
) as client:
@@ -113,29 +113,29 @@ Typed requests and responses provide autocomplete and documentation within your
113
113
114
114
## Handling errors
115
115
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.
117
117
118
118
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.
120
120
121
-
All errors inherit from `miru_server.APIError`.
121
+
All errors inherit from `miru_server_sdk.APIError`.
122
122
123
123
```python
124
-
importmiru_server
125
-
frommiru_serverimportMiruServer
124
+
importmiru_server_sdk
125
+
frommiru_server_sdkimportMiru
126
126
127
-
client =MiruServer()
127
+
client =Miru()
128
128
129
129
try:
130
130
client.config_instances.retrieve(
131
131
config_instance_id="cfg_inst_123",
132
132
)
133
-
exceptmiru_server.APIConnectionError as e:
133
+
exceptmiru_server_sdk.APIConnectionError as e:
134
134
print("The server could not be reached")
135
135
print(e.__cause__) # an underlying Exception, likely raised within httpx.
136
-
exceptmiru_server.RateLimitError as e:
136
+
exceptmiru_server_sdk.RateLimitError as e:
137
137
print("A 429 status code was received; we should back off a bit.")
138
-
exceptmiru_server.APIStatusError as e:
138
+
exceptmiru_server_sdk.APIStatusError as e:
139
139
print("Another non-200-range status code was received")
140
140
print(e.status_code)
141
141
print(e.response)
@@ -163,10 +163,10 @@ Connection errors (for example, due to a network connectivity problem), 408 Requ
163
163
You can use the `max_retries` option to configure or disable retry settings:
164
164
165
165
```python
166
-
frommiru_serverimportMiruServer
166
+
frommiru_server_sdkimportMiru
167
167
168
168
# Configure the default for all requests:
169
-
client =MiruServer(
169
+
client =Miru(
170
170
# default is 2
171
171
max_retries=0,
172
172
)
@@ -183,16 +183,16 @@ By default requests time out after 1 minute. You can configure this with a `time
183
183
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:
@@ -249,9 +249,9 @@ config_instance = response.parse() # get the object that `config_instances.retr
249
249
print(config_instance.id)
250
250
```
251
251
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.
253
253
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.
255
255
256
256
#### `.with_streaming_response`
257
257
@@ -315,10 +315,10 @@ You can directly override the [httpx client](https://www.python-httpx.org/api/#c
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.
339
339
340
340
```py
341
-
frommiru_serverimportMiruServer
341
+
frommiru_server_sdkimportMiru
342
342
343
-
withMiruServer() as client:
343
+
withMiru() as client:
344
344
# make requests here
345
345
...
346
346
@@ -366,8 +366,8 @@ If you've upgraded to the latest version but aren't seeing any new features you
366
366
You can determine the version that is being used at runtime with:
0 commit comments