diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3e2bf49..2aca35a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.4.1" + ".": "0.5.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 231d254..88b95b7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 14 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/miru-ml%2Fmiru-server-d5d0de741a61bae4e957197c6fb0859ee5880ddab98616469f4414dc373c9d7f.yml openapi_spec_hash: 10d91729a0e0430fd2a6c68b2c81f886 -config_hash: 568f270a0ae3182575201912161a09cf +config_hash: 12fa4b9e99bf5317506a12aa9fecf73b diff --git a/CHANGELOG.md b/CHANGELOG.md index 54fe6e3..1e8f697 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.5.0 (2025-10-07) + +Full Changelog: [v0.4.1...v0.5.0](https://github.com/miruml/python-server-sdk/compare/v0.4.1...v0.5.0) + +### Features + +* **api:** uat environment ([67e2b55](https://github.com/miruml/python-server-sdk/commit/67e2b5530fadfbd61d67e85d4fc5b4c363558fd9)) + ## 0.4.1 (2025-10-05) Full Changelog: [v0.4.1-beta.3...v0.4.1](https://github.com/miruml/python-server-sdk/compare/v0.4.1-beta.3...v0.4.1) diff --git a/README.md b/README.md index e1146a3..651aac8 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,8 @@ from miru_server_sdk import Miru client = Miru( api_key=os.environ.get("MIRU_SERVER_API_KEY"), # This is the default and can be omitted - # or 'production' | 'local'; defaults to "production". - environment="staging", + # or 'prod' | 'staging' | 'local'; defaults to "prod". + environment="uat", ) config_instance = client.config_instances.retrieve( @@ -56,8 +56,8 @@ from miru_server_sdk import AsyncMiru client = AsyncMiru( api_key=os.environ.get("MIRU_SERVER_API_KEY"), # This is the default and can be omitted - # or 'production' | 'local'; defaults to "production". - environment="staging", + # or 'prod' | 'staging' | 'local'; defaults to "prod". + environment="uat", ) diff --git a/pyproject.toml b/pyproject.toml index be24138..0c36d25 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "miru_server_sdk" -version = "0.4.1" +version = "0.5.0" description = "The official Python library for the miru API" dynamic = ["readme"] license = "MIT" diff --git a/src/miru_server_sdk/_client.py b/src/miru_server_sdk/_client.py index 1e214cb..b49bf4e 100644 --- a/src/miru_server_sdk/_client.py +++ b/src/miru_server_sdk/_client.py @@ -43,7 +43,8 @@ ] ENVIRONMENTS: Dict[str, str] = { - "production": "https://configs.api.miruml.com/v1", + "prod": "https://configs.api.miruml.com/v1", + "uat": "https://uat.api.miruml.com/v1", "staging": "https://configs.dev.api.miruml.com/v1", "local": "http://localhost:8080/v1", } @@ -63,7 +64,7 @@ class Miru(SyncAPIClient): host: str version: str - _environment: Literal["production", "staging", "local"] | NotGiven + _environment: Literal["prod", "uat", "staging", "local"] | NotGiven def __init__( self, @@ -71,7 +72,7 @@ def __init__( api_key: str | None = None, host: str | None = None, version: str | None = None, - environment: Literal["production", "staging", "local"] | NotGiven = not_given, + environment: Literal["prod", "uat", "staging", "local"] | NotGiven = not_given, base_url: str | httpx.URL | None | NotGiven = not_given, timeout: float | Timeout | None | NotGiven = not_given, max_retries: int = DEFAULT_MAX_RETRIES, @@ -133,7 +134,7 @@ def __init__( elif base_url_env is not None: base_url = base_url_env else: - self._environment = environment = "production" + self._environment = environment = "prod" try: base_url = ENVIRONMENTS[environment] @@ -185,7 +186,7 @@ def copy( api_key: str | None = None, host: str | None = None, version: str | None = None, - environment: Literal["production", "staging", "local"] | None = None, + environment: Literal["prod", "uat", "staging", "local"] | None = None, base_url: str | httpx.URL | None = None, timeout: float | Timeout | None | NotGiven = not_given, http_client: httpx.Client | None = None, @@ -284,7 +285,7 @@ class AsyncMiru(AsyncAPIClient): host: str version: str - _environment: Literal["production", "staging", "local"] | NotGiven + _environment: Literal["prod", "uat", "staging", "local"] | NotGiven def __init__( self, @@ -292,7 +293,7 @@ def __init__( api_key: str | None = None, host: str | None = None, version: str | None = None, - environment: Literal["production", "staging", "local"] | NotGiven = not_given, + environment: Literal["prod", "uat", "staging", "local"] | NotGiven = not_given, base_url: str | httpx.URL | None | NotGiven = not_given, timeout: float | Timeout | None | NotGiven = not_given, max_retries: int = DEFAULT_MAX_RETRIES, @@ -354,7 +355,7 @@ def __init__( elif base_url_env is not None: base_url = base_url_env else: - self._environment = environment = "production" + self._environment = environment = "prod" try: base_url = ENVIRONMENTS[environment] @@ -406,7 +407,7 @@ def copy( api_key: str | None = None, host: str | None = None, version: str | None = None, - environment: Literal["production", "staging", "local"] | None = None, + environment: Literal["prod", "uat", "staging", "local"] | None = None, base_url: str | httpx.URL | None = None, timeout: float | Timeout | None | NotGiven = not_given, http_client: httpx.AsyncClient | None = None, diff --git a/src/miru_server_sdk/_version.py b/src/miru_server_sdk/_version.py index 7dbbee7..b354a86 100644 --- a/src/miru_server_sdk/_version.py +++ b/src/miru_server_sdk/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "miru_server_sdk" -__version__ = "0.4.1" # x-release-please-version +__version__ = "0.5.0" # x-release-please-version diff --git a/tests/test_client.py b/tests/test_client.py index a862c39..cd688ed 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -555,9 +555,9 @@ def test_base_url_env(self) -> None: # explicit environment arg requires explicitness with update_env(MIRU_BASE_URL="http://localhost:5000/from/env"): with pytest.raises(ValueError, match=r"you must pass base_url=None"): - Miru(api_key=api_key, _strict_response_validation=True, environment="production") + Miru(api_key=api_key, _strict_response_validation=True, environment="prod") - client = Miru(base_url=None, api_key=api_key, _strict_response_validation=True, environment="production") + client = Miru(base_url=None, api_key=api_key, _strict_response_validation=True, environment="prod") assert str(client.base_url).startswith("https://configs.api.miruml.com/v1") @pytest.mark.parametrize( @@ -1366,11 +1366,9 @@ def test_base_url_env(self) -> None: # explicit environment arg requires explicitness with update_env(MIRU_BASE_URL="http://localhost:5000/from/env"): with pytest.raises(ValueError, match=r"you must pass base_url=None"): - AsyncMiru(api_key=api_key, _strict_response_validation=True, environment="production") + AsyncMiru(api_key=api_key, _strict_response_validation=True, environment="prod") - client = AsyncMiru( - base_url=None, api_key=api_key, _strict_response_validation=True, environment="production" - ) + client = AsyncMiru(base_url=None, api_key=api_key, _strict_response_validation=True, environment="prod") assert str(client.base_url).startswith("https://configs.api.miruml.com/v1") @pytest.mark.parametrize(