From 841f6b83607d1fbc81fd7760d01ad48f2c6efb83 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 6 Aug 2025 10:24:35 +0000 Subject: [PATCH 01/35] chore(internal): fix ruff target version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 44231eb..1c96501 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -159,7 +159,7 @@ reportPrivateUsage = false [tool.ruff] line-length = 120 output-format = "grouped" -target-version = "py37" +target-version = "py38" [tool.ruff.format] docstring-code-format = true From 5be621cd6a883137ec3c379c1a64e6a12b9be1ea Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 9 Aug 2025 06:07:18 +0000 Subject: [PATCH 02/35] chore: update @stainless-api/prism-cli to v5.15.0 --- scripts/mock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/mock b/scripts/mock index d2814ae..0b28f6e 100755 --- a/scripts/mock +++ b/scripts/mock @@ -21,7 +21,7 @@ echo "==> Starting mock server with URL ${URL}" # Run prism mock on the given spec if [ "$1" == "--daemon" ]; then - npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL" &> .prism.log & + npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log & # Wait for server to come online echo -n "Waiting for server" @@ -37,5 +37,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL" + npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" fi From affca4a54c56578021aa4fe0ba4c43cb1d4b3c14 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 9 Aug 2025 06:08:59 +0000 Subject: [PATCH 03/35] chore(internal): update comment in script --- scripts/test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test b/scripts/test index 2b87845..dbeda2d 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! prism_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the prism command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stoplight/prism-cli@~5.3.2 -- prism mock path/to/your.openapi.yml${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}" echo exit 1 From c606559c6b779b8ba98f1d60adb981f294fd04e2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 02:24:51 +0000 Subject: [PATCH 04/35] chore(internal): codegen related update --- .../distance_matrix/test_json.py | 28 ++-- .../fleetify/routes/test_steps.py | 76 ++++----- .../fleetify/test_document_templates.py | 76 ++++----- tests/api_resources/fleetify/test_routes.py | 36 ++--- tests/api_resources/geofence/test_batch.py | 44 +++--- tests/api_resources/geofence/test_console.py | 28 ++-- .../api_resources/multigeocode/test_place.py | 68 ++++----- .../optimization/test_driver_assignment.py | 16 +- tests/api_resources/optimization/test_v2.py | 28 ++-- .../api_resources/skynet/asset/test_event.py | 20 +-- .../skynet/asset/test_location.py | 40 ++--- .../skynet/search/test_polygon.py | 32 ++-- tests/api_resources/skynet/test_asset.py | 144 +++++++++--------- tests/api_resources/skynet/test_config.py | 44 +++--- tests/api_resources/skynet/test_monitor.py | 84 +++++----- .../skynet/test_namespaced_apikeys.py | 24 +-- tests/api_resources/skynet/test_search.py | 32 ++-- tests/api_resources/skynet/test_trip.py | 112 +++++++------- tests/api_resources/test_areas.py | 12 +- tests/api_resources/test_autocomplete.py | 16 +- tests/api_resources/test_autosuggest.py | 16 +- tests/api_resources/test_batch.py | 28 ++-- tests/api_resources/test_browse.py | 16 +- tests/api_resources/test_directions.py | 16 +- tests/api_resources/test_discover.py | 16 +- tests/api_resources/test_geocode.py | 44 +++--- tests/api_resources/test_geofence.py | 100 ++++++------ tests/api_resources/test_isochrone.py | 16 +- tests/api_resources/test_lookup.py | 12 +- tests/api_resources/test_map.py | 12 +- tests/api_resources/test_mdm.py | 28 ++-- tests/api_resources/test_multigeocode.py | 16 +- tests/api_resources/test_navigation.py | 16 +- tests/api_resources/test_optimization.py | 32 ++-- tests/api_resources/test_postalcode.py | 16 +- tests/api_resources/test_restrictions.py | 104 ++++++------- .../api_resources/test_restrictions_items.py | 16 +- tests/api_resources/test_revgeocode.py | 16 +- tests/api_resources/test_route_report.py | 12 +- tests/api_resources/test_skynet.py | 16 +- tests/api_resources/test_snap_to_roads.py | 16 +- 41 files changed, 762 insertions(+), 762 deletions(-) diff --git a/tests/api_resources/distance_matrix/test_json.py b/tests/api_resources/distance_matrix/test_json.py index 9ba43a0..9553463 100644 --- a/tests/api_resources/distance_matrix/test_json.py +++ b/tests/api_resources/distance_matrix/test_json.py @@ -17,13 +17,13 @@ class TestJson: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create(self, client: NextbillionSDK) -> None: json = client.distance_matrix.json.create() assert json is None - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create(self, client: NextbillionSDK) -> None: response = client.distance_matrix.json.with_raw_response.create() @@ -33,7 +33,7 @@ def test_raw_response_create(self, client: NextbillionSDK) -> None: json = response.parse() assert json is None - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create(self, client: NextbillionSDK) -> None: with client.distance_matrix.json.with_streaming_response.create() as response: @@ -45,7 +45,7 @@ def test_streaming_response_create(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve(self, client: NextbillionSDK) -> None: json = client.distance_matrix.json.retrieve( @@ -55,7 +55,7 @@ def test_method_retrieve(self, client: NextbillionSDK) -> None: ) assert_matches_type(JsonRetrieveResponse, json, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve_with_all_params(self, client: NextbillionSDK) -> None: json = client.distance_matrix.json.retrieve( @@ -70,7 +70,7 @@ def test_method_retrieve_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(JsonRetrieveResponse, json, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: NextbillionSDK) -> None: response = client.distance_matrix.json.with_raw_response.retrieve( @@ -84,7 +84,7 @@ def test_raw_response_retrieve(self, client: NextbillionSDK) -> None: json = response.parse() assert_matches_type(JsonRetrieveResponse, json, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: NextbillionSDK) -> None: with client.distance_matrix.json.with_streaming_response.retrieve( @@ -106,13 +106,13 @@ class TestAsyncJson: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncNextbillionSDK) -> None: json = await async_client.distance_matrix.json.create() assert json is None - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.distance_matrix.json.with_raw_response.create() @@ -122,7 +122,7 @@ async def test_raw_response_create(self, async_client: AsyncNextbillionSDK) -> N json = await response.parse() assert json is None - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.distance_matrix.json.with_streaming_response.create() as response: @@ -134,7 +134,7 @@ async def test_streaming_response_create(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve(self, async_client: AsyncNextbillionSDK) -> None: json = await async_client.distance_matrix.json.retrieve( @@ -144,7 +144,7 @@ async def test_method_retrieve(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(JsonRetrieveResponse, json, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: json = await async_client.distance_matrix.json.retrieve( @@ -159,7 +159,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncNextbill ) assert_matches_type(JsonRetrieveResponse, json, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.distance_matrix.json.with_raw_response.retrieve( @@ -173,7 +173,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncNextbillionSDK) -> json = await response.parse() assert_matches_type(JsonRetrieveResponse, json, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.distance_matrix.json.with_streaming_response.retrieve( diff --git a/tests/api_resources/fleetify/routes/test_steps.py b/tests/api_resources/fleetify/routes/test_steps.py index 5b141f3..b519561 100644 --- a/tests/api_resources/fleetify/routes/test_steps.py +++ b/tests/api_resources/fleetify/routes/test_steps.py @@ -21,7 +21,7 @@ class TestSteps: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create(self, client: NextbillionSDK) -> None: step = client.fleetify.routes.steps.create( @@ -34,7 +34,7 @@ def test_method_create(self, client: NextbillionSDK) -> None: ) assert_matches_type(StepCreateResponse, step, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_with_all_params(self, client: NextbillionSDK) -> None: step = client.fleetify.routes.steps.create( @@ -60,7 +60,7 @@ def test_method_create_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(StepCreateResponse, step, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create(self, client: NextbillionSDK) -> None: response = client.fleetify.routes.steps.with_raw_response.create( @@ -77,7 +77,7 @@ def test_raw_response_create(self, client: NextbillionSDK) -> None: step = response.parse() assert_matches_type(StepCreateResponse, step, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create(self, client: NextbillionSDK) -> None: with client.fleetify.routes.steps.with_streaming_response.create( @@ -96,7 +96,7 @@ def test_streaming_response_create(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_path_params_create(self, client: NextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): @@ -109,7 +109,7 @@ def test_path_params_create(self, client: NextbillionSDK) -> None: type="start", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update(self, client: NextbillionSDK) -> None: step = client.fleetify.routes.steps.update( @@ -121,7 +121,7 @@ def test_method_update(self, client: NextbillionSDK) -> None: ) assert_matches_type(StepUpdateResponse, step, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update_with_all_params(self, client: NextbillionSDK) -> None: step = client.fleetify.routes.steps.update( @@ -148,7 +148,7 @@ def test_method_update_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(StepUpdateResponse, step, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_update(self, client: NextbillionSDK) -> None: response = client.fleetify.routes.steps.with_raw_response.update( @@ -164,7 +164,7 @@ def test_raw_response_update(self, client: NextbillionSDK) -> None: step = response.parse() assert_matches_type(StepUpdateResponse, step, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_update(self, client: NextbillionSDK) -> None: with client.fleetify.routes.steps.with_streaming_response.update( @@ -182,7 +182,7 @@ def test_streaming_response_update(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_path_params_update(self, client: NextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): @@ -203,7 +203,7 @@ def test_path_params_update(self, client: NextbillionSDK) -> None: position=0, ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete(self, client: NextbillionSDK) -> None: step = client.fleetify.routes.steps.delete( @@ -213,7 +213,7 @@ def test_method_delete(self, client: NextbillionSDK) -> None: ) assert_matches_type(StepDeleteResponse, step, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_delete(self, client: NextbillionSDK) -> None: response = client.fleetify.routes.steps.with_raw_response.delete( @@ -227,7 +227,7 @@ def test_raw_response_delete(self, client: NextbillionSDK) -> None: step = response.parse() assert_matches_type(StepDeleteResponse, step, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_delete(self, client: NextbillionSDK) -> None: with client.fleetify.routes.steps.with_streaming_response.delete( @@ -243,7 +243,7 @@ def test_streaming_response_delete(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_path_params_delete(self, client: NextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): @@ -260,7 +260,7 @@ def test_path_params_delete(self, client: NextbillionSDK) -> None: key="key", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_complete(self, client: NextbillionSDK) -> None: step = client.fleetify.routes.steps.complete( @@ -270,7 +270,7 @@ def test_method_complete(self, client: NextbillionSDK) -> None: ) assert step is None - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_complete_with_all_params(self, client: NextbillionSDK) -> None: step = client.fleetify.routes.steps.complete( @@ -283,7 +283,7 @@ def test_method_complete_with_all_params(self, client: NextbillionSDK) -> None: ) assert step is None - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_complete(self, client: NextbillionSDK) -> None: response = client.fleetify.routes.steps.with_raw_response.complete( @@ -297,7 +297,7 @@ def test_raw_response_complete(self, client: NextbillionSDK) -> None: step = response.parse() assert step is None - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_complete(self, client: NextbillionSDK) -> None: with client.fleetify.routes.steps.with_streaming_response.complete( @@ -313,7 +313,7 @@ def test_streaming_response_complete(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_path_params_complete(self, client: NextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): @@ -336,7 +336,7 @@ class TestAsyncSteps: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncNextbillionSDK) -> None: step = await async_client.fleetify.routes.steps.create( @@ -349,7 +349,7 @@ async def test_method_create(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(StepCreateResponse, step, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: step = await async_client.fleetify.routes.steps.create( @@ -375,7 +375,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncNextbillio ) assert_matches_type(StepCreateResponse, step, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.fleetify.routes.steps.with_raw_response.create( @@ -392,7 +392,7 @@ async def test_raw_response_create(self, async_client: AsyncNextbillionSDK) -> N step = await response.parse() assert_matches_type(StepCreateResponse, step, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.fleetify.routes.steps.with_streaming_response.create( @@ -411,7 +411,7 @@ async def test_streaming_response_create(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_create(self, async_client: AsyncNextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): @@ -424,7 +424,7 @@ async def test_path_params_create(self, async_client: AsyncNextbillionSDK) -> No type="start", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update(self, async_client: AsyncNextbillionSDK) -> None: step = await async_client.fleetify.routes.steps.update( @@ -436,7 +436,7 @@ async def test_method_update(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(StepUpdateResponse, step, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: step = await async_client.fleetify.routes.steps.update( @@ -463,7 +463,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncNextbillio ) assert_matches_type(StepUpdateResponse, step, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_update(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.fleetify.routes.steps.with_raw_response.update( @@ -479,7 +479,7 @@ async def test_raw_response_update(self, async_client: AsyncNextbillionSDK) -> N step = await response.parse() assert_matches_type(StepUpdateResponse, step, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_update(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.fleetify.routes.steps.with_streaming_response.update( @@ -497,7 +497,7 @@ async def test_streaming_response_update(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_update(self, async_client: AsyncNextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): @@ -518,7 +518,7 @@ async def test_path_params_update(self, async_client: AsyncNextbillionSDK) -> No position=0, ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncNextbillionSDK) -> None: step = await async_client.fleetify.routes.steps.delete( @@ -528,7 +528,7 @@ async def test_method_delete(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(StepDeleteResponse, step, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.fleetify.routes.steps.with_raw_response.delete( @@ -542,7 +542,7 @@ async def test_raw_response_delete(self, async_client: AsyncNextbillionSDK) -> N step = await response.parse() assert_matches_type(StepDeleteResponse, step, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.fleetify.routes.steps.with_streaming_response.delete( @@ -558,7 +558,7 @@ async def test_streaming_response_delete(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_delete(self, async_client: AsyncNextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): @@ -575,7 +575,7 @@ async def test_path_params_delete(self, async_client: AsyncNextbillionSDK) -> No key="key", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_complete(self, async_client: AsyncNextbillionSDK) -> None: step = await async_client.fleetify.routes.steps.complete( @@ -585,7 +585,7 @@ async def test_method_complete(self, async_client: AsyncNextbillionSDK) -> None: ) assert step is None - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_complete_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: step = await async_client.fleetify.routes.steps.complete( @@ -598,7 +598,7 @@ async def test_method_complete_with_all_params(self, async_client: AsyncNextbill ) assert step is None - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_complete(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.fleetify.routes.steps.with_raw_response.complete( @@ -612,7 +612,7 @@ async def test_raw_response_complete(self, async_client: AsyncNextbillionSDK) -> step = await response.parse() assert step is None - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_complete(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.fleetify.routes.steps.with_streaming_response.complete( @@ -628,7 +628,7 @@ async def test_streaming_response_complete(self, async_client: AsyncNextbillionS assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_complete(self, async_client: AsyncNextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): diff --git a/tests/api_resources/fleetify/test_document_templates.py b/tests/api_resources/fleetify/test_document_templates.py index e7a0622..442e48e 100644 --- a/tests/api_resources/fleetify/test_document_templates.py +++ b/tests/api_resources/fleetify/test_document_templates.py @@ -23,7 +23,7 @@ class TestDocumentTemplates: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create(self, client: NextbillionSDK) -> None: document_template = client.fleetify.document_templates.create( @@ -38,7 +38,7 @@ def test_method_create(self, client: NextbillionSDK) -> None: ) assert_matches_type(DocumentTemplateCreateResponse, document_template, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create(self, client: NextbillionSDK) -> None: response = client.fleetify.document_templates.with_raw_response.create( @@ -57,7 +57,7 @@ def test_raw_response_create(self, client: NextbillionSDK) -> None: document_template = response.parse() assert_matches_type(DocumentTemplateCreateResponse, document_template, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create(self, client: NextbillionSDK) -> None: with client.fleetify.document_templates.with_streaming_response.create( @@ -78,7 +78,7 @@ def test_streaming_response_create(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve(self, client: NextbillionSDK) -> None: document_template = client.fleetify.document_templates.retrieve( @@ -87,7 +87,7 @@ def test_method_retrieve(self, client: NextbillionSDK) -> None: ) assert_matches_type(DocumentTemplateRetrieveResponse, document_template, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: NextbillionSDK) -> None: response = client.fleetify.document_templates.with_raw_response.retrieve( @@ -100,7 +100,7 @@ def test_raw_response_retrieve(self, client: NextbillionSDK) -> None: document_template = response.parse() assert_matches_type(DocumentTemplateRetrieveResponse, document_template, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: NextbillionSDK) -> None: with client.fleetify.document_templates.with_streaming_response.retrieve( @@ -115,7 +115,7 @@ def test_streaming_response_retrieve(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_path_params_retrieve(self, client: NextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -124,7 +124,7 @@ def test_path_params_retrieve(self, client: NextbillionSDK) -> None: key="key", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update(self, client: NextbillionSDK) -> None: document_template = client.fleetify.document_templates.update( @@ -133,7 +133,7 @@ def test_method_update(self, client: NextbillionSDK) -> None: ) assert_matches_type(DocumentTemplateUpdateResponse, document_template, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update_with_all_params(self, client: NextbillionSDK) -> None: document_template = client.fleetify.document_templates.update( @@ -165,7 +165,7 @@ def test_method_update_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(DocumentTemplateUpdateResponse, document_template, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_update(self, client: NextbillionSDK) -> None: response = client.fleetify.document_templates.with_raw_response.update( @@ -178,7 +178,7 @@ def test_raw_response_update(self, client: NextbillionSDK) -> None: document_template = response.parse() assert_matches_type(DocumentTemplateUpdateResponse, document_template, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_update(self, client: NextbillionSDK) -> None: with client.fleetify.document_templates.with_streaming_response.update( @@ -193,7 +193,7 @@ def test_streaming_response_update(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_path_params_update(self, client: NextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -202,7 +202,7 @@ def test_path_params_update(self, client: NextbillionSDK) -> None: key="key", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list(self, client: NextbillionSDK) -> None: document_template = client.fleetify.document_templates.list( @@ -210,7 +210,7 @@ def test_method_list(self, client: NextbillionSDK) -> None: ) assert_matches_type(DocumentTemplateListResponse, document_template, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list(self, client: NextbillionSDK) -> None: response = client.fleetify.document_templates.with_raw_response.list( @@ -222,7 +222,7 @@ def test_raw_response_list(self, client: NextbillionSDK) -> None: document_template = response.parse() assert_matches_type(DocumentTemplateListResponse, document_template, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list(self, client: NextbillionSDK) -> None: with client.fleetify.document_templates.with_streaming_response.list( @@ -236,7 +236,7 @@ def test_streaming_response_list(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete(self, client: NextbillionSDK) -> None: document_template = client.fleetify.document_templates.delete( @@ -245,7 +245,7 @@ def test_method_delete(self, client: NextbillionSDK) -> None: ) assert_matches_type(DocumentTemplateDeleteResponse, document_template, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_delete(self, client: NextbillionSDK) -> None: response = client.fleetify.document_templates.with_raw_response.delete( @@ -258,7 +258,7 @@ def test_raw_response_delete(self, client: NextbillionSDK) -> None: document_template = response.parse() assert_matches_type(DocumentTemplateDeleteResponse, document_template, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_delete(self, client: NextbillionSDK) -> None: with client.fleetify.document_templates.with_streaming_response.delete( @@ -273,7 +273,7 @@ def test_streaming_response_delete(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_path_params_delete(self, client: NextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -288,7 +288,7 @@ class TestAsyncDocumentTemplates: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncNextbillionSDK) -> None: document_template = await async_client.fleetify.document_templates.create( @@ -303,7 +303,7 @@ async def test_method_create(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(DocumentTemplateCreateResponse, document_template, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.fleetify.document_templates.with_raw_response.create( @@ -322,7 +322,7 @@ async def test_raw_response_create(self, async_client: AsyncNextbillionSDK) -> N document_template = await response.parse() assert_matches_type(DocumentTemplateCreateResponse, document_template, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.fleetify.document_templates.with_streaming_response.create( @@ -343,7 +343,7 @@ async def test_streaming_response_create(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve(self, async_client: AsyncNextbillionSDK) -> None: document_template = await async_client.fleetify.document_templates.retrieve( @@ -352,7 +352,7 @@ async def test_method_retrieve(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(DocumentTemplateRetrieveResponse, document_template, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.fleetify.document_templates.with_raw_response.retrieve( @@ -365,7 +365,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncNextbillionSDK) -> document_template = await response.parse() assert_matches_type(DocumentTemplateRetrieveResponse, document_template, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.fleetify.document_templates.with_streaming_response.retrieve( @@ -380,7 +380,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncNextbillionS assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_retrieve(self, async_client: AsyncNextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -389,7 +389,7 @@ async def test_path_params_retrieve(self, async_client: AsyncNextbillionSDK) -> key="key", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update(self, async_client: AsyncNextbillionSDK) -> None: document_template = await async_client.fleetify.document_templates.update( @@ -398,7 +398,7 @@ async def test_method_update(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(DocumentTemplateUpdateResponse, document_template, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: document_template = await async_client.fleetify.document_templates.update( @@ -430,7 +430,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncNextbillio ) assert_matches_type(DocumentTemplateUpdateResponse, document_template, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_update(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.fleetify.document_templates.with_raw_response.update( @@ -443,7 +443,7 @@ async def test_raw_response_update(self, async_client: AsyncNextbillionSDK) -> N document_template = await response.parse() assert_matches_type(DocumentTemplateUpdateResponse, document_template, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_update(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.fleetify.document_templates.with_streaming_response.update( @@ -458,7 +458,7 @@ async def test_streaming_response_update(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_update(self, async_client: AsyncNextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -467,7 +467,7 @@ async def test_path_params_update(self, async_client: AsyncNextbillionSDK) -> No key="key", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncNextbillionSDK) -> None: document_template = await async_client.fleetify.document_templates.list( @@ -475,7 +475,7 @@ async def test_method_list(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(DocumentTemplateListResponse, document_template, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.fleetify.document_templates.with_raw_response.list( @@ -487,7 +487,7 @@ async def test_raw_response_list(self, async_client: AsyncNextbillionSDK) -> Non document_template = await response.parse() assert_matches_type(DocumentTemplateListResponse, document_template, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.fleetify.document_templates.with_streaming_response.list( @@ -501,7 +501,7 @@ async def test_streaming_response_list(self, async_client: AsyncNextbillionSDK) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncNextbillionSDK) -> None: document_template = await async_client.fleetify.document_templates.delete( @@ -510,7 +510,7 @@ async def test_method_delete(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(DocumentTemplateDeleteResponse, document_template, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.fleetify.document_templates.with_raw_response.delete( @@ -523,7 +523,7 @@ async def test_raw_response_delete(self, async_client: AsyncNextbillionSDK) -> N document_template = await response.parse() assert_matches_type(DocumentTemplateDeleteResponse, document_template, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.fleetify.document_templates.with_streaming_response.delete( @@ -538,7 +538,7 @@ async def test_streaming_response_delete(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_delete(self, async_client: AsyncNextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): diff --git a/tests/api_resources/fleetify/test_routes.py b/tests/api_resources/fleetify/test_routes.py index ceaedbe..4de5bdb 100644 --- a/tests/api_resources/fleetify/test_routes.py +++ b/tests/api_resources/fleetify/test_routes.py @@ -20,7 +20,7 @@ class TestRoutes: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create(self, client: NextbillionSDK) -> None: route = client.fleetify.routes.create( @@ -36,7 +36,7 @@ def test_method_create(self, client: NextbillionSDK) -> None: ) assert_matches_type(RouteCreateResponse, route, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_with_all_params(self, client: NextbillionSDK) -> None: route = client.fleetify.routes.create( @@ -77,7 +77,7 @@ def test_method_create_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(RouteCreateResponse, route, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create(self, client: NextbillionSDK) -> None: response = client.fleetify.routes.with_raw_response.create( @@ -97,7 +97,7 @@ def test_raw_response_create(self, client: NextbillionSDK) -> None: route = response.parse() assert_matches_type(RouteCreateResponse, route, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create(self, client: NextbillionSDK) -> None: with client.fleetify.routes.with_streaming_response.create( @@ -119,7 +119,7 @@ def test_streaming_response_create(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_redispatch(self, client: NextbillionSDK) -> None: route = client.fleetify.routes.redispatch( @@ -134,7 +134,7 @@ def test_method_redispatch(self, client: NextbillionSDK) -> None: ) assert_matches_type(RouteRedispatchResponse, route, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_redispatch_with_all_params(self, client: NextbillionSDK) -> None: route = client.fleetify.routes.redispatch( @@ -172,7 +172,7 @@ def test_method_redispatch_with_all_params(self, client: NextbillionSDK) -> None ) assert_matches_type(RouteRedispatchResponse, route, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_redispatch(self, client: NextbillionSDK) -> None: response = client.fleetify.routes.with_raw_response.redispatch( @@ -191,7 +191,7 @@ def test_raw_response_redispatch(self, client: NextbillionSDK) -> None: route = response.parse() assert_matches_type(RouteRedispatchResponse, route, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_redispatch(self, client: NextbillionSDK) -> None: with client.fleetify.routes.with_streaming_response.redispatch( @@ -212,7 +212,7 @@ def test_streaming_response_redispatch(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_path_params_redispatch(self, client: NextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): @@ -233,7 +233,7 @@ class TestAsyncRoutes: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncNextbillionSDK) -> None: route = await async_client.fleetify.routes.create( @@ -249,7 +249,7 @@ async def test_method_create(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(RouteCreateResponse, route, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: route = await async_client.fleetify.routes.create( @@ -290,7 +290,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncNextbillio ) assert_matches_type(RouteCreateResponse, route, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.fleetify.routes.with_raw_response.create( @@ -310,7 +310,7 @@ async def test_raw_response_create(self, async_client: AsyncNextbillionSDK) -> N route = await response.parse() assert_matches_type(RouteCreateResponse, route, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.fleetify.routes.with_streaming_response.create( @@ -332,7 +332,7 @@ async def test_streaming_response_create(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_redispatch(self, async_client: AsyncNextbillionSDK) -> None: route = await async_client.fleetify.routes.redispatch( @@ -347,7 +347,7 @@ async def test_method_redispatch(self, async_client: AsyncNextbillionSDK) -> Non ) assert_matches_type(RouteRedispatchResponse, route, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_redispatch_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: route = await async_client.fleetify.routes.redispatch( @@ -385,7 +385,7 @@ async def test_method_redispatch_with_all_params(self, async_client: AsyncNextbi ) assert_matches_type(RouteRedispatchResponse, route, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_redispatch(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.fleetify.routes.with_raw_response.redispatch( @@ -404,7 +404,7 @@ async def test_raw_response_redispatch(self, async_client: AsyncNextbillionSDK) route = await response.parse() assert_matches_type(RouteRedispatchResponse, route, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_redispatch(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.fleetify.routes.with_streaming_response.redispatch( @@ -425,7 +425,7 @@ async def test_streaming_response_redispatch(self, async_client: AsyncNextbillio assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_redispatch(self, async_client: AsyncNextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): diff --git a/tests/api_resources/geofence/test_batch.py b/tests/api_resources/geofence/test_batch.py index 45539f0..fe8c719 100644 --- a/tests/api_resources/geofence/test_batch.py +++ b/tests/api_resources/geofence/test_batch.py @@ -21,7 +21,7 @@ class TestBatch: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create(self, client: NextbillionSDK) -> None: batch = client.geofence.batch.create( @@ -29,7 +29,7 @@ def test_method_create(self, client: NextbillionSDK) -> None: ) assert_matches_type(BatchCreateResponse, batch, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_with_all_params(self, client: NextbillionSDK) -> None: batch = client.geofence.batch.create( @@ -67,7 +67,7 @@ def test_method_create_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(BatchCreateResponse, batch, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create(self, client: NextbillionSDK) -> None: response = client.geofence.batch.with_raw_response.create( @@ -79,7 +79,7 @@ def test_raw_response_create(self, client: NextbillionSDK) -> None: batch = response.parse() assert_matches_type(BatchCreateResponse, batch, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create(self, client: NextbillionSDK) -> None: with client.geofence.batch.with_streaming_response.create( @@ -93,7 +93,7 @@ def test_streaming_response_create(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list(self, client: NextbillionSDK) -> None: batch = client.geofence.batch.list( @@ -102,7 +102,7 @@ def test_method_list(self, client: NextbillionSDK) -> None: ) assert_matches_type(BatchListResponse, batch, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list(self, client: NextbillionSDK) -> None: response = client.geofence.batch.with_raw_response.list( @@ -115,7 +115,7 @@ def test_raw_response_list(self, client: NextbillionSDK) -> None: batch = response.parse() assert_matches_type(BatchListResponse, batch, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list(self, client: NextbillionSDK) -> None: with client.geofence.batch.with_streaming_response.list( @@ -130,7 +130,7 @@ def test_streaming_response_list(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete(self, client: NextbillionSDK) -> None: batch = client.geofence.batch.delete( @@ -138,7 +138,7 @@ def test_method_delete(self, client: NextbillionSDK) -> None: ) assert_matches_type(SimpleResp, batch, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete_with_all_params(self, client: NextbillionSDK) -> None: batch = client.geofence.batch.delete( @@ -147,7 +147,7 @@ def test_method_delete_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(SimpleResp, batch, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_delete(self, client: NextbillionSDK) -> None: response = client.geofence.batch.with_raw_response.delete( @@ -159,7 +159,7 @@ def test_raw_response_delete(self, client: NextbillionSDK) -> None: batch = response.parse() assert_matches_type(SimpleResp, batch, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_delete(self, client: NextbillionSDK) -> None: with client.geofence.batch.with_streaming_response.delete( @@ -179,7 +179,7 @@ class TestAsyncBatch: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncNextbillionSDK) -> None: batch = await async_client.geofence.batch.create( @@ -187,7 +187,7 @@ async def test_method_create(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(BatchCreateResponse, batch, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: batch = await async_client.geofence.batch.create( @@ -225,7 +225,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncNextbillio ) assert_matches_type(BatchCreateResponse, batch, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.geofence.batch.with_raw_response.create( @@ -237,7 +237,7 @@ async def test_raw_response_create(self, async_client: AsyncNextbillionSDK) -> N batch = await response.parse() assert_matches_type(BatchCreateResponse, batch, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.geofence.batch.with_streaming_response.create( @@ -251,7 +251,7 @@ async def test_streaming_response_create(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncNextbillionSDK) -> None: batch = await async_client.geofence.batch.list( @@ -260,7 +260,7 @@ async def test_method_list(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(BatchListResponse, batch, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.geofence.batch.with_raw_response.list( @@ -273,7 +273,7 @@ async def test_raw_response_list(self, async_client: AsyncNextbillionSDK) -> Non batch = await response.parse() assert_matches_type(BatchListResponse, batch, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.geofence.batch.with_streaming_response.list( @@ -288,7 +288,7 @@ async def test_streaming_response_list(self, async_client: AsyncNextbillionSDK) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncNextbillionSDK) -> None: batch = await async_client.geofence.batch.delete( @@ -296,7 +296,7 @@ async def test_method_delete(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(SimpleResp, batch, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: batch = await async_client.geofence.batch.delete( @@ -305,7 +305,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncNextbillio ) assert_matches_type(SimpleResp, batch, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.geofence.batch.with_raw_response.delete( @@ -317,7 +317,7 @@ async def test_raw_response_delete(self, async_client: AsyncNextbillionSDK) -> N batch = await response.parse() assert_matches_type(SimpleResp, batch, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.geofence.batch.with_streaming_response.delete( diff --git a/tests/api_resources/geofence/test_console.py b/tests/api_resources/geofence/test_console.py index 7e8290a..f109347 100644 --- a/tests/api_resources/geofence/test_console.py +++ b/tests/api_resources/geofence/test_console.py @@ -20,7 +20,7 @@ class TestConsole: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_preview(self, client: NextbillionSDK) -> None: console = client.geofence.console.preview( @@ -28,7 +28,7 @@ def test_method_preview(self, client: NextbillionSDK) -> None: ) assert_matches_type(ConsolePreviewResponse, console, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_preview_with_all_params(self, client: NextbillionSDK) -> None: console = client.geofence.console.preview( @@ -61,7 +61,7 @@ def test_method_preview_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(ConsolePreviewResponse, console, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_preview(self, client: NextbillionSDK) -> None: response = client.geofence.console.with_raw_response.preview( @@ -73,7 +73,7 @@ def test_raw_response_preview(self, client: NextbillionSDK) -> None: console = response.parse() assert_matches_type(ConsolePreviewResponse, console, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_preview(self, client: NextbillionSDK) -> None: with client.geofence.console.with_streaming_response.preview( @@ -87,7 +87,7 @@ def test_streaming_response_preview(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_search(self, client: NextbillionSDK) -> None: console = client.geofence.console.search( @@ -95,7 +95,7 @@ def test_method_search(self, client: NextbillionSDK) -> None: ) assert_matches_type(ConsoleSearchResponse, console, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_search(self, client: NextbillionSDK) -> None: response = client.geofence.console.with_raw_response.search( @@ -107,7 +107,7 @@ def test_raw_response_search(self, client: NextbillionSDK) -> None: console = response.parse() assert_matches_type(ConsoleSearchResponse, console, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_search(self, client: NextbillionSDK) -> None: with client.geofence.console.with_streaming_response.search( @@ -127,7 +127,7 @@ class TestAsyncConsole: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_preview(self, async_client: AsyncNextbillionSDK) -> None: console = await async_client.geofence.console.preview( @@ -135,7 +135,7 @@ async def test_method_preview(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(ConsolePreviewResponse, console, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_preview_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: console = await async_client.geofence.console.preview( @@ -168,7 +168,7 @@ async def test_method_preview_with_all_params(self, async_client: AsyncNextbilli ) assert_matches_type(ConsolePreviewResponse, console, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_preview(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.geofence.console.with_raw_response.preview( @@ -180,7 +180,7 @@ async def test_raw_response_preview(self, async_client: AsyncNextbillionSDK) -> console = await response.parse() assert_matches_type(ConsolePreviewResponse, console, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_preview(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.geofence.console.with_streaming_response.preview( @@ -194,7 +194,7 @@ async def test_streaming_response_preview(self, async_client: AsyncNextbillionSD assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_search(self, async_client: AsyncNextbillionSDK) -> None: console = await async_client.geofence.console.search( @@ -202,7 +202,7 @@ async def test_method_search(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(ConsoleSearchResponse, console, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_search(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.geofence.console.with_raw_response.search( @@ -214,7 +214,7 @@ async def test_raw_response_search(self, async_client: AsyncNextbillionSDK) -> N console = await response.parse() assert_matches_type(ConsoleSearchResponse, console, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_search(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.geofence.console.with_streaming_response.search( diff --git a/tests/api_resources/multigeocode/test_place.py b/tests/api_resources/multigeocode/test_place.py index d596a4a..a880272 100644 --- a/tests/api_resources/multigeocode/test_place.py +++ b/tests/api_resources/multigeocode/test_place.py @@ -22,7 +22,7 @@ class TestPlace: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create(self, client: NextbillionSDK) -> None: place = client.multigeocode.place.create( @@ -31,7 +31,7 @@ def test_method_create(self, client: NextbillionSDK) -> None: ) assert_matches_type(PlaceCreateResponse, place, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_with_all_params(self, client: NextbillionSDK) -> None: place = client.multigeocode.place.create( @@ -65,7 +65,7 @@ def test_method_create_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(PlaceCreateResponse, place, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create(self, client: NextbillionSDK) -> None: response = client.multigeocode.place.with_raw_response.create( @@ -78,7 +78,7 @@ def test_raw_response_create(self, client: NextbillionSDK) -> None: place = response.parse() assert_matches_type(PlaceCreateResponse, place, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create(self, client: NextbillionSDK) -> None: with client.multigeocode.place.with_streaming_response.create( @@ -93,7 +93,7 @@ def test_streaming_response_create(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve(self, client: NextbillionSDK) -> None: place = client.multigeocode.place.retrieve( @@ -102,7 +102,7 @@ def test_method_retrieve(self, client: NextbillionSDK) -> None: ) assert_matches_type(PlaceRetrieveResponse, place, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: NextbillionSDK) -> None: response = client.multigeocode.place.with_raw_response.retrieve( @@ -115,7 +115,7 @@ def test_raw_response_retrieve(self, client: NextbillionSDK) -> None: place = response.parse() assert_matches_type(PlaceRetrieveResponse, place, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: NextbillionSDK) -> None: with client.multigeocode.place.with_streaming_response.retrieve( @@ -130,7 +130,7 @@ def test_streaming_response_retrieve(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_path_params_retrieve(self, client: NextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `doc_id` but received ''"): @@ -139,7 +139,7 @@ def test_path_params_retrieve(self, client: NextbillionSDK) -> None: key="key=API_KEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update(self, client: NextbillionSDK) -> None: place = client.multigeocode.place.update( @@ -148,7 +148,7 @@ def test_method_update(self, client: NextbillionSDK) -> None: ) assert_matches_type(PlaceUpdateResponse, place, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update_with_all_params(self, client: NextbillionSDK) -> None: place = client.multigeocode.place.update( @@ -182,7 +182,7 @@ def test_method_update_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(PlaceUpdateResponse, place, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_update(self, client: NextbillionSDK) -> None: response = client.multigeocode.place.with_raw_response.update( @@ -195,7 +195,7 @@ def test_raw_response_update(self, client: NextbillionSDK) -> None: place = response.parse() assert_matches_type(PlaceUpdateResponse, place, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_update(self, client: NextbillionSDK) -> None: with client.multigeocode.place.with_streaming_response.update( @@ -210,7 +210,7 @@ def test_streaming_response_update(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_path_params_update(self, client: NextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `doc_id` but received ''"): @@ -219,7 +219,7 @@ def test_path_params_update(self, client: NextbillionSDK) -> None: key="key=API_KEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete(self, client: NextbillionSDK) -> None: place = client.multigeocode.place.delete( @@ -228,7 +228,7 @@ def test_method_delete(self, client: NextbillionSDK) -> None: ) assert_matches_type(PlaceDeleteResponse, place, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_delete(self, client: NextbillionSDK) -> None: response = client.multigeocode.place.with_raw_response.delete( @@ -241,7 +241,7 @@ def test_raw_response_delete(self, client: NextbillionSDK) -> None: place = response.parse() assert_matches_type(PlaceDeleteResponse, place, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_delete(self, client: NextbillionSDK) -> None: with client.multigeocode.place.with_streaming_response.delete( @@ -256,7 +256,7 @@ def test_streaming_response_delete(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_path_params_delete(self, client: NextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `doc_id` but received ''"): @@ -271,7 +271,7 @@ class TestAsyncPlace: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncNextbillionSDK) -> None: place = await async_client.multigeocode.place.create( @@ -280,7 +280,7 @@ async def test_method_create(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(PlaceCreateResponse, place, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: place = await async_client.multigeocode.place.create( @@ -314,7 +314,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncNextbillio ) assert_matches_type(PlaceCreateResponse, place, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.multigeocode.place.with_raw_response.create( @@ -327,7 +327,7 @@ async def test_raw_response_create(self, async_client: AsyncNextbillionSDK) -> N place = await response.parse() assert_matches_type(PlaceCreateResponse, place, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.multigeocode.place.with_streaming_response.create( @@ -342,7 +342,7 @@ async def test_streaming_response_create(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve(self, async_client: AsyncNextbillionSDK) -> None: place = await async_client.multigeocode.place.retrieve( @@ -351,7 +351,7 @@ async def test_method_retrieve(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(PlaceRetrieveResponse, place, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.multigeocode.place.with_raw_response.retrieve( @@ -364,7 +364,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncNextbillionSDK) -> place = await response.parse() assert_matches_type(PlaceRetrieveResponse, place, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.multigeocode.place.with_streaming_response.retrieve( @@ -379,7 +379,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncNextbillionS assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_retrieve(self, async_client: AsyncNextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `doc_id` but received ''"): @@ -388,7 +388,7 @@ async def test_path_params_retrieve(self, async_client: AsyncNextbillionSDK) -> key="key=API_KEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update(self, async_client: AsyncNextbillionSDK) -> None: place = await async_client.multigeocode.place.update( @@ -397,7 +397,7 @@ async def test_method_update(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(PlaceUpdateResponse, place, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: place = await async_client.multigeocode.place.update( @@ -431,7 +431,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncNextbillio ) assert_matches_type(PlaceUpdateResponse, place, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_update(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.multigeocode.place.with_raw_response.update( @@ -444,7 +444,7 @@ async def test_raw_response_update(self, async_client: AsyncNextbillionSDK) -> N place = await response.parse() assert_matches_type(PlaceUpdateResponse, place, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_update(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.multigeocode.place.with_streaming_response.update( @@ -459,7 +459,7 @@ async def test_streaming_response_update(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_update(self, async_client: AsyncNextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `doc_id` but received ''"): @@ -468,7 +468,7 @@ async def test_path_params_update(self, async_client: AsyncNextbillionSDK) -> No key="key=API_KEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncNextbillionSDK) -> None: place = await async_client.multigeocode.place.delete( @@ -477,7 +477,7 @@ async def test_method_delete(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(PlaceDeleteResponse, place, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.multigeocode.place.with_raw_response.delete( @@ -490,7 +490,7 @@ async def test_raw_response_delete(self, async_client: AsyncNextbillionSDK) -> N place = await response.parse() assert_matches_type(PlaceDeleteResponse, place, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.multigeocode.place.with_streaming_response.delete( @@ -505,7 +505,7 @@ async def test_streaming_response_delete(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_delete(self, async_client: AsyncNextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `doc_id` but received ''"): diff --git a/tests/api_resources/optimization/test_driver_assignment.py b/tests/api_resources/optimization/test_driver_assignment.py index 3e82882..a4d69b0 100644 --- a/tests/api_resources/optimization/test_driver_assignment.py +++ b/tests/api_resources/optimization/test_driver_assignment.py @@ -17,7 +17,7 @@ class TestDriverAssignment: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_assign(self, client: NextbillionSDK) -> None: driver_assignment = client.optimization.driver_assignment.assign( @@ -41,7 +41,7 @@ def test_method_assign(self, client: NextbillionSDK) -> None: ) assert_matches_type(DriverAssignmentAssignResponse, driver_assignment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_assign_with_all_params(self, client: NextbillionSDK) -> None: driver_assignment = client.optimization.driver_assignment.assign( @@ -133,7 +133,7 @@ def test_method_assign_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(DriverAssignmentAssignResponse, driver_assignment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_assign(self, client: NextbillionSDK) -> None: response = client.optimization.driver_assignment.with_raw_response.assign( @@ -161,7 +161,7 @@ def test_raw_response_assign(self, client: NextbillionSDK) -> None: driver_assignment = response.parse() assert_matches_type(DriverAssignmentAssignResponse, driver_assignment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_assign(self, client: NextbillionSDK) -> None: with client.optimization.driver_assignment.with_streaming_response.assign( @@ -197,7 +197,7 @@ class TestAsyncDriverAssignment: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_assign(self, async_client: AsyncNextbillionSDK) -> None: driver_assignment = await async_client.optimization.driver_assignment.assign( @@ -221,7 +221,7 @@ async def test_method_assign(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(DriverAssignmentAssignResponse, driver_assignment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_assign_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: driver_assignment = await async_client.optimization.driver_assignment.assign( @@ -313,7 +313,7 @@ async def test_method_assign_with_all_params(self, async_client: AsyncNextbillio ) assert_matches_type(DriverAssignmentAssignResponse, driver_assignment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_assign(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.optimization.driver_assignment.with_raw_response.assign( @@ -341,7 +341,7 @@ async def test_raw_response_assign(self, async_client: AsyncNextbillionSDK) -> N driver_assignment = await response.parse() assert_matches_type(DriverAssignmentAssignResponse, driver_assignment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_assign(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.optimization.driver_assignment.with_streaming_response.assign( diff --git a/tests/api_resources/optimization/test_v2.py b/tests/api_resources/optimization/test_v2.py index 8938ae3..9d3210c 100644 --- a/tests/api_resources/optimization/test_v2.py +++ b/tests/api_resources/optimization/test_v2.py @@ -18,7 +18,7 @@ class TestV2: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve_result(self, client: NextbillionSDK) -> None: v2 = client.optimization.v2.retrieve_result( @@ -27,7 +27,7 @@ def test_method_retrieve_result(self, client: NextbillionSDK) -> None: ) assert_matches_type(V2RetrieveResultResponse, v2, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve_result(self, client: NextbillionSDK) -> None: response = client.optimization.v2.with_raw_response.retrieve_result( @@ -40,7 +40,7 @@ def test_raw_response_retrieve_result(self, client: NextbillionSDK) -> None: v2 = response.parse() assert_matches_type(V2RetrieveResultResponse, v2, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve_result(self, client: NextbillionSDK) -> None: with client.optimization.v2.with_streaming_response.retrieve_result( @@ -55,7 +55,7 @@ def test_streaming_response_retrieve_result(self, client: NextbillionSDK) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_submit(self, client: NextbillionSDK) -> None: v2 = client.optimization.v2.submit( @@ -73,7 +73,7 @@ def test_method_submit(self, client: NextbillionSDK) -> None: ) assert_matches_type(PostResponse, v2, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_submit_with_all_params(self, client: NextbillionSDK) -> None: v2 = client.optimization.v2.submit( @@ -294,7 +294,7 @@ def test_method_submit_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(PostResponse, v2, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_submit(self, client: NextbillionSDK) -> None: response = client.optimization.v2.with_raw_response.submit( @@ -316,7 +316,7 @@ def test_raw_response_submit(self, client: NextbillionSDK) -> None: v2 = response.parse() assert_matches_type(PostResponse, v2, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_submit(self, client: NextbillionSDK) -> None: with client.optimization.v2.with_streaming_response.submit( @@ -346,7 +346,7 @@ class TestAsyncV2: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve_result(self, async_client: AsyncNextbillionSDK) -> None: v2 = await async_client.optimization.v2.retrieve_result( @@ -355,7 +355,7 @@ async def test_method_retrieve_result(self, async_client: AsyncNextbillionSDK) - ) assert_matches_type(V2RetrieveResultResponse, v2, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve_result(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.optimization.v2.with_raw_response.retrieve_result( @@ -368,7 +368,7 @@ async def test_raw_response_retrieve_result(self, async_client: AsyncNextbillion v2 = await response.parse() assert_matches_type(V2RetrieveResultResponse, v2, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve_result(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.optimization.v2.with_streaming_response.retrieve_result( @@ -383,7 +383,7 @@ async def test_streaming_response_retrieve_result(self, async_client: AsyncNextb assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_submit(self, async_client: AsyncNextbillionSDK) -> None: v2 = await async_client.optimization.v2.submit( @@ -401,7 +401,7 @@ async def test_method_submit(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(PostResponse, v2, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_submit_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: v2 = await async_client.optimization.v2.submit( @@ -622,7 +622,7 @@ async def test_method_submit_with_all_params(self, async_client: AsyncNextbillio ) assert_matches_type(PostResponse, v2, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_submit(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.optimization.v2.with_raw_response.submit( @@ -644,7 +644,7 @@ async def test_raw_response_submit(self, async_client: AsyncNextbillionSDK) -> N v2 = await response.parse() assert_matches_type(PostResponse, v2, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_submit(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.optimization.v2.with_streaming_response.submit( diff --git a/tests/api_resources/skynet/asset/test_event.py b/tests/api_resources/skynet/asset/test_event.py index a4830d2..16e7c9d 100644 --- a/tests/api_resources/skynet/asset/test_event.py +++ b/tests/api_resources/skynet/asset/test_event.py @@ -17,7 +17,7 @@ class TestEvent: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list(self, client: NextbillionSDK) -> None: event = client.skynet.asset.event.list( @@ -26,7 +26,7 @@ def test_method_list(self, client: NextbillionSDK) -> None: ) assert_matches_type(EventListResponse, event, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_with_all_params(self, client: NextbillionSDK) -> None: event = client.skynet.asset.event.list( @@ -41,7 +41,7 @@ def test_method_list_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(EventListResponse, event, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list(self, client: NextbillionSDK) -> None: response = client.skynet.asset.event.with_raw_response.list( @@ -54,7 +54,7 @@ def test_raw_response_list(self, client: NextbillionSDK) -> None: event = response.parse() assert_matches_type(EventListResponse, event, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list(self, client: NextbillionSDK) -> None: with client.skynet.asset.event.with_streaming_response.list( @@ -69,7 +69,7 @@ def test_streaming_response_list(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_path_params_list(self, client: NextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -84,7 +84,7 @@ class TestAsyncEvent: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncNextbillionSDK) -> None: event = await async_client.skynet.asset.event.list( @@ -93,7 +93,7 @@ async def test_method_list(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(EventListResponse, event, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: event = await async_client.skynet.asset.event.list( @@ -108,7 +108,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncNextbillionS ) assert_matches_type(EventListResponse, event, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.asset.event.with_raw_response.list( @@ -121,7 +121,7 @@ async def test_raw_response_list(self, async_client: AsyncNextbillionSDK) -> Non event = await response.parse() assert_matches_type(EventListResponse, event, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.asset.event.with_streaming_response.list( @@ -136,7 +136,7 @@ async def test_streaming_response_list(self, async_client: AsyncNextbillionSDK) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_list(self, async_client: AsyncNextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): diff --git a/tests/api_resources/skynet/asset/test_location.py b/tests/api_resources/skynet/asset/test_location.py index 6c127be..118255f 100644 --- a/tests/api_resources/skynet/asset/test_location.py +++ b/tests/api_resources/skynet/asset/test_location.py @@ -20,7 +20,7 @@ class TestLocation: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list(self, client: NextbillionSDK) -> None: location = client.skynet.asset.location.list( @@ -29,7 +29,7 @@ def test_method_list(self, client: NextbillionSDK) -> None: ) assert_matches_type(LocationListResponse, location, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_with_all_params(self, client: NextbillionSDK) -> None: location = client.skynet.asset.location.list( @@ -45,7 +45,7 @@ def test_method_list_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(LocationListResponse, location, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list(self, client: NextbillionSDK) -> None: response = client.skynet.asset.location.with_raw_response.list( @@ -58,7 +58,7 @@ def test_raw_response_list(self, client: NextbillionSDK) -> None: location = response.parse() assert_matches_type(LocationListResponse, location, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list(self, client: NextbillionSDK) -> None: with client.skynet.asset.location.with_streaming_response.list( @@ -73,7 +73,7 @@ def test_streaming_response_list(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_path_params_list(self, client: NextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -82,7 +82,7 @@ def test_path_params_list(self, client: NextbillionSDK) -> None: key="key=API_KEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_get_last(self, client: NextbillionSDK) -> None: location = client.skynet.asset.location.get_last( @@ -91,7 +91,7 @@ def test_method_get_last(self, client: NextbillionSDK) -> None: ) assert_matches_type(LocationGetLastResponse, location, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_get_last_with_all_params(self, client: NextbillionSDK) -> None: location = client.skynet.asset.location.get_last( @@ -101,7 +101,7 @@ def test_method_get_last_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(LocationGetLastResponse, location, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_get_last(self, client: NextbillionSDK) -> None: response = client.skynet.asset.location.with_raw_response.get_last( @@ -114,7 +114,7 @@ def test_raw_response_get_last(self, client: NextbillionSDK) -> None: location = response.parse() assert_matches_type(LocationGetLastResponse, location, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_get_last(self, client: NextbillionSDK) -> None: with client.skynet.asset.location.with_streaming_response.get_last( @@ -129,7 +129,7 @@ def test_streaming_response_get_last(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_path_params_get_last(self, client: NextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -144,7 +144,7 @@ class TestAsyncLocation: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncNextbillionSDK) -> None: location = await async_client.skynet.asset.location.list( @@ -153,7 +153,7 @@ async def test_method_list(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(LocationListResponse, location, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: location = await async_client.skynet.asset.location.list( @@ -169,7 +169,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncNextbillionS ) assert_matches_type(LocationListResponse, location, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.asset.location.with_raw_response.list( @@ -182,7 +182,7 @@ async def test_raw_response_list(self, async_client: AsyncNextbillionSDK) -> Non location = await response.parse() assert_matches_type(LocationListResponse, location, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.asset.location.with_streaming_response.list( @@ -197,7 +197,7 @@ async def test_streaming_response_list(self, async_client: AsyncNextbillionSDK) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_list(self, async_client: AsyncNextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -206,7 +206,7 @@ async def test_path_params_list(self, async_client: AsyncNextbillionSDK) -> None key="key=API_KEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_get_last(self, async_client: AsyncNextbillionSDK) -> None: location = await async_client.skynet.asset.location.get_last( @@ -215,7 +215,7 @@ async def test_method_get_last(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(LocationGetLastResponse, location, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_get_last_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: location = await async_client.skynet.asset.location.get_last( @@ -225,7 +225,7 @@ async def test_method_get_last_with_all_params(self, async_client: AsyncNextbill ) assert_matches_type(LocationGetLastResponse, location, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_get_last(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.asset.location.with_raw_response.get_last( @@ -238,7 +238,7 @@ async def test_raw_response_get_last(self, async_client: AsyncNextbillionSDK) -> location = await response.parse() assert_matches_type(LocationGetLastResponse, location, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_get_last(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.asset.location.with_streaming_response.get_last( @@ -253,7 +253,7 @@ async def test_streaming_response_get_last(self, async_client: AsyncNextbillionS assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_get_last(self, async_client: AsyncNextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): diff --git a/tests/api_resources/skynet/search/test_polygon.py b/tests/api_resources/skynet/search/test_polygon.py index a5c559b..b452a8c 100644 --- a/tests/api_resources/skynet/search/test_polygon.py +++ b/tests/api_resources/skynet/search/test_polygon.py @@ -17,7 +17,7 @@ class TestPolygon: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create(self, client: NextbillionSDK) -> None: polygon = client.skynet.search.polygon.create( @@ -29,7 +29,7 @@ def test_method_create(self, client: NextbillionSDK) -> None: ) assert_matches_type(SearchResponse, polygon, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_with_all_params(self, client: NextbillionSDK) -> None: polygon = client.skynet.search.polygon.create( @@ -57,7 +57,7 @@ def test_method_create_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(SearchResponse, polygon, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create(self, client: NextbillionSDK) -> None: response = client.skynet.search.polygon.with_raw_response.create( @@ -73,7 +73,7 @@ def test_raw_response_create(self, client: NextbillionSDK) -> None: polygon = response.parse() assert_matches_type(SearchResponse, polygon, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create(self, client: NextbillionSDK) -> None: with client.skynet.search.polygon.with_streaming_response.create( @@ -91,7 +91,7 @@ def test_streaming_response_create(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_get(self, client: NextbillionSDK) -> None: polygon = client.skynet.search.polygon.get( @@ -100,7 +100,7 @@ def test_method_get(self, client: NextbillionSDK) -> None: ) assert_matches_type(SearchResponse, polygon, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_get_with_all_params(self, client: NextbillionSDK) -> None: polygon = client.skynet.search.polygon.get( @@ -118,7 +118,7 @@ def test_method_get_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(SearchResponse, polygon, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_get(self, client: NextbillionSDK) -> None: response = client.skynet.search.polygon.with_raw_response.get( @@ -131,7 +131,7 @@ def test_raw_response_get(self, client: NextbillionSDK) -> None: polygon = response.parse() assert_matches_type(SearchResponse, polygon, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_get(self, client: NextbillionSDK) -> None: with client.skynet.search.polygon.with_streaming_response.get( @@ -152,7 +152,7 @@ class TestAsyncPolygon: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncNextbillionSDK) -> None: polygon = await async_client.skynet.search.polygon.create( @@ -164,7 +164,7 @@ async def test_method_create(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(SearchResponse, polygon, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: polygon = await async_client.skynet.search.polygon.create( @@ -192,7 +192,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncNextbillio ) assert_matches_type(SearchResponse, polygon, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.search.polygon.with_raw_response.create( @@ -208,7 +208,7 @@ async def test_raw_response_create(self, async_client: AsyncNextbillionSDK) -> N polygon = await response.parse() assert_matches_type(SearchResponse, polygon, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.search.polygon.with_streaming_response.create( @@ -226,7 +226,7 @@ async def test_streaming_response_create(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_get(self, async_client: AsyncNextbillionSDK) -> None: polygon = await async_client.skynet.search.polygon.get( @@ -235,7 +235,7 @@ async def test_method_get(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(SearchResponse, polygon, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_get_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: polygon = await async_client.skynet.search.polygon.get( @@ -253,7 +253,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncNextbillionSD ) assert_matches_type(SearchResponse, polygon, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_get(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.search.polygon.with_raw_response.get( @@ -266,7 +266,7 @@ async def test_raw_response_get(self, async_client: AsyncNextbillionSDK) -> None polygon = await response.parse() assert_matches_type(SearchResponse, polygon, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_get(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.search.polygon.with_streaming_response.get( diff --git a/tests/api_resources/skynet/test_asset.py b/tests/api_resources/skynet/test_asset.py index 3f4ef49..7e4f63e 100644 --- a/tests/api_resources/skynet/test_asset.py +++ b/tests/api_resources/skynet/test_asset.py @@ -22,7 +22,7 @@ class TestAsset: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create(self, client: NextbillionSDK) -> None: asset = client.skynet.asset.create( @@ -30,7 +30,7 @@ def test_method_create(self, client: NextbillionSDK) -> None: ) assert_matches_type(AssetCreateResponse, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_with_all_params(self, client: NextbillionSDK) -> None: asset = client.skynet.asset.create( @@ -45,7 +45,7 @@ def test_method_create_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(AssetCreateResponse, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create(self, client: NextbillionSDK) -> None: response = client.skynet.asset.with_raw_response.create( @@ -57,7 +57,7 @@ def test_raw_response_create(self, client: NextbillionSDK) -> None: asset = response.parse() assert_matches_type(AssetCreateResponse, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create(self, client: NextbillionSDK) -> None: with client.skynet.asset.with_streaming_response.create( @@ -71,7 +71,7 @@ def test_streaming_response_create(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve(self, client: NextbillionSDK) -> None: asset = client.skynet.asset.retrieve( @@ -80,7 +80,7 @@ def test_method_retrieve(self, client: NextbillionSDK) -> None: ) assert_matches_type(AssetRetrieveResponse, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve_with_all_params(self, client: NextbillionSDK) -> None: asset = client.skynet.asset.retrieve( @@ -90,7 +90,7 @@ def test_method_retrieve_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(AssetRetrieveResponse, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: NextbillionSDK) -> None: response = client.skynet.asset.with_raw_response.retrieve( @@ -103,7 +103,7 @@ def test_raw_response_retrieve(self, client: NextbillionSDK) -> None: asset = response.parse() assert_matches_type(AssetRetrieveResponse, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: NextbillionSDK) -> None: with client.skynet.asset.with_streaming_response.retrieve( @@ -118,7 +118,7 @@ def test_streaming_response_retrieve(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_path_params_retrieve(self, client: NextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -127,7 +127,7 @@ def test_path_params_retrieve(self, client: NextbillionSDK) -> None: key="key=API_KEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update(self, client: NextbillionSDK) -> None: asset = client.skynet.asset.update( @@ -136,7 +136,7 @@ def test_method_update(self, client: NextbillionSDK) -> None: ) assert_matches_type(SimpleResp, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update_with_all_params(self, client: NextbillionSDK) -> None: asset = client.skynet.asset.update( @@ -151,7 +151,7 @@ def test_method_update_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(SimpleResp, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_update(self, client: NextbillionSDK) -> None: response = client.skynet.asset.with_raw_response.update( @@ -164,7 +164,7 @@ def test_raw_response_update(self, client: NextbillionSDK) -> None: asset = response.parse() assert_matches_type(SimpleResp, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_update(self, client: NextbillionSDK) -> None: with client.skynet.asset.with_streaming_response.update( @@ -179,7 +179,7 @@ def test_streaming_response_update(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_path_params_update(self, client: NextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -188,7 +188,7 @@ def test_path_params_update(self, client: NextbillionSDK) -> None: key="key=API_KEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list(self, client: NextbillionSDK) -> None: asset = client.skynet.asset.list( @@ -196,7 +196,7 @@ def test_method_list(self, client: NextbillionSDK) -> None: ) assert_matches_type(AssetListResponse, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_with_all_params(self, client: NextbillionSDK) -> None: asset = client.skynet.asset.list( @@ -211,7 +211,7 @@ def test_method_list_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(AssetListResponse, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list(self, client: NextbillionSDK) -> None: response = client.skynet.asset.with_raw_response.list( @@ -223,7 +223,7 @@ def test_raw_response_list(self, client: NextbillionSDK) -> None: asset = response.parse() assert_matches_type(AssetListResponse, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list(self, client: NextbillionSDK) -> None: with client.skynet.asset.with_streaming_response.list( @@ -237,7 +237,7 @@ def test_streaming_response_list(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete(self, client: NextbillionSDK) -> None: asset = client.skynet.asset.delete( @@ -246,7 +246,7 @@ def test_method_delete(self, client: NextbillionSDK) -> None: ) assert_matches_type(SimpleResp, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete_with_all_params(self, client: NextbillionSDK) -> None: asset = client.skynet.asset.delete( @@ -256,7 +256,7 @@ def test_method_delete_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(SimpleResp, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_delete(self, client: NextbillionSDK) -> None: response = client.skynet.asset.with_raw_response.delete( @@ -269,7 +269,7 @@ def test_raw_response_delete(self, client: NextbillionSDK) -> None: asset = response.parse() assert_matches_type(SimpleResp, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_delete(self, client: NextbillionSDK) -> None: with client.skynet.asset.with_streaming_response.delete( @@ -284,7 +284,7 @@ def test_streaming_response_delete(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_path_params_delete(self, client: NextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -293,7 +293,7 @@ def test_path_params_delete(self, client: NextbillionSDK) -> None: key="key=API_KEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_bind(self, client: NextbillionSDK) -> None: asset = client.skynet.asset.bind( @@ -303,7 +303,7 @@ def test_method_bind(self, client: NextbillionSDK) -> None: ) assert_matches_type(SimpleResp, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_bind(self, client: NextbillionSDK) -> None: response = client.skynet.asset.with_raw_response.bind( @@ -317,7 +317,7 @@ def test_raw_response_bind(self, client: NextbillionSDK) -> None: asset = response.parse() assert_matches_type(SimpleResp, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_bind(self, client: NextbillionSDK) -> None: with client.skynet.asset.with_streaming_response.bind( @@ -333,7 +333,7 @@ def test_streaming_response_bind(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_path_params_bind(self, client: NextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -343,7 +343,7 @@ def test_path_params_bind(self, client: NextbillionSDK) -> None: device_id="device_id", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_track(self, client: NextbillionSDK) -> None: asset = client.skynet.asset.track( @@ -360,7 +360,7 @@ def test_method_track(self, client: NextbillionSDK) -> None: ) assert_matches_type(SimpleResp, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_track_with_all_params(self, client: NextbillionSDK) -> None: asset = client.skynet.asset.track( @@ -385,7 +385,7 @@ def test_method_track_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(SimpleResp, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_track(self, client: NextbillionSDK) -> None: response = client.skynet.asset.with_raw_response.track( @@ -406,7 +406,7 @@ def test_raw_response_track(self, client: NextbillionSDK) -> None: asset = response.parse() assert_matches_type(SimpleResp, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_track(self, client: NextbillionSDK) -> None: with client.skynet.asset.with_streaming_response.track( @@ -429,7 +429,7 @@ def test_streaming_response_track(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_path_params_track(self, client: NextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -446,7 +446,7 @@ def test_path_params_track(self, client: NextbillionSDK) -> None: }, ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update_attributes(self, client: NextbillionSDK) -> None: asset = client.skynet.asset.update_attributes( @@ -456,7 +456,7 @@ def test_method_update_attributes(self, client: NextbillionSDK) -> None: ) assert_matches_type(SimpleResp, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_update_attributes(self, client: NextbillionSDK) -> None: response = client.skynet.asset.with_raw_response.update_attributes( @@ -470,7 +470,7 @@ def test_raw_response_update_attributes(self, client: NextbillionSDK) -> None: asset = response.parse() assert_matches_type(SimpleResp, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_update_attributes(self, client: NextbillionSDK) -> None: with client.skynet.asset.with_streaming_response.update_attributes( @@ -486,7 +486,7 @@ def test_streaming_response_update_attributes(self, client: NextbillionSDK) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_path_params_update_attributes(self, client: NextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -502,7 +502,7 @@ class TestAsyncAsset: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncNextbillionSDK) -> None: asset = await async_client.skynet.asset.create( @@ -510,7 +510,7 @@ async def test_method_create(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(AssetCreateResponse, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: asset = await async_client.skynet.asset.create( @@ -525,7 +525,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncNextbillio ) assert_matches_type(AssetCreateResponse, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.asset.with_raw_response.create( @@ -537,7 +537,7 @@ async def test_raw_response_create(self, async_client: AsyncNextbillionSDK) -> N asset = await response.parse() assert_matches_type(AssetCreateResponse, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.asset.with_streaming_response.create( @@ -551,7 +551,7 @@ async def test_streaming_response_create(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve(self, async_client: AsyncNextbillionSDK) -> None: asset = await async_client.skynet.asset.retrieve( @@ -560,7 +560,7 @@ async def test_method_retrieve(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(AssetRetrieveResponse, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: asset = await async_client.skynet.asset.retrieve( @@ -570,7 +570,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncNextbill ) assert_matches_type(AssetRetrieveResponse, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.asset.with_raw_response.retrieve( @@ -583,7 +583,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncNextbillionSDK) -> asset = await response.parse() assert_matches_type(AssetRetrieveResponse, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.asset.with_streaming_response.retrieve( @@ -598,7 +598,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncNextbillionS assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_retrieve(self, async_client: AsyncNextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -607,7 +607,7 @@ async def test_path_params_retrieve(self, async_client: AsyncNextbillionSDK) -> key="key=API_KEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update(self, async_client: AsyncNextbillionSDK) -> None: asset = await async_client.skynet.asset.update( @@ -616,7 +616,7 @@ async def test_method_update(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(SimpleResp, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: asset = await async_client.skynet.asset.update( @@ -631,7 +631,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncNextbillio ) assert_matches_type(SimpleResp, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_update(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.asset.with_raw_response.update( @@ -644,7 +644,7 @@ async def test_raw_response_update(self, async_client: AsyncNextbillionSDK) -> N asset = await response.parse() assert_matches_type(SimpleResp, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_update(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.asset.with_streaming_response.update( @@ -659,7 +659,7 @@ async def test_streaming_response_update(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_update(self, async_client: AsyncNextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -668,7 +668,7 @@ async def test_path_params_update(self, async_client: AsyncNextbillionSDK) -> No key="key=API_KEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncNextbillionSDK) -> None: asset = await async_client.skynet.asset.list( @@ -676,7 +676,7 @@ async def test_method_list(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(AssetListResponse, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: asset = await async_client.skynet.asset.list( @@ -691,7 +691,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncNextbillionS ) assert_matches_type(AssetListResponse, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.asset.with_raw_response.list( @@ -703,7 +703,7 @@ async def test_raw_response_list(self, async_client: AsyncNextbillionSDK) -> Non asset = await response.parse() assert_matches_type(AssetListResponse, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.asset.with_streaming_response.list( @@ -717,7 +717,7 @@ async def test_streaming_response_list(self, async_client: AsyncNextbillionSDK) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncNextbillionSDK) -> None: asset = await async_client.skynet.asset.delete( @@ -726,7 +726,7 @@ async def test_method_delete(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(SimpleResp, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: asset = await async_client.skynet.asset.delete( @@ -736,7 +736,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncNextbillio ) assert_matches_type(SimpleResp, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.asset.with_raw_response.delete( @@ -749,7 +749,7 @@ async def test_raw_response_delete(self, async_client: AsyncNextbillionSDK) -> N asset = await response.parse() assert_matches_type(SimpleResp, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.asset.with_streaming_response.delete( @@ -764,7 +764,7 @@ async def test_streaming_response_delete(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_delete(self, async_client: AsyncNextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -773,7 +773,7 @@ async def test_path_params_delete(self, async_client: AsyncNextbillionSDK) -> No key="key=API_KEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_bind(self, async_client: AsyncNextbillionSDK) -> None: asset = await async_client.skynet.asset.bind( @@ -783,7 +783,7 @@ async def test_method_bind(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(SimpleResp, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_bind(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.asset.with_raw_response.bind( @@ -797,7 +797,7 @@ async def test_raw_response_bind(self, async_client: AsyncNextbillionSDK) -> Non asset = await response.parse() assert_matches_type(SimpleResp, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_bind(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.asset.with_streaming_response.bind( @@ -813,7 +813,7 @@ async def test_streaming_response_bind(self, async_client: AsyncNextbillionSDK) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_bind(self, async_client: AsyncNextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -823,7 +823,7 @@ async def test_path_params_bind(self, async_client: AsyncNextbillionSDK) -> None device_id="device_id", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_track(self, async_client: AsyncNextbillionSDK) -> None: asset = await async_client.skynet.asset.track( @@ -840,7 +840,7 @@ async def test_method_track(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(SimpleResp, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_track_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: asset = await async_client.skynet.asset.track( @@ -865,7 +865,7 @@ async def test_method_track_with_all_params(self, async_client: AsyncNextbillion ) assert_matches_type(SimpleResp, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_track(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.asset.with_raw_response.track( @@ -886,7 +886,7 @@ async def test_raw_response_track(self, async_client: AsyncNextbillionSDK) -> No asset = await response.parse() assert_matches_type(SimpleResp, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_track(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.asset.with_streaming_response.track( @@ -909,7 +909,7 @@ async def test_streaming_response_track(self, async_client: AsyncNextbillionSDK) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_track(self, async_client: AsyncNextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -926,7 +926,7 @@ async def test_path_params_track(self, async_client: AsyncNextbillionSDK) -> Non }, ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update_attributes(self, async_client: AsyncNextbillionSDK) -> None: asset = await async_client.skynet.asset.update_attributes( @@ -936,7 +936,7 @@ async def test_method_update_attributes(self, async_client: AsyncNextbillionSDK) ) assert_matches_type(SimpleResp, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_update_attributes(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.asset.with_raw_response.update_attributes( @@ -950,7 +950,7 @@ async def test_raw_response_update_attributes(self, async_client: AsyncNextbilli asset = await response.parse() assert_matches_type(SimpleResp, asset, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_update_attributes(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.asset.with_streaming_response.update_attributes( @@ -966,7 +966,7 @@ async def test_streaming_response_update_attributes(self, async_client: AsyncNex assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_update_attributes(self, async_client: AsyncNextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): diff --git a/tests/api_resources/skynet/test_config.py b/tests/api_resources/skynet/test_config.py index c51220f..071d466 100644 --- a/tests/api_resources/skynet/test_config.py +++ b/tests/api_resources/skynet/test_config.py @@ -21,7 +21,7 @@ class TestConfig: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve(self, client: NextbillionSDK) -> None: config = client.skynet.config.retrieve( @@ -29,7 +29,7 @@ def test_method_retrieve(self, client: NextbillionSDK) -> None: ) assert_matches_type(ConfigRetrieveResponse, config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve_with_all_params(self, client: NextbillionSDK) -> None: config = client.skynet.config.retrieve( @@ -38,7 +38,7 @@ def test_method_retrieve_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(ConfigRetrieveResponse, config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: NextbillionSDK) -> None: response = client.skynet.config.with_raw_response.retrieve( @@ -50,7 +50,7 @@ def test_raw_response_retrieve(self, client: NextbillionSDK) -> None: config = response.parse() assert_matches_type(ConfigRetrieveResponse, config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: NextbillionSDK) -> None: with client.skynet.config.with_streaming_response.retrieve( @@ -64,7 +64,7 @@ def test_streaming_response_retrieve(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update(self, client: NextbillionSDK) -> None: config = client.skynet.config.update( @@ -72,7 +72,7 @@ def test_method_update(self, client: NextbillionSDK) -> None: ) assert_matches_type(SimpleResp, config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update_with_all_params(self, client: NextbillionSDK) -> None: config = client.skynet.config.update( @@ -82,7 +82,7 @@ def test_method_update_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(SimpleResp, config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_update(self, client: NextbillionSDK) -> None: response = client.skynet.config.with_raw_response.update( @@ -94,7 +94,7 @@ def test_raw_response_update(self, client: NextbillionSDK) -> None: config = response.parse() assert_matches_type(SimpleResp, config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_update(self, client: NextbillionSDK) -> None: with client.skynet.config.with_streaming_response.update( @@ -108,7 +108,7 @@ def test_streaming_response_update(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_test_webhook(self, client: NextbillionSDK) -> None: config = client.skynet.config.test_webhook( @@ -116,7 +116,7 @@ def test_method_test_webhook(self, client: NextbillionSDK) -> None: ) assert_matches_type(ConfigTestWebhookResponse, config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_test_webhook(self, client: NextbillionSDK) -> None: response = client.skynet.config.with_raw_response.test_webhook( @@ -128,7 +128,7 @@ def test_raw_response_test_webhook(self, client: NextbillionSDK) -> None: config = response.parse() assert_matches_type(ConfigTestWebhookResponse, config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_test_webhook(self, client: NextbillionSDK) -> None: with client.skynet.config.with_streaming_response.test_webhook( @@ -148,7 +148,7 @@ class TestAsyncConfig: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve(self, async_client: AsyncNextbillionSDK) -> None: config = await async_client.skynet.config.retrieve( @@ -156,7 +156,7 @@ async def test_method_retrieve(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(ConfigRetrieveResponse, config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: config = await async_client.skynet.config.retrieve( @@ -165,7 +165,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncNextbill ) assert_matches_type(ConfigRetrieveResponse, config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.config.with_raw_response.retrieve( @@ -177,7 +177,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncNextbillionSDK) -> config = await response.parse() assert_matches_type(ConfigRetrieveResponse, config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.config.with_streaming_response.retrieve( @@ -191,7 +191,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncNextbillionS assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update(self, async_client: AsyncNextbillionSDK) -> None: config = await async_client.skynet.config.update( @@ -199,7 +199,7 @@ async def test_method_update(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(SimpleResp, config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: config = await async_client.skynet.config.update( @@ -209,7 +209,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncNextbillio ) assert_matches_type(SimpleResp, config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_update(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.config.with_raw_response.update( @@ -221,7 +221,7 @@ async def test_raw_response_update(self, async_client: AsyncNextbillionSDK) -> N config = await response.parse() assert_matches_type(SimpleResp, config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_update(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.config.with_streaming_response.update( @@ -235,7 +235,7 @@ async def test_streaming_response_update(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_test_webhook(self, async_client: AsyncNextbillionSDK) -> None: config = await async_client.skynet.config.test_webhook( @@ -243,7 +243,7 @@ async def test_method_test_webhook(self, async_client: AsyncNextbillionSDK) -> N ) assert_matches_type(ConfigTestWebhookResponse, config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_test_webhook(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.config.with_raw_response.test_webhook( @@ -255,7 +255,7 @@ async def test_raw_response_test_webhook(self, async_client: AsyncNextbillionSDK config = await response.parse() assert_matches_type(ConfigTestWebhookResponse, config, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_test_webhook(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.config.with_streaming_response.test_webhook( diff --git a/tests/api_resources/skynet/test_monitor.py b/tests/api_resources/skynet/test_monitor.py index df71e92..62efc52 100644 --- a/tests/api_resources/skynet/test_monitor.py +++ b/tests/api_resources/skynet/test_monitor.py @@ -22,7 +22,7 @@ class TestMonitor: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create(self, client: NextbillionSDK) -> None: monitor = client.skynet.monitor.create( @@ -32,7 +32,7 @@ def test_method_create(self, client: NextbillionSDK) -> None: ) assert_matches_type(MonitorCreateResponse, monitor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_with_all_params(self, client: NextbillionSDK) -> None: monitor = client.skynet.monitor.create( @@ -62,7 +62,7 @@ def test_method_create_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(MonitorCreateResponse, monitor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create(self, client: NextbillionSDK) -> None: response = client.skynet.monitor.with_raw_response.create( @@ -76,7 +76,7 @@ def test_raw_response_create(self, client: NextbillionSDK) -> None: monitor = response.parse() assert_matches_type(MonitorCreateResponse, monitor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create(self, client: NextbillionSDK) -> None: with client.skynet.monitor.with_streaming_response.create( @@ -92,7 +92,7 @@ def test_streaming_response_create(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve(self, client: NextbillionSDK) -> None: monitor = client.skynet.monitor.retrieve( @@ -101,7 +101,7 @@ def test_method_retrieve(self, client: NextbillionSDK) -> None: ) assert_matches_type(MonitorRetrieveResponse, monitor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: NextbillionSDK) -> None: response = client.skynet.monitor.with_raw_response.retrieve( @@ -114,7 +114,7 @@ def test_raw_response_retrieve(self, client: NextbillionSDK) -> None: monitor = response.parse() assert_matches_type(MonitorRetrieveResponse, monitor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: NextbillionSDK) -> None: with client.skynet.monitor.with_streaming_response.retrieve( @@ -129,7 +129,7 @@ def test_streaming_response_retrieve(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_path_params_retrieve(self, client: NextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -138,7 +138,7 @@ def test_path_params_retrieve(self, client: NextbillionSDK) -> None: key="key=API_KEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update(self, client: NextbillionSDK) -> None: monitor = client.skynet.monitor.update( @@ -147,7 +147,7 @@ def test_method_update(self, client: NextbillionSDK) -> None: ) assert_matches_type(SimpleResp, monitor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update_with_all_params(self, client: NextbillionSDK) -> None: monitor = client.skynet.monitor.update( @@ -176,7 +176,7 @@ def test_method_update_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(SimpleResp, monitor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_update(self, client: NextbillionSDK) -> None: response = client.skynet.monitor.with_raw_response.update( @@ -189,7 +189,7 @@ def test_raw_response_update(self, client: NextbillionSDK) -> None: monitor = response.parse() assert_matches_type(SimpleResp, monitor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_update(self, client: NextbillionSDK) -> None: with client.skynet.monitor.with_streaming_response.update( @@ -204,7 +204,7 @@ def test_streaming_response_update(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_path_params_update(self, client: NextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -213,7 +213,7 @@ def test_path_params_update(self, client: NextbillionSDK) -> None: key="key=API_KEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list(self, client: NextbillionSDK) -> None: monitor = client.skynet.monitor.list( @@ -221,7 +221,7 @@ def test_method_list(self, client: NextbillionSDK) -> None: ) assert_matches_type(MonitorListResponse, monitor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_with_all_params(self, client: NextbillionSDK) -> None: monitor = client.skynet.monitor.list( @@ -234,7 +234,7 @@ def test_method_list_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(MonitorListResponse, monitor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list(self, client: NextbillionSDK) -> None: response = client.skynet.monitor.with_raw_response.list( @@ -246,7 +246,7 @@ def test_raw_response_list(self, client: NextbillionSDK) -> None: monitor = response.parse() assert_matches_type(MonitorListResponse, monitor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list(self, client: NextbillionSDK) -> None: with client.skynet.monitor.with_streaming_response.list( @@ -260,7 +260,7 @@ def test_streaming_response_list(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete(self, client: NextbillionSDK) -> None: monitor = client.skynet.monitor.delete( @@ -269,7 +269,7 @@ def test_method_delete(self, client: NextbillionSDK) -> None: ) assert_matches_type(SimpleResp, monitor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_delete(self, client: NextbillionSDK) -> None: response = client.skynet.monitor.with_raw_response.delete( @@ -282,7 +282,7 @@ def test_raw_response_delete(self, client: NextbillionSDK) -> None: monitor = response.parse() assert_matches_type(SimpleResp, monitor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_delete(self, client: NextbillionSDK) -> None: with client.skynet.monitor.with_streaming_response.delete( @@ -297,7 +297,7 @@ def test_streaming_response_delete(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_path_params_delete(self, client: NextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -312,7 +312,7 @@ class TestAsyncMonitor: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncNextbillionSDK) -> None: monitor = await async_client.skynet.monitor.create( @@ -322,7 +322,7 @@ async def test_method_create(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(MonitorCreateResponse, monitor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: monitor = await async_client.skynet.monitor.create( @@ -352,7 +352,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncNextbillio ) assert_matches_type(MonitorCreateResponse, monitor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.monitor.with_raw_response.create( @@ -366,7 +366,7 @@ async def test_raw_response_create(self, async_client: AsyncNextbillionSDK) -> N monitor = await response.parse() assert_matches_type(MonitorCreateResponse, monitor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.monitor.with_streaming_response.create( @@ -382,7 +382,7 @@ async def test_streaming_response_create(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve(self, async_client: AsyncNextbillionSDK) -> None: monitor = await async_client.skynet.monitor.retrieve( @@ -391,7 +391,7 @@ async def test_method_retrieve(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(MonitorRetrieveResponse, monitor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.monitor.with_raw_response.retrieve( @@ -404,7 +404,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncNextbillionSDK) -> monitor = await response.parse() assert_matches_type(MonitorRetrieveResponse, monitor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.monitor.with_streaming_response.retrieve( @@ -419,7 +419,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncNextbillionS assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_retrieve(self, async_client: AsyncNextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -428,7 +428,7 @@ async def test_path_params_retrieve(self, async_client: AsyncNextbillionSDK) -> key="key=API_KEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update(self, async_client: AsyncNextbillionSDK) -> None: monitor = await async_client.skynet.monitor.update( @@ -437,7 +437,7 @@ async def test_method_update(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(SimpleResp, monitor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: monitor = await async_client.skynet.monitor.update( @@ -466,7 +466,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncNextbillio ) assert_matches_type(SimpleResp, monitor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_update(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.monitor.with_raw_response.update( @@ -479,7 +479,7 @@ async def test_raw_response_update(self, async_client: AsyncNextbillionSDK) -> N monitor = await response.parse() assert_matches_type(SimpleResp, monitor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_update(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.monitor.with_streaming_response.update( @@ -494,7 +494,7 @@ async def test_streaming_response_update(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_update(self, async_client: AsyncNextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -503,7 +503,7 @@ async def test_path_params_update(self, async_client: AsyncNextbillionSDK) -> No key="key=API_KEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncNextbillionSDK) -> None: monitor = await async_client.skynet.monitor.list( @@ -511,7 +511,7 @@ async def test_method_list(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(MonitorListResponse, monitor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: monitor = await async_client.skynet.monitor.list( @@ -524,7 +524,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncNextbillionS ) assert_matches_type(MonitorListResponse, monitor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.monitor.with_raw_response.list( @@ -536,7 +536,7 @@ async def test_raw_response_list(self, async_client: AsyncNextbillionSDK) -> Non monitor = await response.parse() assert_matches_type(MonitorListResponse, monitor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.monitor.with_streaming_response.list( @@ -550,7 +550,7 @@ async def test_streaming_response_list(self, async_client: AsyncNextbillionSDK) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncNextbillionSDK) -> None: monitor = await async_client.skynet.monitor.delete( @@ -559,7 +559,7 @@ async def test_method_delete(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(SimpleResp, monitor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.monitor.with_raw_response.delete( @@ -572,7 +572,7 @@ async def test_raw_response_delete(self, async_client: AsyncNextbillionSDK) -> N monitor = await response.parse() assert_matches_type(SimpleResp, monitor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.monitor.with_streaming_response.delete( @@ -587,7 +587,7 @@ async def test_streaming_response_delete(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_delete(self, async_client: AsyncNextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): diff --git a/tests/api_resources/skynet/test_namespaced_apikeys.py b/tests/api_resources/skynet/test_namespaced_apikeys.py index 45083f6..a6650da 100644 --- a/tests/api_resources/skynet/test_namespaced_apikeys.py +++ b/tests/api_resources/skynet/test_namespaced_apikeys.py @@ -20,7 +20,7 @@ class TestNamespacedApikeys: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create(self, client: NextbillionSDK) -> None: namespaced_apikey = client.skynet.namespaced_apikeys.create( @@ -29,7 +29,7 @@ def test_method_create(self, client: NextbillionSDK) -> None: ) assert_matches_type(NamespacedApikeyCreateResponse, namespaced_apikey, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create(self, client: NextbillionSDK) -> None: response = client.skynet.namespaced_apikeys.with_raw_response.create( @@ -42,7 +42,7 @@ def test_raw_response_create(self, client: NextbillionSDK) -> None: namespaced_apikey = response.parse() assert_matches_type(NamespacedApikeyCreateResponse, namespaced_apikey, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create(self, client: NextbillionSDK) -> None: with client.skynet.namespaced_apikeys.with_streaming_response.create( @@ -57,7 +57,7 @@ def test_streaming_response_create(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete(self, client: NextbillionSDK) -> None: namespaced_apikey = client.skynet.namespaced_apikeys.delete( @@ -67,7 +67,7 @@ def test_method_delete(self, client: NextbillionSDK) -> None: ) assert_matches_type(NamespacedApikeyDeleteResponse, namespaced_apikey, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_delete(self, client: NextbillionSDK) -> None: response = client.skynet.namespaced_apikeys.with_raw_response.delete( @@ -81,7 +81,7 @@ def test_raw_response_delete(self, client: NextbillionSDK) -> None: namespaced_apikey = response.parse() assert_matches_type(NamespacedApikeyDeleteResponse, namespaced_apikey, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_delete(self, client: NextbillionSDK) -> None: with client.skynet.namespaced_apikeys.with_streaming_response.delete( @@ -103,7 +103,7 @@ class TestAsyncNamespacedApikeys: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncNextbillionSDK) -> None: namespaced_apikey = await async_client.skynet.namespaced_apikeys.create( @@ -112,7 +112,7 @@ async def test_method_create(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(NamespacedApikeyCreateResponse, namespaced_apikey, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.namespaced_apikeys.with_raw_response.create( @@ -125,7 +125,7 @@ async def test_raw_response_create(self, async_client: AsyncNextbillionSDK) -> N namespaced_apikey = await response.parse() assert_matches_type(NamespacedApikeyCreateResponse, namespaced_apikey, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.namespaced_apikeys.with_streaming_response.create( @@ -140,7 +140,7 @@ async def test_streaming_response_create(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncNextbillionSDK) -> None: namespaced_apikey = await async_client.skynet.namespaced_apikeys.delete( @@ -150,7 +150,7 @@ async def test_method_delete(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(NamespacedApikeyDeleteResponse, namespaced_apikey, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.namespaced_apikeys.with_raw_response.delete( @@ -164,7 +164,7 @@ async def test_raw_response_delete(self, async_client: AsyncNextbillionSDK) -> N namespaced_apikey = await response.parse() assert_matches_type(NamespacedApikeyDeleteResponse, namespaced_apikey, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.namespaced_apikeys.with_streaming_response.delete( diff --git a/tests/api_resources/skynet/test_search.py b/tests/api_resources/skynet/test_search.py index 9ad62ff..05e0891 100644 --- a/tests/api_resources/skynet/test_search.py +++ b/tests/api_resources/skynet/test_search.py @@ -17,7 +17,7 @@ class TestSearch: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_around(self, client: NextbillionSDK) -> None: search = client.skynet.search.around( @@ -27,7 +27,7 @@ def test_method_around(self, client: NextbillionSDK) -> None: ) assert_matches_type(SearchResponse, search, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_around_with_all_params(self, client: NextbillionSDK) -> None: search = client.skynet.search.around( @@ -46,7 +46,7 @@ def test_method_around_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(SearchResponse, search, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_around(self, client: NextbillionSDK) -> None: response = client.skynet.search.with_raw_response.around( @@ -60,7 +60,7 @@ def test_raw_response_around(self, client: NextbillionSDK) -> None: search = response.parse() assert_matches_type(SearchResponse, search, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_around(self, client: NextbillionSDK) -> None: with client.skynet.search.with_streaming_response.around( @@ -76,7 +76,7 @@ def test_streaming_response_around(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_bound(self, client: NextbillionSDK) -> None: search = client.skynet.search.bound( @@ -85,7 +85,7 @@ def test_method_bound(self, client: NextbillionSDK) -> None: ) assert_matches_type(SearchResponse, search, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_bound_with_all_params(self, client: NextbillionSDK) -> None: search = client.skynet.search.bound( @@ -103,7 +103,7 @@ def test_method_bound_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(SearchResponse, search, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_bound(self, client: NextbillionSDK) -> None: response = client.skynet.search.with_raw_response.bound( @@ -116,7 +116,7 @@ def test_raw_response_bound(self, client: NextbillionSDK) -> None: search = response.parse() assert_matches_type(SearchResponse, search, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_bound(self, client: NextbillionSDK) -> None: with client.skynet.search.with_streaming_response.bound( @@ -137,7 +137,7 @@ class TestAsyncSearch: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_around(self, async_client: AsyncNextbillionSDK) -> None: search = await async_client.skynet.search.around( @@ -147,7 +147,7 @@ async def test_method_around(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(SearchResponse, search, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_around_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: search = await async_client.skynet.search.around( @@ -166,7 +166,7 @@ async def test_method_around_with_all_params(self, async_client: AsyncNextbillio ) assert_matches_type(SearchResponse, search, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_around(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.search.with_raw_response.around( @@ -180,7 +180,7 @@ async def test_raw_response_around(self, async_client: AsyncNextbillionSDK) -> N search = await response.parse() assert_matches_type(SearchResponse, search, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_around(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.search.with_streaming_response.around( @@ -196,7 +196,7 @@ async def test_streaming_response_around(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_bound(self, async_client: AsyncNextbillionSDK) -> None: search = await async_client.skynet.search.bound( @@ -205,7 +205,7 @@ async def test_method_bound(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(SearchResponse, search, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_bound_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: search = await async_client.skynet.search.bound( @@ -223,7 +223,7 @@ async def test_method_bound_with_all_params(self, async_client: AsyncNextbillion ) assert_matches_type(SearchResponse, search, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_bound(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.search.with_raw_response.bound( @@ -236,7 +236,7 @@ async def test_raw_response_bound(self, async_client: AsyncNextbillionSDK) -> No search = await response.parse() assert_matches_type(SearchResponse, search, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_bound(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.search.with_streaming_response.bound( diff --git a/tests/api_resources/skynet/test_trip.py b/tests/api_resources/skynet/test_trip.py index 6071f29..63ae498 100644 --- a/tests/api_resources/skynet/test_trip.py +++ b/tests/api_resources/skynet/test_trip.py @@ -22,7 +22,7 @@ class TestTrip: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve(self, client: NextbillionSDK) -> None: trip = client.skynet.trip.retrieve( @@ -31,7 +31,7 @@ def test_method_retrieve(self, client: NextbillionSDK) -> None: ) assert_matches_type(TripRetrieveResponse, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve_with_all_params(self, client: NextbillionSDK) -> None: trip = client.skynet.trip.retrieve( @@ -41,7 +41,7 @@ def test_method_retrieve_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(TripRetrieveResponse, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: NextbillionSDK) -> None: response = client.skynet.trip.with_raw_response.retrieve( @@ -54,7 +54,7 @@ def test_raw_response_retrieve(self, client: NextbillionSDK) -> None: trip = response.parse() assert_matches_type(TripRetrieveResponse, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: NextbillionSDK) -> None: with client.skynet.trip.with_streaming_response.retrieve( @@ -69,7 +69,7 @@ def test_streaming_response_retrieve(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_path_params_retrieve(self, client: NextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -78,7 +78,7 @@ def test_path_params_retrieve(self, client: NextbillionSDK) -> None: key="key=API_KEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update(self, client: NextbillionSDK) -> None: trip = client.skynet.trip.update( @@ -88,7 +88,7 @@ def test_method_update(self, client: NextbillionSDK) -> None: ) assert_matches_type(SimpleResp, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update_with_all_params(self, client: NextbillionSDK) -> None: trip = client.skynet.trip.update( @@ -110,7 +110,7 @@ def test_method_update_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(SimpleResp, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_update(self, client: NextbillionSDK) -> None: response = client.skynet.trip.with_raw_response.update( @@ -124,7 +124,7 @@ def test_raw_response_update(self, client: NextbillionSDK) -> None: trip = response.parse() assert_matches_type(SimpleResp, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_update(self, client: NextbillionSDK) -> None: with client.skynet.trip.with_streaming_response.update( @@ -140,7 +140,7 @@ def test_streaming_response_update(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_path_params_update(self, client: NextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -150,7 +150,7 @@ def test_path_params_update(self, client: NextbillionSDK) -> None: asset_id="asset_id", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete(self, client: NextbillionSDK) -> None: trip = client.skynet.trip.delete( @@ -159,7 +159,7 @@ def test_method_delete(self, client: NextbillionSDK) -> None: ) assert_matches_type(SimpleResp, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete_with_all_params(self, client: NextbillionSDK) -> None: trip = client.skynet.trip.delete( @@ -169,7 +169,7 @@ def test_method_delete_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(SimpleResp, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_delete(self, client: NextbillionSDK) -> None: response = client.skynet.trip.with_raw_response.delete( @@ -182,7 +182,7 @@ def test_raw_response_delete(self, client: NextbillionSDK) -> None: trip = response.parse() assert_matches_type(SimpleResp, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_delete(self, client: NextbillionSDK) -> None: with client.skynet.trip.with_streaming_response.delete( @@ -197,7 +197,7 @@ def test_streaming_response_delete(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_path_params_delete(self, client: NextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -206,7 +206,7 @@ def test_path_params_delete(self, client: NextbillionSDK) -> None: key="key=API_KEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_end(self, client: NextbillionSDK) -> None: trip = client.skynet.trip.end( @@ -215,7 +215,7 @@ def test_method_end(self, client: NextbillionSDK) -> None: ) assert_matches_type(SimpleResp, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_end_with_all_params(self, client: NextbillionSDK) -> None: trip = client.skynet.trip.end( @@ -225,7 +225,7 @@ def test_method_end_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(SimpleResp, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_end(self, client: NextbillionSDK) -> None: response = client.skynet.trip.with_raw_response.end( @@ -238,7 +238,7 @@ def test_raw_response_end(self, client: NextbillionSDK) -> None: trip = response.parse() assert_matches_type(SimpleResp, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_end(self, client: NextbillionSDK) -> None: with client.skynet.trip.with_streaming_response.end( @@ -253,7 +253,7 @@ def test_streaming_response_end(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_get_summary(self, client: NextbillionSDK) -> None: trip = client.skynet.trip.get_summary( @@ -262,7 +262,7 @@ def test_method_get_summary(self, client: NextbillionSDK) -> None: ) assert_matches_type(TripGetSummaryResponse, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_get_summary_with_all_params(self, client: NextbillionSDK) -> None: trip = client.skynet.trip.get_summary( @@ -272,7 +272,7 @@ def test_method_get_summary_with_all_params(self, client: NextbillionSDK) -> Non ) assert_matches_type(TripGetSummaryResponse, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_get_summary(self, client: NextbillionSDK) -> None: response = client.skynet.trip.with_raw_response.get_summary( @@ -285,7 +285,7 @@ def test_raw_response_get_summary(self, client: NextbillionSDK) -> None: trip = response.parse() assert_matches_type(TripGetSummaryResponse, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_get_summary(self, client: NextbillionSDK) -> None: with client.skynet.trip.with_streaming_response.get_summary( @@ -300,7 +300,7 @@ def test_streaming_response_get_summary(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_path_params_get_summary(self, client: NextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -309,7 +309,7 @@ def test_path_params_get_summary(self, client: NextbillionSDK) -> None: key="key=API_KEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_start(self, client: NextbillionSDK) -> None: trip = client.skynet.trip.start( @@ -318,7 +318,7 @@ def test_method_start(self, client: NextbillionSDK) -> None: ) assert_matches_type(TripStartResponse, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_start_with_all_params(self, client: NextbillionSDK) -> None: trip = client.skynet.trip.start( @@ -340,7 +340,7 @@ def test_method_start_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(TripStartResponse, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_start(self, client: NextbillionSDK) -> None: response = client.skynet.trip.with_raw_response.start( @@ -353,7 +353,7 @@ def test_raw_response_start(self, client: NextbillionSDK) -> None: trip = response.parse() assert_matches_type(TripStartResponse, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_start(self, client: NextbillionSDK) -> None: with client.skynet.trip.with_streaming_response.start( @@ -374,7 +374,7 @@ class TestAsyncTrip: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve(self, async_client: AsyncNextbillionSDK) -> None: trip = await async_client.skynet.trip.retrieve( @@ -383,7 +383,7 @@ async def test_method_retrieve(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(TripRetrieveResponse, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: trip = await async_client.skynet.trip.retrieve( @@ -393,7 +393,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncNextbill ) assert_matches_type(TripRetrieveResponse, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.trip.with_raw_response.retrieve( @@ -406,7 +406,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncNextbillionSDK) -> trip = await response.parse() assert_matches_type(TripRetrieveResponse, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.trip.with_streaming_response.retrieve( @@ -421,7 +421,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncNextbillionS assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_retrieve(self, async_client: AsyncNextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -430,7 +430,7 @@ async def test_path_params_retrieve(self, async_client: AsyncNextbillionSDK) -> key="key=API_KEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update(self, async_client: AsyncNextbillionSDK) -> None: trip = await async_client.skynet.trip.update( @@ -440,7 +440,7 @@ async def test_method_update(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(SimpleResp, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: trip = await async_client.skynet.trip.update( @@ -462,7 +462,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncNextbillio ) assert_matches_type(SimpleResp, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_update(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.trip.with_raw_response.update( @@ -476,7 +476,7 @@ async def test_raw_response_update(self, async_client: AsyncNextbillionSDK) -> N trip = await response.parse() assert_matches_type(SimpleResp, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_update(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.trip.with_streaming_response.update( @@ -492,7 +492,7 @@ async def test_streaming_response_update(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_update(self, async_client: AsyncNextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -502,7 +502,7 @@ async def test_path_params_update(self, async_client: AsyncNextbillionSDK) -> No asset_id="asset_id", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncNextbillionSDK) -> None: trip = await async_client.skynet.trip.delete( @@ -511,7 +511,7 @@ async def test_method_delete(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(SimpleResp, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: trip = await async_client.skynet.trip.delete( @@ -521,7 +521,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncNextbillio ) assert_matches_type(SimpleResp, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.trip.with_raw_response.delete( @@ -534,7 +534,7 @@ async def test_raw_response_delete(self, async_client: AsyncNextbillionSDK) -> N trip = await response.parse() assert_matches_type(SimpleResp, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.trip.with_streaming_response.delete( @@ -549,7 +549,7 @@ async def test_streaming_response_delete(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_delete(self, async_client: AsyncNextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -558,7 +558,7 @@ async def test_path_params_delete(self, async_client: AsyncNextbillionSDK) -> No key="key=API_KEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_end(self, async_client: AsyncNextbillionSDK) -> None: trip = await async_client.skynet.trip.end( @@ -567,7 +567,7 @@ async def test_method_end(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(SimpleResp, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_end_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: trip = await async_client.skynet.trip.end( @@ -577,7 +577,7 @@ async def test_method_end_with_all_params(self, async_client: AsyncNextbillionSD ) assert_matches_type(SimpleResp, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_end(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.trip.with_raw_response.end( @@ -590,7 +590,7 @@ async def test_raw_response_end(self, async_client: AsyncNextbillionSDK) -> None trip = await response.parse() assert_matches_type(SimpleResp, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_end(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.trip.with_streaming_response.end( @@ -605,7 +605,7 @@ async def test_streaming_response_end(self, async_client: AsyncNextbillionSDK) - assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_get_summary(self, async_client: AsyncNextbillionSDK) -> None: trip = await async_client.skynet.trip.get_summary( @@ -614,7 +614,7 @@ async def test_method_get_summary(self, async_client: AsyncNextbillionSDK) -> No ) assert_matches_type(TripGetSummaryResponse, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_get_summary_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: trip = await async_client.skynet.trip.get_summary( @@ -624,7 +624,7 @@ async def test_method_get_summary_with_all_params(self, async_client: AsyncNextb ) assert_matches_type(TripGetSummaryResponse, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_get_summary(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.trip.with_raw_response.get_summary( @@ -637,7 +637,7 @@ async def test_raw_response_get_summary(self, async_client: AsyncNextbillionSDK) trip = await response.parse() assert_matches_type(TripGetSummaryResponse, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_get_summary(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.trip.with_streaming_response.get_summary( @@ -652,7 +652,7 @@ async def test_streaming_response_get_summary(self, async_client: AsyncNextbilli assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_get_summary(self, async_client: AsyncNextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -661,7 +661,7 @@ async def test_path_params_get_summary(self, async_client: AsyncNextbillionSDK) key="key=API_KEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_start(self, async_client: AsyncNextbillionSDK) -> None: trip = await async_client.skynet.trip.start( @@ -670,7 +670,7 @@ async def test_method_start(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(TripStartResponse, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_start_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: trip = await async_client.skynet.trip.start( @@ -692,7 +692,7 @@ async def test_method_start_with_all_params(self, async_client: AsyncNextbillion ) assert_matches_type(TripStartResponse, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_start(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.trip.with_raw_response.start( @@ -705,7 +705,7 @@ async def test_raw_response_start(self, async_client: AsyncNextbillionSDK) -> No trip = await response.parse() assert_matches_type(TripStartResponse, trip, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_start(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.trip.with_streaming_response.start( diff --git a/tests/api_resources/test_areas.py b/tests/api_resources/test_areas.py index 0e7f1f3..6b7db9c 100644 --- a/tests/api_resources/test_areas.py +++ b/tests/api_resources/test_areas.py @@ -17,7 +17,7 @@ class TestAreas: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list(self, client: NextbillionSDK) -> None: area = client.areas.list( @@ -25,7 +25,7 @@ def test_method_list(self, client: NextbillionSDK) -> None: ) assert_matches_type(AreaListResponse, area, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list(self, client: NextbillionSDK) -> None: response = client.areas.with_raw_response.list( @@ -37,7 +37,7 @@ def test_raw_response_list(self, client: NextbillionSDK) -> None: area = response.parse() assert_matches_type(AreaListResponse, area, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list(self, client: NextbillionSDK) -> None: with client.areas.with_streaming_response.list( @@ -57,7 +57,7 @@ class TestAsyncAreas: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncNextbillionSDK) -> None: area = await async_client.areas.list( @@ -65,7 +65,7 @@ async def test_method_list(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(AreaListResponse, area, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.areas.with_raw_response.list( @@ -77,7 +77,7 @@ async def test_raw_response_list(self, async_client: AsyncNextbillionSDK) -> Non area = await response.parse() assert_matches_type(AreaListResponse, area, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.areas.with_streaming_response.list( diff --git a/tests/api_resources/test_autocomplete.py b/tests/api_resources/test_autocomplete.py index 1c637cd..66e7067 100644 --- a/tests/api_resources/test_autocomplete.py +++ b/tests/api_resources/test_autocomplete.py @@ -17,7 +17,7 @@ class TestAutocomplete: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_suggest(self, client: NextbillionSDK) -> None: autocomplete = client.autocomplete.suggest( @@ -26,7 +26,7 @@ def test_method_suggest(self, client: NextbillionSDK) -> None: ) assert_matches_type(AutocompleteSuggestResponse, autocomplete, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_suggest_with_all_params(self, client: NextbillionSDK) -> None: autocomplete = client.autocomplete.suggest( @@ -39,7 +39,7 @@ def test_method_suggest_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(AutocompleteSuggestResponse, autocomplete, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_suggest(self, client: NextbillionSDK) -> None: response = client.autocomplete.with_raw_response.suggest( @@ -52,7 +52,7 @@ def test_raw_response_suggest(self, client: NextbillionSDK) -> None: autocomplete = response.parse() assert_matches_type(AutocompleteSuggestResponse, autocomplete, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_suggest(self, client: NextbillionSDK) -> None: with client.autocomplete.with_streaming_response.suggest( @@ -73,7 +73,7 @@ class TestAsyncAutocomplete: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_suggest(self, async_client: AsyncNextbillionSDK) -> None: autocomplete = await async_client.autocomplete.suggest( @@ -82,7 +82,7 @@ async def test_method_suggest(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(AutocompleteSuggestResponse, autocomplete, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_suggest_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: autocomplete = await async_client.autocomplete.suggest( @@ -95,7 +95,7 @@ async def test_method_suggest_with_all_params(self, async_client: AsyncNextbilli ) assert_matches_type(AutocompleteSuggestResponse, autocomplete, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_suggest(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.autocomplete.with_raw_response.suggest( @@ -108,7 +108,7 @@ async def test_raw_response_suggest(self, async_client: AsyncNextbillionSDK) -> autocomplete = await response.parse() assert_matches_type(AutocompleteSuggestResponse, autocomplete, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_suggest(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.autocomplete.with_streaming_response.suggest( diff --git a/tests/api_resources/test_autosuggest.py b/tests/api_resources/test_autosuggest.py index 218a491..4597e9e 100644 --- a/tests/api_resources/test_autosuggest.py +++ b/tests/api_resources/test_autosuggest.py @@ -17,7 +17,7 @@ class TestAutosuggest: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_suggest(self, client: NextbillionSDK) -> None: autosuggest = client.autosuggest.suggest( @@ -26,7 +26,7 @@ def test_method_suggest(self, client: NextbillionSDK) -> None: ) assert_matches_type(AutosuggestSuggestResponse, autosuggest, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_suggest_with_all_params(self, client: NextbillionSDK) -> None: autosuggest = client.autosuggest.suggest( @@ -39,7 +39,7 @@ def test_method_suggest_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(AutosuggestSuggestResponse, autosuggest, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_suggest(self, client: NextbillionSDK) -> None: response = client.autosuggest.with_raw_response.suggest( @@ -52,7 +52,7 @@ def test_raw_response_suggest(self, client: NextbillionSDK) -> None: autosuggest = response.parse() assert_matches_type(AutosuggestSuggestResponse, autosuggest, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_suggest(self, client: NextbillionSDK) -> None: with client.autosuggest.with_streaming_response.suggest( @@ -73,7 +73,7 @@ class TestAsyncAutosuggest: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_suggest(self, async_client: AsyncNextbillionSDK) -> None: autosuggest = await async_client.autosuggest.suggest( @@ -82,7 +82,7 @@ async def test_method_suggest(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(AutosuggestSuggestResponse, autosuggest, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_suggest_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: autosuggest = await async_client.autosuggest.suggest( @@ -95,7 +95,7 @@ async def test_method_suggest_with_all_params(self, async_client: AsyncNextbilli ) assert_matches_type(AutosuggestSuggestResponse, autosuggest, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_suggest(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.autosuggest.with_raw_response.suggest( @@ -108,7 +108,7 @@ async def test_raw_response_suggest(self, async_client: AsyncNextbillionSDK) -> autosuggest = await response.parse() assert_matches_type(AutosuggestSuggestResponse, autosuggest, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_suggest(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.autosuggest.with_streaming_response.suggest( diff --git a/tests/api_resources/test_batch.py b/tests/api_resources/test_batch.py index e07fc6e..d1faf29 100644 --- a/tests/api_resources/test_batch.py +++ b/tests/api_resources/test_batch.py @@ -17,7 +17,7 @@ class TestBatch: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create(self, client: NextbillionSDK) -> None: batch = client.batch.create( @@ -25,7 +25,7 @@ def test_method_create(self, client: NextbillionSDK) -> None: ) assert_matches_type(BatchCreateResponse, batch, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_with_all_params(self, client: NextbillionSDK) -> None: batch = client.batch.create( @@ -34,7 +34,7 @@ def test_method_create_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(BatchCreateResponse, batch, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create(self, client: NextbillionSDK) -> None: response = client.batch.with_raw_response.create( @@ -46,7 +46,7 @@ def test_raw_response_create(self, client: NextbillionSDK) -> None: batch = response.parse() assert_matches_type(BatchCreateResponse, batch, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create(self, client: NextbillionSDK) -> None: with client.batch.with_streaming_response.create( @@ -60,7 +60,7 @@ def test_streaming_response_create(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve(self, client: NextbillionSDK) -> None: batch = client.batch.retrieve( @@ -69,7 +69,7 @@ def test_method_retrieve(self, client: NextbillionSDK) -> None: ) assert_matches_type(BatchRetrieveResponse, batch, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: NextbillionSDK) -> None: response = client.batch.with_raw_response.retrieve( @@ -82,7 +82,7 @@ def test_raw_response_retrieve(self, client: NextbillionSDK) -> None: batch = response.parse() assert_matches_type(BatchRetrieveResponse, batch, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: NextbillionSDK) -> None: with client.batch.with_streaming_response.retrieve( @@ -103,7 +103,7 @@ class TestAsyncBatch: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncNextbillionSDK) -> None: batch = await async_client.batch.create( @@ -111,7 +111,7 @@ async def test_method_create(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(BatchCreateResponse, batch, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: batch = await async_client.batch.create( @@ -120,7 +120,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncNextbillio ) assert_matches_type(BatchCreateResponse, batch, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.batch.with_raw_response.create( @@ -132,7 +132,7 @@ async def test_raw_response_create(self, async_client: AsyncNextbillionSDK) -> N batch = await response.parse() assert_matches_type(BatchCreateResponse, batch, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.batch.with_streaming_response.create( @@ -146,7 +146,7 @@ async def test_streaming_response_create(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve(self, async_client: AsyncNextbillionSDK) -> None: batch = await async_client.batch.retrieve( @@ -155,7 +155,7 @@ async def test_method_retrieve(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(BatchRetrieveResponse, batch, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.batch.with_raw_response.retrieve( @@ -168,7 +168,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncNextbillionSDK) -> batch = await response.parse() assert_matches_type(BatchRetrieveResponse, batch, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.batch.with_streaming_response.retrieve( diff --git a/tests/api_resources/test_browse.py b/tests/api_resources/test_browse.py index c3c90a4..56be6e5 100644 --- a/tests/api_resources/test_browse.py +++ b/tests/api_resources/test_browse.py @@ -17,7 +17,7 @@ class TestBrowse: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_search(self, client: NextbillionSDK) -> None: browse = client.browse.search( @@ -25,7 +25,7 @@ def test_method_search(self, client: NextbillionSDK) -> None: ) assert_matches_type(BrowseSearchResponse, browse, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_search_with_all_params(self, client: NextbillionSDK) -> None: browse = client.browse.search( @@ -38,7 +38,7 @@ def test_method_search_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(BrowseSearchResponse, browse, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_search(self, client: NextbillionSDK) -> None: response = client.browse.with_raw_response.search( @@ -50,7 +50,7 @@ def test_raw_response_search(self, client: NextbillionSDK) -> None: browse = response.parse() assert_matches_type(BrowseSearchResponse, browse, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_search(self, client: NextbillionSDK) -> None: with client.browse.with_streaming_response.search( @@ -70,7 +70,7 @@ class TestAsyncBrowse: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_search(self, async_client: AsyncNextbillionSDK) -> None: browse = await async_client.browse.search( @@ -78,7 +78,7 @@ async def test_method_search(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(BrowseSearchResponse, browse, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_search_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: browse = await async_client.browse.search( @@ -91,7 +91,7 @@ async def test_method_search_with_all_params(self, async_client: AsyncNextbillio ) assert_matches_type(BrowseSearchResponse, browse, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_search(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.browse.with_raw_response.search( @@ -103,7 +103,7 @@ async def test_raw_response_search(self, async_client: AsyncNextbillionSDK) -> N browse = await response.parse() assert_matches_type(BrowseSearchResponse, browse, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_search(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.browse.with_streaming_response.search( diff --git a/tests/api_resources/test_directions.py b/tests/api_resources/test_directions.py index 58f33af..04f53a8 100644 --- a/tests/api_resources/test_directions.py +++ b/tests/api_resources/test_directions.py @@ -17,7 +17,7 @@ class TestDirections: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_compute_route(self, client: NextbillionSDK) -> None: direction = client.directions.compute_route( @@ -26,7 +26,7 @@ def test_method_compute_route(self, client: NextbillionSDK) -> None: ) assert_matches_type(DirectionComputeRouteResponse, direction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_compute_route_with_all_params(self, client: NextbillionSDK) -> None: direction = client.directions.compute_route( @@ -59,7 +59,7 @@ def test_method_compute_route_with_all_params(self, client: NextbillionSDK) -> N ) assert_matches_type(DirectionComputeRouteResponse, direction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_compute_route(self, client: NextbillionSDK) -> None: response = client.directions.with_raw_response.compute_route( @@ -72,7 +72,7 @@ def test_raw_response_compute_route(self, client: NextbillionSDK) -> None: direction = response.parse() assert_matches_type(DirectionComputeRouteResponse, direction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_compute_route(self, client: NextbillionSDK) -> None: with client.directions.with_streaming_response.compute_route( @@ -93,7 +93,7 @@ class TestAsyncDirections: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_compute_route(self, async_client: AsyncNextbillionSDK) -> None: direction = await async_client.directions.compute_route( @@ -102,7 +102,7 @@ async def test_method_compute_route(self, async_client: AsyncNextbillionSDK) -> ) assert_matches_type(DirectionComputeRouteResponse, direction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_compute_route_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: direction = await async_client.directions.compute_route( @@ -135,7 +135,7 @@ async def test_method_compute_route_with_all_params(self, async_client: AsyncNex ) assert_matches_type(DirectionComputeRouteResponse, direction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_compute_route(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.directions.with_raw_response.compute_route( @@ -148,7 +148,7 @@ async def test_raw_response_compute_route(self, async_client: AsyncNextbillionSD direction = await response.parse() assert_matches_type(DirectionComputeRouteResponse, direction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_compute_route(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.directions.with_streaming_response.compute_route( diff --git a/tests/api_resources/test_discover.py b/tests/api_resources/test_discover.py index e98656b..f362b8a 100644 --- a/tests/api_resources/test_discover.py +++ b/tests/api_resources/test_discover.py @@ -17,7 +17,7 @@ class TestDiscover: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve(self, client: NextbillionSDK) -> None: discover = client.discover.retrieve( @@ -26,7 +26,7 @@ def test_method_retrieve(self, client: NextbillionSDK) -> None: ) assert_matches_type(DiscoverRetrieveResponse, discover, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve_with_all_params(self, client: NextbillionSDK) -> None: discover = client.discover.retrieve( @@ -39,7 +39,7 @@ def test_method_retrieve_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(DiscoverRetrieveResponse, discover, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: NextbillionSDK) -> None: response = client.discover.with_raw_response.retrieve( @@ -52,7 +52,7 @@ def test_raw_response_retrieve(self, client: NextbillionSDK) -> None: discover = response.parse() assert_matches_type(DiscoverRetrieveResponse, discover, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: NextbillionSDK) -> None: with client.discover.with_streaming_response.retrieve( @@ -73,7 +73,7 @@ class TestAsyncDiscover: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve(self, async_client: AsyncNextbillionSDK) -> None: discover = await async_client.discover.retrieve( @@ -82,7 +82,7 @@ async def test_method_retrieve(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(DiscoverRetrieveResponse, discover, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: discover = await async_client.discover.retrieve( @@ -95,7 +95,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncNextbill ) assert_matches_type(DiscoverRetrieveResponse, discover, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.discover.with_raw_response.retrieve( @@ -108,7 +108,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncNextbillionSDK) -> discover = await response.parse() assert_matches_type(DiscoverRetrieveResponse, discover, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.discover.with_streaming_response.retrieve( diff --git a/tests/api_resources/test_geocode.py b/tests/api_resources/test_geocode.py index c1059dc..94d595f 100644 --- a/tests/api_resources/test_geocode.py +++ b/tests/api_resources/test_geocode.py @@ -21,7 +21,7 @@ class TestGeocode: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve(self, client: NextbillionSDK) -> None: geocode = client.geocode.retrieve( @@ -30,7 +30,7 @@ def test_method_retrieve(self, client: NextbillionSDK) -> None: ) assert_matches_type(GeocodeRetrieveResponse, geocode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve_with_all_params(self, client: NextbillionSDK) -> None: geocode = client.geocode.retrieve( @@ -43,7 +43,7 @@ def test_method_retrieve_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(GeocodeRetrieveResponse, geocode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: NextbillionSDK) -> None: response = client.geocode.with_raw_response.retrieve( @@ -56,7 +56,7 @@ def test_raw_response_retrieve(self, client: NextbillionSDK) -> None: geocode = response.parse() assert_matches_type(GeocodeRetrieveResponse, geocode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: NextbillionSDK) -> None: with client.geocode.with_streaming_response.retrieve( @@ -71,7 +71,7 @@ def test_streaming_response_retrieve(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_batch_create(self, client: NextbillionSDK) -> None: geocode = client.geocode.batch_create( @@ -80,7 +80,7 @@ def test_method_batch_create(self, client: NextbillionSDK) -> None: ) assert_matches_type(GeocodeBatchCreateResponse, geocode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_batch_create(self, client: NextbillionSDK) -> None: response = client.geocode.with_raw_response.batch_create( @@ -93,7 +93,7 @@ def test_raw_response_batch_create(self, client: NextbillionSDK) -> None: geocode = response.parse() assert_matches_type(GeocodeBatchCreateResponse, geocode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_batch_create(self, client: NextbillionSDK) -> None: with client.geocode.with_streaming_response.batch_create( @@ -108,7 +108,7 @@ def test_streaming_response_batch_create(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_structured_retrieve(self, client: NextbillionSDK) -> None: geocode = client.geocode.structured_retrieve( @@ -117,7 +117,7 @@ def test_method_structured_retrieve(self, client: NextbillionSDK) -> None: ) assert_matches_type(GeocodeStructuredRetrieveResponse, geocode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_structured_retrieve_with_all_params(self, client: NextbillionSDK) -> None: geocode = client.geocode.structured_retrieve( @@ -135,7 +135,7 @@ def test_method_structured_retrieve_with_all_params(self, client: NextbillionSDK ) assert_matches_type(GeocodeStructuredRetrieveResponse, geocode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_structured_retrieve(self, client: NextbillionSDK) -> None: response = client.geocode.with_raw_response.structured_retrieve( @@ -148,7 +148,7 @@ def test_raw_response_structured_retrieve(self, client: NextbillionSDK) -> None: geocode = response.parse() assert_matches_type(GeocodeStructuredRetrieveResponse, geocode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_structured_retrieve(self, client: NextbillionSDK) -> None: with client.geocode.with_streaming_response.structured_retrieve( @@ -169,7 +169,7 @@ class TestAsyncGeocode: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve(self, async_client: AsyncNextbillionSDK) -> None: geocode = await async_client.geocode.retrieve( @@ -178,7 +178,7 @@ async def test_method_retrieve(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(GeocodeRetrieveResponse, geocode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: geocode = await async_client.geocode.retrieve( @@ -191,7 +191,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncNextbill ) assert_matches_type(GeocodeRetrieveResponse, geocode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.geocode.with_raw_response.retrieve( @@ -204,7 +204,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncNextbillionSDK) -> geocode = await response.parse() assert_matches_type(GeocodeRetrieveResponse, geocode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.geocode.with_streaming_response.retrieve( @@ -219,7 +219,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncNextbillionS assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_batch_create(self, async_client: AsyncNextbillionSDK) -> None: geocode = await async_client.geocode.batch_create( @@ -228,7 +228,7 @@ async def test_method_batch_create(self, async_client: AsyncNextbillionSDK) -> N ) assert_matches_type(GeocodeBatchCreateResponse, geocode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_batch_create(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.geocode.with_raw_response.batch_create( @@ -241,7 +241,7 @@ async def test_raw_response_batch_create(self, async_client: AsyncNextbillionSDK geocode = await response.parse() assert_matches_type(GeocodeBatchCreateResponse, geocode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_batch_create(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.geocode.with_streaming_response.batch_create( @@ -256,7 +256,7 @@ async def test_streaming_response_batch_create(self, async_client: AsyncNextbill assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_structured_retrieve(self, async_client: AsyncNextbillionSDK) -> None: geocode = await async_client.geocode.structured_retrieve( @@ -265,7 +265,7 @@ async def test_method_structured_retrieve(self, async_client: AsyncNextbillionSD ) assert_matches_type(GeocodeStructuredRetrieveResponse, geocode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_structured_retrieve_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: geocode = await async_client.geocode.structured_retrieve( @@ -283,7 +283,7 @@ async def test_method_structured_retrieve_with_all_params(self, async_client: As ) assert_matches_type(GeocodeStructuredRetrieveResponse, geocode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_structured_retrieve(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.geocode.with_raw_response.structured_retrieve( @@ -296,7 +296,7 @@ async def test_raw_response_structured_retrieve(self, async_client: AsyncNextbil geocode = await response.parse() assert_matches_type(GeocodeStructuredRetrieveResponse, geocode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_structured_retrieve(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.geocode.with_streaming_response.structured_retrieve( diff --git a/tests/api_resources/test_geofence.py b/tests/api_resources/test_geofence.py index 6ea6c5f..3374bfd 100644 --- a/tests/api_resources/test_geofence.py +++ b/tests/api_resources/test_geofence.py @@ -23,7 +23,7 @@ class TestGeofence: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create(self, client: NextbillionSDK) -> None: geofence = client.geofence.create( @@ -32,7 +32,7 @@ def test_method_create(self, client: NextbillionSDK) -> None: ) assert_matches_type(GeofenceCreateResponse, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_with_all_params(self, client: NextbillionSDK) -> None: geofence = client.geofence.create( @@ -66,7 +66,7 @@ def test_method_create_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(GeofenceCreateResponse, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create(self, client: NextbillionSDK) -> None: response = client.geofence.with_raw_response.create( @@ -79,7 +79,7 @@ def test_raw_response_create(self, client: NextbillionSDK) -> None: geofence = response.parse() assert_matches_type(GeofenceCreateResponse, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create(self, client: NextbillionSDK) -> None: with client.geofence.with_streaming_response.create( @@ -94,7 +94,7 @@ def test_streaming_response_create(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve(self, client: NextbillionSDK) -> None: geofence = client.geofence.retrieve( @@ -103,7 +103,7 @@ def test_method_retrieve(self, client: NextbillionSDK) -> None: ) assert_matches_type(GeofenceRetrieveResponse, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: NextbillionSDK) -> None: response = client.geofence.with_raw_response.retrieve( @@ -116,7 +116,7 @@ def test_raw_response_retrieve(self, client: NextbillionSDK) -> None: geofence = response.parse() assert_matches_type(GeofenceRetrieveResponse, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: NextbillionSDK) -> None: with client.geofence.with_streaming_response.retrieve( @@ -131,7 +131,7 @@ def test_streaming_response_retrieve(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_path_params_retrieve(self, client: NextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -140,7 +140,7 @@ def test_path_params_retrieve(self, client: NextbillionSDK) -> None: key="key=API_KEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update(self, client: NextbillionSDK) -> None: geofence = client.geofence.update( @@ -149,7 +149,7 @@ def test_method_update(self, client: NextbillionSDK) -> None: ) assert_matches_type(SimpleResp, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update_with_all_params(self, client: NextbillionSDK) -> None: geofence = client.geofence.update( @@ -183,7 +183,7 @@ def test_method_update_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(SimpleResp, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_update(self, client: NextbillionSDK) -> None: response = client.geofence.with_raw_response.update( @@ -196,7 +196,7 @@ def test_raw_response_update(self, client: NextbillionSDK) -> None: geofence = response.parse() assert_matches_type(SimpleResp, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_update(self, client: NextbillionSDK) -> None: with client.geofence.with_streaming_response.update( @@ -211,7 +211,7 @@ def test_streaming_response_update(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_path_params_update(self, client: NextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -220,7 +220,7 @@ def test_path_params_update(self, client: NextbillionSDK) -> None: key="key=API_KEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list(self, client: NextbillionSDK) -> None: geofence = client.geofence.list( @@ -228,7 +228,7 @@ def test_method_list(self, client: NextbillionSDK) -> None: ) assert_matches_type(GeofenceListResponse, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_with_all_params(self, client: NextbillionSDK) -> None: geofence = client.geofence.list( @@ -239,7 +239,7 @@ def test_method_list_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(GeofenceListResponse, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list(self, client: NextbillionSDK) -> None: response = client.geofence.with_raw_response.list( @@ -251,7 +251,7 @@ def test_raw_response_list(self, client: NextbillionSDK) -> None: geofence = response.parse() assert_matches_type(GeofenceListResponse, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list(self, client: NextbillionSDK) -> None: with client.geofence.with_streaming_response.list( @@ -265,7 +265,7 @@ def test_streaming_response_list(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete(self, client: NextbillionSDK) -> None: geofence = client.geofence.delete( @@ -274,7 +274,7 @@ def test_method_delete(self, client: NextbillionSDK) -> None: ) assert_matches_type(SimpleResp, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_delete(self, client: NextbillionSDK) -> None: response = client.geofence.with_raw_response.delete( @@ -287,7 +287,7 @@ def test_raw_response_delete(self, client: NextbillionSDK) -> None: geofence = response.parse() assert_matches_type(SimpleResp, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_delete(self, client: NextbillionSDK) -> None: with client.geofence.with_streaming_response.delete( @@ -302,7 +302,7 @@ def test_streaming_response_delete(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_path_params_delete(self, client: NextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -311,7 +311,7 @@ def test_path_params_delete(self, client: NextbillionSDK) -> None: key="key=API_KEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_contains(self, client: NextbillionSDK) -> None: geofence = client.geofence.contains( @@ -320,7 +320,7 @@ def test_method_contains(self, client: NextbillionSDK) -> None: ) assert_matches_type(GeofenceContainsResponse, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_contains_with_all_params(self, client: NextbillionSDK) -> None: geofence = client.geofence.contains( @@ -331,7 +331,7 @@ def test_method_contains_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(GeofenceContainsResponse, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_contains(self, client: NextbillionSDK) -> None: response = client.geofence.with_raw_response.contains( @@ -344,7 +344,7 @@ def test_raw_response_contains(self, client: NextbillionSDK) -> None: geofence = response.parse() assert_matches_type(GeofenceContainsResponse, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_contains(self, client: NextbillionSDK) -> None: with client.geofence.with_streaming_response.contains( @@ -365,7 +365,7 @@ class TestAsyncGeofence: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncNextbillionSDK) -> None: geofence = await async_client.geofence.create( @@ -374,7 +374,7 @@ async def test_method_create(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(GeofenceCreateResponse, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: geofence = await async_client.geofence.create( @@ -408,7 +408,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncNextbillio ) assert_matches_type(GeofenceCreateResponse, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.geofence.with_raw_response.create( @@ -421,7 +421,7 @@ async def test_raw_response_create(self, async_client: AsyncNextbillionSDK) -> N geofence = await response.parse() assert_matches_type(GeofenceCreateResponse, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.geofence.with_streaming_response.create( @@ -436,7 +436,7 @@ async def test_streaming_response_create(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve(self, async_client: AsyncNextbillionSDK) -> None: geofence = await async_client.geofence.retrieve( @@ -445,7 +445,7 @@ async def test_method_retrieve(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(GeofenceRetrieveResponse, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.geofence.with_raw_response.retrieve( @@ -458,7 +458,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncNextbillionSDK) -> geofence = await response.parse() assert_matches_type(GeofenceRetrieveResponse, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.geofence.with_streaming_response.retrieve( @@ -473,7 +473,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncNextbillionS assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_retrieve(self, async_client: AsyncNextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -482,7 +482,7 @@ async def test_path_params_retrieve(self, async_client: AsyncNextbillionSDK) -> key="key=API_KEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update(self, async_client: AsyncNextbillionSDK) -> None: geofence = await async_client.geofence.update( @@ -491,7 +491,7 @@ async def test_method_update(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(SimpleResp, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: geofence = await async_client.geofence.update( @@ -525,7 +525,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncNextbillio ) assert_matches_type(SimpleResp, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_update(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.geofence.with_raw_response.update( @@ -538,7 +538,7 @@ async def test_raw_response_update(self, async_client: AsyncNextbillionSDK) -> N geofence = await response.parse() assert_matches_type(SimpleResp, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_update(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.geofence.with_streaming_response.update( @@ -553,7 +553,7 @@ async def test_streaming_response_update(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_update(self, async_client: AsyncNextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -562,7 +562,7 @@ async def test_path_params_update(self, async_client: AsyncNextbillionSDK) -> No key="key=API_KEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncNextbillionSDK) -> None: geofence = await async_client.geofence.list( @@ -570,7 +570,7 @@ async def test_method_list(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(GeofenceListResponse, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: geofence = await async_client.geofence.list( @@ -581,7 +581,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncNextbillionS ) assert_matches_type(GeofenceListResponse, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.geofence.with_raw_response.list( @@ -593,7 +593,7 @@ async def test_raw_response_list(self, async_client: AsyncNextbillionSDK) -> Non geofence = await response.parse() assert_matches_type(GeofenceListResponse, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.geofence.with_streaming_response.list( @@ -607,7 +607,7 @@ async def test_streaming_response_list(self, async_client: AsyncNextbillionSDK) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncNextbillionSDK) -> None: geofence = await async_client.geofence.delete( @@ -616,7 +616,7 @@ async def test_method_delete(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(SimpleResp, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.geofence.with_raw_response.delete( @@ -629,7 +629,7 @@ async def test_raw_response_delete(self, async_client: AsyncNextbillionSDK) -> N geofence = await response.parse() assert_matches_type(SimpleResp, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.geofence.with_streaming_response.delete( @@ -644,7 +644,7 @@ async def test_streaming_response_delete(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_delete(self, async_client: AsyncNextbillionSDK) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -653,7 +653,7 @@ async def test_path_params_delete(self, async_client: AsyncNextbillionSDK) -> No key="key=API_KEY", ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_contains(self, async_client: AsyncNextbillionSDK) -> None: geofence = await async_client.geofence.contains( @@ -662,7 +662,7 @@ async def test_method_contains(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(GeofenceContainsResponse, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_contains_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: geofence = await async_client.geofence.contains( @@ -673,7 +673,7 @@ async def test_method_contains_with_all_params(self, async_client: AsyncNextbill ) assert_matches_type(GeofenceContainsResponse, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_contains(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.geofence.with_raw_response.contains( @@ -686,7 +686,7 @@ async def test_raw_response_contains(self, async_client: AsyncNextbillionSDK) -> geofence = await response.parse() assert_matches_type(GeofenceContainsResponse, geofence, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_contains(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.geofence.with_streaming_response.contains( diff --git a/tests/api_resources/test_isochrone.py b/tests/api_resources/test_isochrone.py index 3f2b14e..f9022cb 100644 --- a/tests/api_resources/test_isochrone.py +++ b/tests/api_resources/test_isochrone.py @@ -17,7 +17,7 @@ class TestIsochrone: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_compute(self, client: NextbillionSDK) -> None: isochrone = client.isochrone.compute( @@ -28,7 +28,7 @@ def test_method_compute(self, client: NextbillionSDK) -> None: ) assert_matches_type(IsochroneComputeResponse, isochrone, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_compute_with_all_params(self, client: NextbillionSDK) -> None: isochrone = client.isochrone.compute( @@ -45,7 +45,7 @@ def test_method_compute_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(IsochroneComputeResponse, isochrone, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_compute(self, client: NextbillionSDK) -> None: response = client.isochrone.with_raw_response.compute( @@ -60,7 +60,7 @@ def test_raw_response_compute(self, client: NextbillionSDK) -> None: isochrone = response.parse() assert_matches_type(IsochroneComputeResponse, isochrone, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_compute(self, client: NextbillionSDK) -> None: with client.isochrone.with_streaming_response.compute( @@ -83,7 +83,7 @@ class TestAsyncIsochrone: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_compute(self, async_client: AsyncNextbillionSDK) -> None: isochrone = await async_client.isochrone.compute( @@ -94,7 +94,7 @@ async def test_method_compute(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(IsochroneComputeResponse, isochrone, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_compute_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: isochrone = await async_client.isochrone.compute( @@ -111,7 +111,7 @@ async def test_method_compute_with_all_params(self, async_client: AsyncNextbilli ) assert_matches_type(IsochroneComputeResponse, isochrone, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_compute(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.isochrone.with_raw_response.compute( @@ -126,7 +126,7 @@ async def test_raw_response_compute(self, async_client: AsyncNextbillionSDK) -> isochrone = await response.parse() assert_matches_type(IsochroneComputeResponse, isochrone, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_compute(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.isochrone.with_streaming_response.compute( diff --git a/tests/api_resources/test_lookup.py b/tests/api_resources/test_lookup.py index 7be9f38..f69ead7 100644 --- a/tests/api_resources/test_lookup.py +++ b/tests/api_resources/test_lookup.py @@ -17,7 +17,7 @@ class TestLookup: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_by_id(self, client: NextbillionSDK) -> None: lookup = client.lookup.by_id( @@ -26,7 +26,7 @@ def test_method_by_id(self, client: NextbillionSDK) -> None: ) assert_matches_type(LookupByIDResponse, lookup, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_by_id(self, client: NextbillionSDK) -> None: response = client.lookup.with_raw_response.by_id( @@ -39,7 +39,7 @@ def test_raw_response_by_id(self, client: NextbillionSDK) -> None: lookup = response.parse() assert_matches_type(LookupByIDResponse, lookup, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_by_id(self, client: NextbillionSDK) -> None: with client.lookup.with_streaming_response.by_id( @@ -60,7 +60,7 @@ class TestAsyncLookup: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_by_id(self, async_client: AsyncNextbillionSDK) -> None: lookup = await async_client.lookup.by_id( @@ -69,7 +69,7 @@ async def test_method_by_id(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(LookupByIDResponse, lookup, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_by_id(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.lookup.with_raw_response.by_id( @@ -82,7 +82,7 @@ async def test_raw_response_by_id(self, async_client: AsyncNextbillionSDK) -> No lookup = await response.parse() assert_matches_type(LookupByIDResponse, lookup, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_by_id(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.lookup.with_streaming_response.by_id( diff --git a/tests/api_resources/test_map.py b/tests/api_resources/test_map.py index 178ff75..7b167ab 100644 --- a/tests/api_resources/test_map.py +++ b/tests/api_resources/test_map.py @@ -15,13 +15,13 @@ class TestMap: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_segment(self, client: NextbillionSDK) -> None: map = client.map.create_segment() assert map is None - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create_segment(self, client: NextbillionSDK) -> None: response = client.map.with_raw_response.create_segment() @@ -31,7 +31,7 @@ def test_raw_response_create_segment(self, client: NextbillionSDK) -> None: map = response.parse() assert map is None - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create_segment(self, client: NextbillionSDK) -> None: with client.map.with_streaming_response.create_segment() as response: @@ -49,13 +49,13 @@ class TestAsyncMap: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_segment(self, async_client: AsyncNextbillionSDK) -> None: map = await async_client.map.create_segment() assert map is None - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create_segment(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.map.with_raw_response.create_segment() @@ -65,7 +65,7 @@ async def test_raw_response_create_segment(self, async_client: AsyncNextbillionS map = await response.parse() assert map is None - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create_segment(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.map.with_streaming_response.create_segment() as response: diff --git a/tests/api_resources/test_mdm.py b/tests/api_resources/test_mdm.py index 7a4889f..2227f21 100644 --- a/tests/api_resources/test_mdm.py +++ b/tests/api_resources/test_mdm.py @@ -20,7 +20,7 @@ class TestMdm: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_distance_matrix(self, client: NextbillionSDK) -> None: mdm = client.mdm.create_distance_matrix( @@ -30,7 +30,7 @@ def test_method_create_distance_matrix(self, client: NextbillionSDK) -> None: ) assert_matches_type(MdmCreateDistanceMatrixResponse, mdm, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_distance_matrix_with_all_params(self, client: NextbillionSDK) -> None: mdm = client.mdm.create_distance_matrix( @@ -54,7 +54,7 @@ def test_method_create_distance_matrix_with_all_params(self, client: Nextbillion ) assert_matches_type(MdmCreateDistanceMatrixResponse, mdm, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create_distance_matrix(self, client: NextbillionSDK) -> None: response = client.mdm.with_raw_response.create_distance_matrix( @@ -68,7 +68,7 @@ def test_raw_response_create_distance_matrix(self, client: NextbillionSDK) -> No mdm = response.parse() assert_matches_type(MdmCreateDistanceMatrixResponse, mdm, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create_distance_matrix(self, client: NextbillionSDK) -> None: with client.mdm.with_streaming_response.create_distance_matrix( @@ -84,7 +84,7 @@ def test_streaming_response_create_distance_matrix(self, client: NextbillionSDK) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_get_distance_matrix_status(self, client: NextbillionSDK) -> None: mdm = client.mdm.get_distance_matrix_status( @@ -93,7 +93,7 @@ def test_method_get_distance_matrix_status(self, client: NextbillionSDK) -> None ) assert_matches_type(MdmGetDistanceMatrixStatusResponse, mdm, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_get_distance_matrix_status(self, client: NextbillionSDK) -> None: response = client.mdm.with_raw_response.get_distance_matrix_status( @@ -106,7 +106,7 @@ def test_raw_response_get_distance_matrix_status(self, client: NextbillionSDK) - mdm = response.parse() assert_matches_type(MdmGetDistanceMatrixStatusResponse, mdm, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_get_distance_matrix_status(self, client: NextbillionSDK) -> None: with client.mdm.with_streaming_response.get_distance_matrix_status( @@ -127,7 +127,7 @@ class TestAsyncMdm: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_distance_matrix(self, async_client: AsyncNextbillionSDK) -> None: mdm = await async_client.mdm.create_distance_matrix( @@ -137,7 +137,7 @@ async def test_method_create_distance_matrix(self, async_client: AsyncNextbillio ) assert_matches_type(MdmCreateDistanceMatrixResponse, mdm, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_distance_matrix_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: mdm = await async_client.mdm.create_distance_matrix( @@ -161,7 +161,7 @@ async def test_method_create_distance_matrix_with_all_params(self, async_client: ) assert_matches_type(MdmCreateDistanceMatrixResponse, mdm, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create_distance_matrix(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.mdm.with_raw_response.create_distance_matrix( @@ -175,7 +175,7 @@ async def test_raw_response_create_distance_matrix(self, async_client: AsyncNext mdm = await response.parse() assert_matches_type(MdmCreateDistanceMatrixResponse, mdm, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create_distance_matrix(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.mdm.with_streaming_response.create_distance_matrix( @@ -191,7 +191,7 @@ async def test_streaming_response_create_distance_matrix(self, async_client: Asy assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_get_distance_matrix_status(self, async_client: AsyncNextbillionSDK) -> None: mdm = await async_client.mdm.get_distance_matrix_status( @@ -200,7 +200,7 @@ async def test_method_get_distance_matrix_status(self, async_client: AsyncNextbi ) assert_matches_type(MdmGetDistanceMatrixStatusResponse, mdm, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_get_distance_matrix_status(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.mdm.with_raw_response.get_distance_matrix_status( @@ -213,7 +213,7 @@ async def test_raw_response_get_distance_matrix_status(self, async_client: Async mdm = await response.parse() assert_matches_type(MdmGetDistanceMatrixStatusResponse, mdm, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_get_distance_matrix_status(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.mdm.with_streaming_response.get_distance_matrix_status( diff --git a/tests/api_resources/test_multigeocode.py b/tests/api_resources/test_multigeocode.py index 9d26e0e..f38be9b 100644 --- a/tests/api_resources/test_multigeocode.py +++ b/tests/api_resources/test_multigeocode.py @@ -17,7 +17,7 @@ class TestMultigeocode: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_search(self, client: NextbillionSDK) -> None: multigeocode = client.multigeocode.search( @@ -30,7 +30,7 @@ def test_method_search(self, client: NextbillionSDK) -> None: ) assert_matches_type(MultigeocodeSearchResponse, multigeocode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_search_with_all_params(self, client: NextbillionSDK) -> None: multigeocode = client.multigeocode.search( @@ -51,7 +51,7 @@ def test_method_search_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(MultigeocodeSearchResponse, multigeocode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_search(self, client: NextbillionSDK) -> None: response = client.multigeocode.with_raw_response.search( @@ -68,7 +68,7 @@ def test_raw_response_search(self, client: NextbillionSDK) -> None: multigeocode = response.parse() assert_matches_type(MultigeocodeSearchResponse, multigeocode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_search(self, client: NextbillionSDK) -> None: with client.multigeocode.with_streaming_response.search( @@ -93,7 +93,7 @@ class TestAsyncMultigeocode: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_search(self, async_client: AsyncNextbillionSDK) -> None: multigeocode = await async_client.multigeocode.search( @@ -106,7 +106,7 @@ async def test_method_search(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(MultigeocodeSearchResponse, multigeocode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_search_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: multigeocode = await async_client.multigeocode.search( @@ -127,7 +127,7 @@ async def test_method_search_with_all_params(self, async_client: AsyncNextbillio ) assert_matches_type(MultigeocodeSearchResponse, multigeocode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_search(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.multigeocode.with_raw_response.search( @@ -144,7 +144,7 @@ async def test_raw_response_search(self, async_client: AsyncNextbillionSDK) -> N multigeocode = await response.parse() assert_matches_type(MultigeocodeSearchResponse, multigeocode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_search(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.multigeocode.with_streaming_response.search( diff --git a/tests/api_resources/test_navigation.py b/tests/api_resources/test_navigation.py index 49f6b4f..88f7066 100644 --- a/tests/api_resources/test_navigation.py +++ b/tests/api_resources/test_navigation.py @@ -17,7 +17,7 @@ class TestNavigation: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve_route(self, client: NextbillionSDK) -> None: navigation = client.navigation.retrieve_route( @@ -25,7 +25,7 @@ def test_method_retrieve_route(self, client: NextbillionSDK) -> None: ) assert_matches_type(NavigationRetrieveRouteResponse, navigation, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve_route_with_all_params(self, client: NextbillionSDK) -> None: navigation = client.navigation.retrieve_route( @@ -47,7 +47,7 @@ def test_method_retrieve_route_with_all_params(self, client: NextbillionSDK) -> ) assert_matches_type(NavigationRetrieveRouteResponse, navigation, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve_route(self, client: NextbillionSDK) -> None: response = client.navigation.with_raw_response.retrieve_route( @@ -59,7 +59,7 @@ def test_raw_response_retrieve_route(self, client: NextbillionSDK) -> None: navigation = response.parse() assert_matches_type(NavigationRetrieveRouteResponse, navigation, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve_route(self, client: NextbillionSDK) -> None: with client.navigation.with_streaming_response.retrieve_route( @@ -79,7 +79,7 @@ class TestAsyncNavigation: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve_route(self, async_client: AsyncNextbillionSDK) -> None: navigation = await async_client.navigation.retrieve_route( @@ -87,7 +87,7 @@ async def test_method_retrieve_route(self, async_client: AsyncNextbillionSDK) -> ) assert_matches_type(NavigationRetrieveRouteResponse, navigation, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve_route_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: navigation = await async_client.navigation.retrieve_route( @@ -109,7 +109,7 @@ async def test_method_retrieve_route_with_all_params(self, async_client: AsyncNe ) assert_matches_type(NavigationRetrieveRouteResponse, navigation, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve_route(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.navigation.with_raw_response.retrieve_route( @@ -121,7 +121,7 @@ async def test_raw_response_retrieve_route(self, async_client: AsyncNextbillionS navigation = await response.parse() assert_matches_type(NavigationRetrieveRouteResponse, navigation, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve_route(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.navigation.with_streaming_response.retrieve_route( diff --git a/tests/api_resources/test_optimization.py b/tests/api_resources/test_optimization.py index 458c502..6b9e5c2 100644 --- a/tests/api_resources/test_optimization.py +++ b/tests/api_resources/test_optimization.py @@ -20,7 +20,7 @@ class TestOptimization: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_compute(self, client: NextbillionSDK) -> None: optimization = client.optimization.compute( @@ -29,7 +29,7 @@ def test_method_compute(self, client: NextbillionSDK) -> None: ) assert_matches_type(OptimizationComputeResponse, optimization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_compute_with_all_params(self, client: NextbillionSDK) -> None: optimization = client.optimization.compute( @@ -45,7 +45,7 @@ def test_method_compute_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(OptimizationComputeResponse, optimization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_compute(self, client: NextbillionSDK) -> None: response = client.optimization.with_raw_response.compute( @@ -58,7 +58,7 @@ def test_raw_response_compute(self, client: NextbillionSDK) -> None: optimization = response.parse() assert_matches_type(OptimizationComputeResponse, optimization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_compute(self, client: NextbillionSDK) -> None: with client.optimization.with_streaming_response.compute( @@ -73,7 +73,7 @@ def test_streaming_response_compute(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_re_optimize(self, client: NextbillionSDK) -> None: optimization = client.optimization.re_optimize( @@ -82,7 +82,7 @@ def test_method_re_optimize(self, client: NextbillionSDK) -> None: ) assert_matches_type(PostResponse, optimization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_re_optimize_with_all_params(self, client: NextbillionSDK) -> None: optimization = client.optimization.re_optimize( @@ -281,7 +281,7 @@ def test_method_re_optimize_with_all_params(self, client: NextbillionSDK) -> Non ) assert_matches_type(PostResponse, optimization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_re_optimize(self, client: NextbillionSDK) -> None: response = client.optimization.with_raw_response.re_optimize( @@ -294,7 +294,7 @@ def test_raw_response_re_optimize(self, client: NextbillionSDK) -> None: optimization = response.parse() assert_matches_type(PostResponse, optimization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_re_optimize(self, client: NextbillionSDK) -> None: with client.optimization.with_streaming_response.re_optimize( @@ -315,7 +315,7 @@ class TestAsyncOptimization: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_compute(self, async_client: AsyncNextbillionSDK) -> None: optimization = await async_client.optimization.compute( @@ -324,7 +324,7 @@ async def test_method_compute(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(OptimizationComputeResponse, optimization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_compute_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: optimization = await async_client.optimization.compute( @@ -340,7 +340,7 @@ async def test_method_compute_with_all_params(self, async_client: AsyncNextbilli ) assert_matches_type(OptimizationComputeResponse, optimization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_compute(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.optimization.with_raw_response.compute( @@ -353,7 +353,7 @@ async def test_raw_response_compute(self, async_client: AsyncNextbillionSDK) -> optimization = await response.parse() assert_matches_type(OptimizationComputeResponse, optimization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_compute(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.optimization.with_streaming_response.compute( @@ -368,7 +368,7 @@ async def test_streaming_response_compute(self, async_client: AsyncNextbillionSD assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_re_optimize(self, async_client: AsyncNextbillionSDK) -> None: optimization = await async_client.optimization.re_optimize( @@ -377,7 +377,7 @@ async def test_method_re_optimize(self, async_client: AsyncNextbillionSDK) -> No ) assert_matches_type(PostResponse, optimization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_re_optimize_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: optimization = await async_client.optimization.re_optimize( @@ -576,7 +576,7 @@ async def test_method_re_optimize_with_all_params(self, async_client: AsyncNextb ) assert_matches_type(PostResponse, optimization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_re_optimize(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.optimization.with_raw_response.re_optimize( @@ -589,7 +589,7 @@ async def test_raw_response_re_optimize(self, async_client: AsyncNextbillionSDK) optimization = await response.parse() assert_matches_type(PostResponse, optimization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_re_optimize(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.optimization.with_streaming_response.re_optimize( diff --git a/tests/api_resources/test_postalcode.py b/tests/api_resources/test_postalcode.py index ccfa38d..3cce638 100644 --- a/tests/api_resources/test_postalcode.py +++ b/tests/api_resources/test_postalcode.py @@ -17,7 +17,7 @@ class TestPostalcode: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve_coordinates(self, client: NextbillionSDK) -> None: postalcode = client.postalcode.retrieve_coordinates( @@ -25,7 +25,7 @@ def test_method_retrieve_coordinates(self, client: NextbillionSDK) -> None: ) assert_matches_type(PostalcodeRetrieveCoordinatesResponse, postalcode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve_coordinates_with_all_params(self, client: NextbillionSDK) -> None: postalcode = client.postalcode.retrieve_coordinates( @@ -40,7 +40,7 @@ def test_method_retrieve_coordinates_with_all_params(self, client: NextbillionSD ) assert_matches_type(PostalcodeRetrieveCoordinatesResponse, postalcode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve_coordinates(self, client: NextbillionSDK) -> None: response = client.postalcode.with_raw_response.retrieve_coordinates( @@ -52,7 +52,7 @@ def test_raw_response_retrieve_coordinates(self, client: NextbillionSDK) -> None postalcode = response.parse() assert_matches_type(PostalcodeRetrieveCoordinatesResponse, postalcode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve_coordinates(self, client: NextbillionSDK) -> None: with client.postalcode.with_streaming_response.retrieve_coordinates( @@ -72,7 +72,7 @@ class TestAsyncPostalcode: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve_coordinates(self, async_client: AsyncNextbillionSDK) -> None: postalcode = await async_client.postalcode.retrieve_coordinates( @@ -80,7 +80,7 @@ async def test_method_retrieve_coordinates(self, async_client: AsyncNextbillionS ) assert_matches_type(PostalcodeRetrieveCoordinatesResponse, postalcode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve_coordinates_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: postalcode = await async_client.postalcode.retrieve_coordinates( @@ -95,7 +95,7 @@ async def test_method_retrieve_coordinates_with_all_params(self, async_client: A ) assert_matches_type(PostalcodeRetrieveCoordinatesResponse, postalcode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve_coordinates(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.postalcode.with_raw_response.retrieve_coordinates( @@ -107,7 +107,7 @@ async def test_raw_response_retrieve_coordinates(self, async_client: AsyncNextbi postalcode = await response.parse() assert_matches_type(PostalcodeRetrieveCoordinatesResponse, postalcode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve_coordinates(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.postalcode.with_streaming_response.retrieve_coordinates( diff --git a/tests/api_resources/test_restrictions.py b/tests/api_resources/test_restrictions.py index 6eb0e31..b865184 100644 --- a/tests/api_resources/test_restrictions.py +++ b/tests/api_resources/test_restrictions.py @@ -22,7 +22,7 @@ class TestRestrictions: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create(self, client: NextbillionSDK) -> None: restriction = client.restrictions.create( @@ -33,7 +33,7 @@ def test_method_create(self, client: NextbillionSDK) -> None: ) assert_matches_type(RichGroupResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_with_all_params(self, client: NextbillionSDK) -> None: restriction = client.restrictions.create( @@ -72,7 +72,7 @@ def test_method_create_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(RichGroupResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create(self, client: NextbillionSDK) -> None: response = client.restrictions.with_raw_response.create( @@ -87,7 +87,7 @@ def test_raw_response_create(self, client: NextbillionSDK) -> None: restriction = response.parse() assert_matches_type(RichGroupResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create(self, client: NextbillionSDK) -> None: with client.restrictions.with_streaming_response.create( @@ -104,7 +104,7 @@ def test_streaming_response_create(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve(self, client: NextbillionSDK) -> None: restriction = client.restrictions.retrieve( @@ -113,7 +113,7 @@ def test_method_retrieve(self, client: NextbillionSDK) -> None: ) assert_matches_type(RichGroupResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve_with_all_params(self, client: NextbillionSDK) -> None: restriction = client.restrictions.retrieve( @@ -123,7 +123,7 @@ def test_method_retrieve_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(RichGroupResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: NextbillionSDK) -> None: response = client.restrictions.with_raw_response.retrieve( @@ -136,7 +136,7 @@ def test_raw_response_retrieve(self, client: NextbillionSDK) -> None: restriction = response.parse() assert_matches_type(RichGroupResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: NextbillionSDK) -> None: with client.restrictions.with_streaming_response.retrieve( @@ -151,7 +151,7 @@ def test_streaming_response_retrieve(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update(self, client: NextbillionSDK) -> None: restriction = client.restrictions.update( @@ -162,7 +162,7 @@ def test_method_update(self, client: NextbillionSDK) -> None: ) assert_matches_type(RichGroupResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update_with_all_params(self, client: NextbillionSDK) -> None: restriction = client.restrictions.update( @@ -201,7 +201,7 @@ def test_method_update_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(RichGroupResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_update(self, client: NextbillionSDK) -> None: response = client.restrictions.with_raw_response.update( @@ -216,7 +216,7 @@ def test_raw_response_update(self, client: NextbillionSDK) -> None: restriction = response.parse() assert_matches_type(RichGroupResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_update(self, client: NextbillionSDK) -> None: with client.restrictions.with_streaming_response.update( @@ -233,7 +233,7 @@ def test_streaming_response_update(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list(self, client: NextbillionSDK) -> None: restriction = client.restrictions.list( @@ -244,7 +244,7 @@ def test_method_list(self, client: NextbillionSDK) -> None: ) assert_matches_type(RestrictionListResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_with_all_params(self, client: NextbillionSDK) -> None: restriction = client.restrictions.list( @@ -262,7 +262,7 @@ def test_method_list_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(RestrictionListResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list(self, client: NextbillionSDK) -> None: response = client.restrictions.with_raw_response.list( @@ -277,7 +277,7 @@ def test_raw_response_list(self, client: NextbillionSDK) -> None: restriction = response.parse() assert_matches_type(RestrictionListResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list(self, client: NextbillionSDK) -> None: with client.restrictions.with_streaming_response.list( @@ -294,7 +294,7 @@ def test_streaming_response_list(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete(self, client: NextbillionSDK) -> None: restriction = client.restrictions.delete( @@ -303,7 +303,7 @@ def test_method_delete(self, client: NextbillionSDK) -> None: ) assert_matches_type(RestrictionDeleteResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_delete(self, client: NextbillionSDK) -> None: response = client.restrictions.with_raw_response.delete( @@ -316,7 +316,7 @@ def test_raw_response_delete(self, client: NextbillionSDK) -> None: restriction = response.parse() assert_matches_type(RestrictionDeleteResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_delete(self, client: NextbillionSDK) -> None: with client.restrictions.with_streaming_response.delete( @@ -331,7 +331,7 @@ def test_streaming_response_delete(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_by_bbox(self, client: NextbillionSDK) -> None: restriction = client.restrictions.list_by_bbox( @@ -343,7 +343,7 @@ def test_method_list_by_bbox(self, client: NextbillionSDK) -> None: ) assert_matches_type(RestrictionListByBboxResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_by_bbox_with_all_params(self, client: NextbillionSDK) -> None: restriction = client.restrictions.list_by_bbox( @@ -361,7 +361,7 @@ def test_method_list_by_bbox_with_all_params(self, client: NextbillionSDK) -> No ) assert_matches_type(RestrictionListByBboxResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list_by_bbox(self, client: NextbillionSDK) -> None: response = client.restrictions.with_raw_response.list_by_bbox( @@ -377,7 +377,7 @@ def test_raw_response_list_by_bbox(self, client: NextbillionSDK) -> None: restriction = response.parse() assert_matches_type(RestrictionListByBboxResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list_by_bbox(self, client: NextbillionSDK) -> None: with client.restrictions.with_streaming_response.list_by_bbox( @@ -395,7 +395,7 @@ def test_streaming_response_list_by_bbox(self, client: NextbillionSDK) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_set_state(self, client: NextbillionSDK) -> None: restriction = client.restrictions.set_state( @@ -405,7 +405,7 @@ def test_method_set_state(self, client: NextbillionSDK) -> None: ) assert_matches_type(RichGroupResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_set_state(self, client: NextbillionSDK) -> None: response = client.restrictions.with_raw_response.set_state( @@ -419,7 +419,7 @@ def test_raw_response_set_state(self, client: NextbillionSDK) -> None: restriction = response.parse() assert_matches_type(RichGroupResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_set_state(self, client: NextbillionSDK) -> None: with client.restrictions.with_streaming_response.set_state( @@ -441,7 +441,7 @@ class TestAsyncRestrictions: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncNextbillionSDK) -> None: restriction = await async_client.restrictions.create( @@ -452,7 +452,7 @@ async def test_method_create(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(RichGroupResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: restriction = await async_client.restrictions.create( @@ -491,7 +491,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncNextbillio ) assert_matches_type(RichGroupResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.restrictions.with_raw_response.create( @@ -506,7 +506,7 @@ async def test_raw_response_create(self, async_client: AsyncNextbillionSDK) -> N restriction = await response.parse() assert_matches_type(RichGroupResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.restrictions.with_streaming_response.create( @@ -523,7 +523,7 @@ async def test_streaming_response_create(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve(self, async_client: AsyncNextbillionSDK) -> None: restriction = await async_client.restrictions.retrieve( @@ -532,7 +532,7 @@ async def test_method_retrieve(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(RichGroupResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: restriction = await async_client.restrictions.retrieve( @@ -542,7 +542,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncNextbill ) assert_matches_type(RichGroupResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.restrictions.with_raw_response.retrieve( @@ -555,7 +555,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncNextbillionSDK) -> restriction = await response.parse() assert_matches_type(RichGroupResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.restrictions.with_streaming_response.retrieve( @@ -570,7 +570,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncNextbillionS assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update(self, async_client: AsyncNextbillionSDK) -> None: restriction = await async_client.restrictions.update( @@ -581,7 +581,7 @@ async def test_method_update(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(RichGroupResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: restriction = await async_client.restrictions.update( @@ -620,7 +620,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncNextbillio ) assert_matches_type(RichGroupResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_update(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.restrictions.with_raw_response.update( @@ -635,7 +635,7 @@ async def test_raw_response_update(self, async_client: AsyncNextbillionSDK) -> N restriction = await response.parse() assert_matches_type(RichGroupResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_update(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.restrictions.with_streaming_response.update( @@ -652,7 +652,7 @@ async def test_streaming_response_update(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncNextbillionSDK) -> None: restriction = await async_client.restrictions.list( @@ -663,7 +663,7 @@ async def test_method_list(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(RestrictionListResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: restriction = await async_client.restrictions.list( @@ -681,7 +681,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncNextbillionS ) assert_matches_type(RestrictionListResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.restrictions.with_raw_response.list( @@ -696,7 +696,7 @@ async def test_raw_response_list(self, async_client: AsyncNextbillionSDK) -> Non restriction = await response.parse() assert_matches_type(RestrictionListResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.restrictions.with_streaming_response.list( @@ -713,7 +713,7 @@ async def test_streaming_response_list(self, async_client: AsyncNextbillionSDK) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncNextbillionSDK) -> None: restriction = await async_client.restrictions.delete( @@ -722,7 +722,7 @@ async def test_method_delete(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(RestrictionDeleteResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.restrictions.with_raw_response.delete( @@ -735,7 +735,7 @@ async def test_raw_response_delete(self, async_client: AsyncNextbillionSDK) -> N restriction = await response.parse() assert_matches_type(RestrictionDeleteResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.restrictions.with_streaming_response.delete( @@ -750,7 +750,7 @@ async def test_streaming_response_delete(self, async_client: AsyncNextbillionSDK assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_by_bbox(self, async_client: AsyncNextbillionSDK) -> None: restriction = await async_client.restrictions.list_by_bbox( @@ -762,7 +762,7 @@ async def test_method_list_by_bbox(self, async_client: AsyncNextbillionSDK) -> N ) assert_matches_type(RestrictionListByBboxResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_by_bbox_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: restriction = await async_client.restrictions.list_by_bbox( @@ -780,7 +780,7 @@ async def test_method_list_by_bbox_with_all_params(self, async_client: AsyncNext ) assert_matches_type(RestrictionListByBboxResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list_by_bbox(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.restrictions.with_raw_response.list_by_bbox( @@ -796,7 +796,7 @@ async def test_raw_response_list_by_bbox(self, async_client: AsyncNextbillionSDK restriction = await response.parse() assert_matches_type(RestrictionListByBboxResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list_by_bbox(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.restrictions.with_streaming_response.list_by_bbox( @@ -814,7 +814,7 @@ async def test_streaming_response_list_by_bbox(self, async_client: AsyncNextbill assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_set_state(self, async_client: AsyncNextbillionSDK) -> None: restriction = await async_client.restrictions.set_state( @@ -824,7 +824,7 @@ async def test_method_set_state(self, async_client: AsyncNextbillionSDK) -> None ) assert_matches_type(RichGroupResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_set_state(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.restrictions.with_raw_response.set_state( @@ -838,7 +838,7 @@ async def test_raw_response_set_state(self, async_client: AsyncNextbillionSDK) - restriction = await response.parse() assert_matches_type(RichGroupResponse, restriction, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_set_state(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.restrictions.with_streaming_response.set_state( diff --git a/tests/api_resources/test_restrictions_items.py b/tests/api_resources/test_restrictions_items.py index 176c273..a784dc9 100644 --- a/tests/api_resources/test_restrictions_items.py +++ b/tests/api_resources/test_restrictions_items.py @@ -17,7 +17,7 @@ class TestRestrictionsItems: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list(self, client: NextbillionSDK) -> None: restrictions_item = client.restrictions_items.list( @@ -28,7 +28,7 @@ def test_method_list(self, client: NextbillionSDK) -> None: ) assert_matches_type(RestrictionsItemListResponse, restrictions_item, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_with_all_params(self, client: NextbillionSDK) -> None: restrictions_item = client.restrictions_items.list( @@ -45,7 +45,7 @@ def test_method_list_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(RestrictionsItemListResponse, restrictions_item, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list(self, client: NextbillionSDK) -> None: response = client.restrictions_items.with_raw_response.list( @@ -60,7 +60,7 @@ def test_raw_response_list(self, client: NextbillionSDK) -> None: restrictions_item = response.parse() assert_matches_type(RestrictionsItemListResponse, restrictions_item, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list(self, client: NextbillionSDK) -> None: with client.restrictions_items.with_streaming_response.list( @@ -83,7 +83,7 @@ class TestAsyncRestrictionsItems: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncNextbillionSDK) -> None: restrictions_item = await async_client.restrictions_items.list( @@ -94,7 +94,7 @@ async def test_method_list(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(RestrictionsItemListResponse, restrictions_item, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: restrictions_item = await async_client.restrictions_items.list( @@ -111,7 +111,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncNextbillionS ) assert_matches_type(RestrictionsItemListResponse, restrictions_item, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.restrictions_items.with_raw_response.list( @@ -126,7 +126,7 @@ async def test_raw_response_list(self, async_client: AsyncNextbillionSDK) -> Non restrictions_item = await response.parse() assert_matches_type(RestrictionsItemListResponse, restrictions_item, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.restrictions_items.with_streaming_response.list( diff --git a/tests/api_resources/test_revgeocode.py b/tests/api_resources/test_revgeocode.py index a4addc1..ec0f137 100644 --- a/tests/api_resources/test_revgeocode.py +++ b/tests/api_resources/test_revgeocode.py @@ -17,7 +17,7 @@ class TestRevgeocode: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve(self, client: NextbillionSDK) -> None: revgeocode = client.revgeocode.retrieve( @@ -26,7 +26,7 @@ def test_method_retrieve(self, client: NextbillionSDK) -> None: ) assert_matches_type(RevgeocodeRetrieveResponse, revgeocode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve_with_all_params(self, client: NextbillionSDK) -> None: revgeocode = client.revgeocode.retrieve( @@ -37,7 +37,7 @@ def test_method_retrieve_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(RevgeocodeRetrieveResponse, revgeocode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: NextbillionSDK) -> None: response = client.revgeocode.with_raw_response.retrieve( @@ -50,7 +50,7 @@ def test_raw_response_retrieve(self, client: NextbillionSDK) -> None: revgeocode = response.parse() assert_matches_type(RevgeocodeRetrieveResponse, revgeocode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: NextbillionSDK) -> None: with client.revgeocode.with_streaming_response.retrieve( @@ -71,7 +71,7 @@ class TestAsyncRevgeocode: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve(self, async_client: AsyncNextbillionSDK) -> None: revgeocode = await async_client.revgeocode.retrieve( @@ -80,7 +80,7 @@ async def test_method_retrieve(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(RevgeocodeRetrieveResponse, revgeocode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: revgeocode = await async_client.revgeocode.retrieve( @@ -91,7 +91,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncNextbill ) assert_matches_type(RevgeocodeRetrieveResponse, revgeocode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.revgeocode.with_raw_response.retrieve( @@ -104,7 +104,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncNextbillionSDK) -> revgeocode = await response.parse() assert_matches_type(RevgeocodeRetrieveResponse, revgeocode, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.revgeocode.with_streaming_response.retrieve( diff --git a/tests/api_resources/test_route_report.py b/tests/api_resources/test_route_report.py index 7ab435f..4715351 100644 --- a/tests/api_resources/test_route_report.py +++ b/tests/api_resources/test_route_report.py @@ -17,7 +17,7 @@ class TestRouteReport: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create(self, client: NextbillionSDK) -> None: route_report = client.route_report.create( @@ -27,7 +27,7 @@ def test_method_create(self, client: NextbillionSDK) -> None: ) assert_matches_type(RouteReportCreateResponse, route_report, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create(self, client: NextbillionSDK) -> None: response = client.route_report.with_raw_response.create( @@ -41,7 +41,7 @@ def test_raw_response_create(self, client: NextbillionSDK) -> None: route_report = response.parse() assert_matches_type(RouteReportCreateResponse, route_report, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create(self, client: NextbillionSDK) -> None: with client.route_report.with_streaming_response.create( @@ -63,7 +63,7 @@ class TestAsyncRouteReport: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncNextbillionSDK) -> None: route_report = await async_client.route_report.create( @@ -73,7 +73,7 @@ async def test_method_create(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(RouteReportCreateResponse, route_report, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.route_report.with_raw_response.create( @@ -87,7 +87,7 @@ async def test_raw_response_create(self, async_client: AsyncNextbillionSDK) -> N route_report = await response.parse() assert_matches_type(RouteReportCreateResponse, route_report, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.route_report.with_streaming_response.create( diff --git a/tests/api_resources/test_skynet.py b/tests/api_resources/test_skynet.py index b21ca33..d25b2d9 100644 --- a/tests/api_resources/test_skynet.py +++ b/tests/api_resources/test_skynet.py @@ -17,7 +17,7 @@ class TestSkynet: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_subscribe(self, client: NextbillionSDK) -> None: skynet = client.skynet.subscribe( @@ -25,7 +25,7 @@ def test_method_subscribe(self, client: NextbillionSDK) -> None: ) assert_matches_type(SkynetSubscribeResponse, skynet, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_subscribe_with_all_params(self, client: NextbillionSDK) -> None: skynet = client.skynet.subscribe( @@ -35,7 +35,7 @@ def test_method_subscribe_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(SkynetSubscribeResponse, skynet, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_subscribe(self, client: NextbillionSDK) -> None: response = client.skynet.with_raw_response.subscribe( @@ -47,7 +47,7 @@ def test_raw_response_subscribe(self, client: NextbillionSDK) -> None: skynet = response.parse() assert_matches_type(SkynetSubscribeResponse, skynet, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_subscribe(self, client: NextbillionSDK) -> None: with client.skynet.with_streaming_response.subscribe( @@ -67,7 +67,7 @@ class TestAsyncSkynet: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_subscribe(self, async_client: AsyncNextbillionSDK) -> None: skynet = await async_client.skynet.subscribe( @@ -75,7 +75,7 @@ async def test_method_subscribe(self, async_client: AsyncNextbillionSDK) -> None ) assert_matches_type(SkynetSubscribeResponse, skynet, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_subscribe_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: skynet = await async_client.skynet.subscribe( @@ -85,7 +85,7 @@ async def test_method_subscribe_with_all_params(self, async_client: AsyncNextbil ) assert_matches_type(SkynetSubscribeResponse, skynet, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_subscribe(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.skynet.with_raw_response.subscribe( @@ -97,7 +97,7 @@ async def test_raw_response_subscribe(self, async_client: AsyncNextbillionSDK) - skynet = await response.parse() assert_matches_type(SkynetSubscribeResponse, skynet, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_subscribe(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.skynet.with_streaming_response.subscribe( diff --git a/tests/api_resources/test_snap_to_roads.py b/tests/api_resources/test_snap_to_roads.py index 63a1484..33adb98 100644 --- a/tests/api_resources/test_snap_to_roads.py +++ b/tests/api_resources/test_snap_to_roads.py @@ -17,7 +17,7 @@ class TestSnapToRoads: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_snap(self, client: NextbillionSDK) -> None: snap_to_road = client.snap_to_roads.snap( @@ -26,7 +26,7 @@ def test_method_snap(self, client: NextbillionSDK) -> None: ) assert_matches_type(SnapToRoadSnapResponse, snap_to_road, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_snap_with_all_params(self, client: NextbillionSDK) -> None: snap_to_road = client.snap_to_roads.snap( @@ -44,7 +44,7 @@ def test_method_snap_with_all_params(self, client: NextbillionSDK) -> None: ) assert_matches_type(SnapToRoadSnapResponse, snap_to_road, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_snap(self, client: NextbillionSDK) -> None: response = client.snap_to_roads.with_raw_response.snap( @@ -57,7 +57,7 @@ def test_raw_response_snap(self, client: NextbillionSDK) -> None: snap_to_road = response.parse() assert_matches_type(SnapToRoadSnapResponse, snap_to_road, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_snap(self, client: NextbillionSDK) -> None: with client.snap_to_roads.with_streaming_response.snap( @@ -78,7 +78,7 @@ class TestAsyncSnapToRoads: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_snap(self, async_client: AsyncNextbillionSDK) -> None: snap_to_road = await async_client.snap_to_roads.snap( @@ -87,7 +87,7 @@ async def test_method_snap(self, async_client: AsyncNextbillionSDK) -> None: ) assert_matches_type(SnapToRoadSnapResponse, snap_to_road, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_snap_with_all_params(self, async_client: AsyncNextbillionSDK) -> None: snap_to_road = await async_client.snap_to_roads.snap( @@ -105,7 +105,7 @@ async def test_method_snap_with_all_params(self, async_client: AsyncNextbillionS ) assert_matches_type(SnapToRoadSnapResponse, snap_to_road, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_snap(self, async_client: AsyncNextbillionSDK) -> None: response = await async_client.snap_to_roads.with_raw_response.snap( @@ -118,7 +118,7 @@ async def test_raw_response_snap(self, async_client: AsyncNextbillionSDK) -> Non snap_to_road = await response.parse() assert_matches_type(SnapToRoadSnapResponse, snap_to_road, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_snap(self, async_client: AsyncNextbillionSDK) -> None: async with async_client.snap_to_roads.with_streaming_response.snap( From 623da5a8f4e690185e66bb10060d6ae5c09fa7b2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 22 Aug 2025 08:11:09 +0000 Subject: [PATCH 05/35] chore: update github action --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c4eb56b..997c956 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: run: ./scripts/lint build: - if: github.repository == 'stainless-sdks/nextbillion-sdk-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork) + if: github.event_name == 'push' || github.event.pull_request.head.repo.fork timeout-minutes: 10 name: build permissions: @@ -61,12 +61,14 @@ jobs: run: rye build - name: Get GitHub OIDC Token + if: github.repository == 'stainless-sdks/nextbillion-sdk-python' id: github-oidc uses: actions/github-script@v6 with: script: core.setOutput('github_token', await core.getIDToken()); - name: Upload tarball + if: github.repository == 'stainless-sdks/nextbillion-sdk-python' env: URL: https://pkg.stainless.com/s AUTH: ${{ steps.github-oidc.outputs.github_token }} From 0cc1cdff89de3c7453b781a567d5853ac2d6dbb6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 26 Aug 2025 06:23:39 +0000 Subject: [PATCH 06/35] chore(internal): change ci workflow machines --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 997c956..afbafa3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,7 +42,7 @@ jobs: permissions: contents: read id-token: write - runs-on: depot-ubuntu-24.04 + runs-on: ${{ github.repository == 'stainless-sdks/nextbillion-sdk-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} steps: - uses: actions/checkout@v4 From 8be2d006207d7891b8fdf6a2a8985b5107e66137 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 27 Aug 2025 09:23:26 +0000 Subject: [PATCH 07/35] fix: avoid newer type syntax --- src/nextbillionai/_models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nextbillionai/_models.py b/src/nextbillionai/_models.py index b8387ce..92f7c10 100644 --- a/src/nextbillionai/_models.py +++ b/src/nextbillionai/_models.py @@ -304,7 +304,7 @@ def model_dump( exclude_none=exclude_none, ) - return cast(dict[str, Any], json_safe(dumped)) if mode == "json" else dumped + return cast("dict[str, Any]", json_safe(dumped)) if mode == "json" else dumped @override def model_dump_json( From f52b313f51371fcb984383806a94b09a3e28e988 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 27 Aug 2025 09:42:45 +0000 Subject: [PATCH 08/35] chore(internal): update pyright exclude list --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 1c96501..e8012f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -148,6 +148,7 @@ exclude = [ "_dev", ".venv", ".nox", + ".git", ] reportImplicitOverride = true From 59172cd255e31005a12c28c411d28af93d774a11 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 30 Aug 2025 04:51:34 +0000 Subject: [PATCH 09/35] chore(internal): add Sequence related utils --- src/nextbillionai/_types.py | 36 +++++++++++++++++++++++++++- src/nextbillionai/_utils/__init__.py | 1 + src/nextbillionai/_utils/_typing.py | 5 ++++ tests/utils.py | 10 +++++++- 4 files changed, 50 insertions(+), 2 deletions(-) diff --git a/src/nextbillionai/_types.py b/src/nextbillionai/_types.py index 13abb80..6f6f291 100644 --- a/src/nextbillionai/_types.py +++ b/src/nextbillionai/_types.py @@ -13,10 +13,21 @@ Mapping, TypeVar, Callable, + Iterator, Optional, Sequence, ) -from typing_extensions import Set, Literal, Protocol, TypeAlias, TypedDict, override, runtime_checkable +from typing_extensions import ( + Set, + Literal, + Protocol, + TypeAlias, + TypedDict, + SupportsIndex, + overload, + override, + runtime_checkable, +) import httpx import pydantic @@ -217,3 +228,26 @@ class _GenericAlias(Protocol): class HttpxSendArgs(TypedDict, total=False): auth: httpx.Auth follow_redirects: bool + + +_T_co = TypeVar("_T_co", covariant=True) + + +if TYPE_CHECKING: + # This works because str.__contains__ does not accept object (either in typeshed or at runtime) + # https://github.com/hauntsaninja/useful_types/blob/5e9710f3875107d068e7679fd7fec9cfab0eff3b/useful_types/__init__.py#L285 + class SequenceNotStr(Protocol[_T_co]): + @overload + def __getitem__(self, index: SupportsIndex, /) -> _T_co: ... + @overload + def __getitem__(self, index: slice, /) -> Sequence[_T_co]: ... + def __contains__(self, value: object, /) -> bool: ... + def __len__(self) -> int: ... + def __iter__(self) -> Iterator[_T_co]: ... + def index(self, value: Any, start: int = 0, stop: int = ..., /) -> int: ... + def count(self, value: Any, /) -> int: ... + def __reversed__(self) -> Iterator[_T_co]: ... +else: + # just point this to a normal `Sequence` at runtime to avoid having to special case + # deserializing our custom sequence type + SequenceNotStr = Sequence diff --git a/src/nextbillionai/_utils/__init__.py b/src/nextbillionai/_utils/__init__.py index d4fda26..ca547ce 100644 --- a/src/nextbillionai/_utils/__init__.py +++ b/src/nextbillionai/_utils/__init__.py @@ -38,6 +38,7 @@ extract_type_arg as extract_type_arg, is_iterable_type as is_iterable_type, is_required_type as is_required_type, + is_sequence_type as is_sequence_type, is_annotated_type as is_annotated_type, is_type_alias_type as is_type_alias_type, strip_annotated_type as strip_annotated_type, diff --git a/src/nextbillionai/_utils/_typing.py b/src/nextbillionai/_utils/_typing.py index 1bac954..845cd6b 100644 --- a/src/nextbillionai/_utils/_typing.py +++ b/src/nextbillionai/_utils/_typing.py @@ -26,6 +26,11 @@ def is_list_type(typ: type) -> bool: return (get_origin(typ) or typ) == list +def is_sequence_type(typ: type) -> bool: + origin = get_origin(typ) or typ + return origin == typing_extensions.Sequence or origin == typing.Sequence or origin == _c_abc.Sequence + + def is_iterable_type(typ: type) -> bool: """If the given type is `typing.Iterable[T]`""" origin = get_origin(typ) or typ diff --git a/tests/utils.py b/tests/utils.py index 2e59280..ddab04d 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -4,7 +4,7 @@ import inspect import traceback import contextlib -from typing import Any, TypeVar, Iterator, cast +from typing import Any, TypeVar, Iterator, Sequence, cast from datetime import date, datetime from typing_extensions import Literal, get_args, get_origin, assert_type @@ -15,6 +15,7 @@ is_list_type, is_union_type, extract_type_arg, + is_sequence_type, is_annotated_type, is_type_alias_type, ) @@ -71,6 +72,13 @@ def assert_matches_type( if is_list_type(type_): return _assert_list_type(type_, value) + if is_sequence_type(type_): + assert isinstance(value, Sequence) + inner_type = get_args(type_)[0] + for entry in value: # type: ignore + assert_type(inner_type, entry) # type: ignore + return + if origin == str: assert isinstance(value, str) elif origin == int: From ac97bcc961a56515cfc8848ada4eb321f0446c63 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 3 Sep 2025 04:10:21 +0000 Subject: [PATCH 10/35] feat(types): replace List[str] with SequenceNotStr in params --- src/nextbillionai/_utils/_transform.py | 6 ++++++ src/nextbillionai/resources/geofence/batch.py | 8 ++++---- .../resources/geofence/console.py | 7 +++---- .../resources/geofence/geofence.py | 11 +++++------ .../resources/optimization/optimization.py | 7 +++---- .../resources/skynet/asset/asset.py | 11 +++++------ src/nextbillionai/resources/skynet/config.py | 7 +++---- src/nextbillionai/resources/skynet/monitor.py | 19 +++++++++---------- .../types/geofence/batch_delete_params.py | 5 +++-- .../types/geofence/console_preview_params.py | 6 ++++-- .../types/geofence_create_params.py | 6 ++++-- .../types/geofence_entity_create_param.py | 6 ++++-- .../types/geofence_update_params.py | 6 ++++-- .../types/optimization/job_param.py | 10 ++++++---- .../types/optimization/shipment_param.py | 8 +++++--- .../types/optimization/v2_submit_params.py | 7 ++++--- .../types/optimization_re_optimize_params.py | 11 ++++++----- .../types/skynet/asset_create_params.py | 4 ++-- .../types/skynet/asset_update_params.py | 4 ++-- .../types/skynet/config_update_params.py | 5 +++-- .../types/skynet/monitor_create_params.py | 8 ++++---- .../types/skynet/monitor_update_params.py | 8 ++++---- 22 files changed, 93 insertions(+), 77 deletions(-) diff --git a/src/nextbillionai/_utils/_transform.py b/src/nextbillionai/_utils/_transform.py index b0cc20a..f0bcefd 100644 --- a/src/nextbillionai/_utils/_transform.py +++ b/src/nextbillionai/_utils/_transform.py @@ -16,6 +16,7 @@ lru_cache, is_mapping, is_iterable, + is_sequence, ) from .._files import is_base64_file_input from ._typing import ( @@ -24,6 +25,7 @@ extract_type_arg, is_iterable_type, is_required_type, + is_sequence_type, is_annotated_type, strip_annotated_type, ) @@ -184,6 +186,8 @@ def _transform_recursive( (is_list_type(stripped_type) and is_list(data)) # Iterable[T] or (is_iterable_type(stripped_type) and is_iterable(data) and not isinstance(data, str)) + # Sequence[T] + or (is_sequence_type(stripped_type) and is_sequence(data) and not isinstance(data, str)) ): # dicts are technically iterable, but it is an iterable on the keys of the dict and is not usually # intended as an iterable, so we don't transform it. @@ -346,6 +350,8 @@ async def _async_transform_recursive( (is_list_type(stripped_type) and is_list(data)) # Iterable[T] or (is_iterable_type(stripped_type) and is_iterable(data) and not isinstance(data, str)) + # Sequence[T] + or (is_sequence_type(stripped_type) and is_sequence(data) and not isinstance(data, str)) ): # dicts are technically iterable, but it is an iterable on the keys of the dict and is not usually # intended as an iterable, so we don't transform it. diff --git a/src/nextbillionai/resources/geofence/batch.py b/src/nextbillionai/resources/geofence/batch.py index 06356e7..3c93e59 100644 --- a/src/nextbillionai/resources/geofence/batch.py +++ b/src/nextbillionai/resources/geofence/batch.py @@ -2,11 +2,11 @@ from __future__ import annotations -from typing import List, Iterable +from typing import Iterable import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -140,7 +140,7 @@ def delete( self, *, key: str, - ids: List[str] | NotGiven = NOT_GIVEN, + ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -294,7 +294,7 @@ async def delete( self, *, key: str, - ids: List[str] | NotGiven = NOT_GIVEN, + ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, diff --git a/src/nextbillionai/resources/geofence/console.py b/src/nextbillionai/resources/geofence/console.py index b0b5d12..9183f63 100644 --- a/src/nextbillionai/resources/geofence/console.py +++ b/src/nextbillionai/resources/geofence/console.py @@ -2,12 +2,11 @@ from __future__ import annotations -from typing import List from typing_extensions import Literal import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -55,7 +54,7 @@ def preview( meta_data: object | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, polygon: console_preview_params.Polygon | NotGiven = NOT_GIVEN, - tags: List[str] | NotGiven = NOT_GIVEN, + tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -206,7 +205,7 @@ async def preview( meta_data: object | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, polygon: console_preview_params.Polygon | NotGiven = NOT_GIVEN, - tags: List[str] | NotGiven = NOT_GIVEN, + tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, diff --git a/src/nextbillionai/resources/geofence/geofence.py b/src/nextbillionai/resources/geofence/geofence.py index 022c883..68f6836 100644 --- a/src/nextbillionai/resources/geofence/geofence.py +++ b/src/nextbillionai/resources/geofence/geofence.py @@ -2,7 +2,6 @@ from __future__ import annotations -from typing import List from typing_extensions import Literal import httpx @@ -31,7 +30,7 @@ ConsoleResourceWithStreamingResponse, AsyncConsoleResourceWithStreamingResponse, ) -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -90,7 +89,7 @@ def create( meta_data: object | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, polygon: geofence_create_params.Polygon | NotGiven = NOT_GIVEN, - tags: List[str] | NotGiven = NOT_GIVEN, + tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -231,7 +230,7 @@ def update( meta_data: object | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, polygon: geofence_update_params.Polygon | NotGiven = NOT_GIVEN, - tags: List[str] | NotGiven = NOT_GIVEN, + tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, type: Literal["circle", "polygon", "isochrone"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -525,7 +524,7 @@ async def create( meta_data: object | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, polygon: geofence_create_params.Polygon | NotGiven = NOT_GIVEN, - tags: List[str] | NotGiven = NOT_GIVEN, + tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -666,7 +665,7 @@ async def update( meta_data: object | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, polygon: geofence_update_params.Polygon | NotGiven = NOT_GIVEN, - tags: List[str] | NotGiven = NOT_GIVEN, + tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, type: Literal["circle", "polygon", "isochrone"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. diff --git a/src/nextbillionai/resources/optimization/optimization.py b/src/nextbillionai/resources/optimization/optimization.py index fe26864..62cdd37 100644 --- a/src/nextbillionai/resources/optimization/optimization.py +++ b/src/nextbillionai/resources/optimization/optimization.py @@ -2,7 +2,6 @@ from __future__ import annotations -from typing import List from typing_extensions import Literal import httpx @@ -16,7 +15,7 @@ AsyncV2ResourceWithStreamingResponse, ) from ...types import optimization_compute_params, optimization_re_optimize_params -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -194,7 +193,7 @@ def re_optimize( key: str, existing_request_id: str, job_changes: optimization_re_optimize_params.JobChanges | NotGiven = NOT_GIVEN, - locations: List[str] | NotGiven = NOT_GIVEN, + locations: SequenceNotStr[str] | NotGiven = NOT_GIVEN, shipment_changes: optimization_re_optimize_params.ShipmentChanges | NotGiven = NOT_GIVEN, vehicle_changes: optimization_re_optimize_params.VehicleChanges | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -433,7 +432,7 @@ async def re_optimize( key: str, existing_request_id: str, job_changes: optimization_re_optimize_params.JobChanges | NotGiven = NOT_GIVEN, - locations: List[str] | NotGiven = NOT_GIVEN, + locations: SequenceNotStr[str] | NotGiven = NOT_GIVEN, shipment_changes: optimization_re_optimize_params.ShipmentChanges | NotGiven = NOT_GIVEN, vehicle_changes: optimization_re_optimize_params.VehicleChanges | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. diff --git a/src/nextbillionai/resources/skynet/asset/asset.py b/src/nextbillionai/resources/skynet/asset/asset.py index 4af83b2..3d36c82 100644 --- a/src/nextbillionai/resources/skynet/asset/asset.py +++ b/src/nextbillionai/resources/skynet/asset/asset.py @@ -2,7 +2,6 @@ from __future__ import annotations -from typing import List from typing_extensions import Literal import httpx @@ -23,7 +22,7 @@ LocationResourceWithStreamingResponse, AsyncLocationResourceWithStreamingResponse, ) -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr from ...._utils import maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -91,7 +90,7 @@ def create( description: str | NotGiven = NOT_GIVEN, meta_data: MetaDataParam | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, - tags: List[str] | NotGiven = NOT_GIVEN, + tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -238,7 +237,7 @@ def update( description: str | NotGiven = NOT_GIVEN, meta_data: MetaDataParam | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, - tags: List[str] | NotGiven = NOT_GIVEN, + tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -681,7 +680,7 @@ async def create( description: str | NotGiven = NOT_GIVEN, meta_data: MetaDataParam | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, - tags: List[str] | NotGiven = NOT_GIVEN, + tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -828,7 +827,7 @@ async def update( description: str | NotGiven = NOT_GIVEN, meta_data: MetaDataParam | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, - tags: List[str] | NotGiven = NOT_GIVEN, + tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, diff --git a/src/nextbillionai/resources/skynet/config.py b/src/nextbillionai/resources/skynet/config.py index 9504a6d..3a049a6 100644 --- a/src/nextbillionai/resources/skynet/config.py +++ b/src/nextbillionai/resources/skynet/config.py @@ -2,12 +2,11 @@ from __future__ import annotations -from typing import List from typing_extensions import Literal import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -98,7 +97,7 @@ def update( *, key: str, cluster: Literal["america"] | NotGiven = NOT_GIVEN, - webhook: List[str] | NotGiven = NOT_GIVEN, + webhook: SequenceNotStr[str] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -256,7 +255,7 @@ async def update( *, key: str, cluster: Literal["america"] | NotGiven = NOT_GIVEN, - webhook: List[str] | NotGiven = NOT_GIVEN, + webhook: SequenceNotStr[str] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, diff --git a/src/nextbillionai/resources/skynet/monitor.py b/src/nextbillionai/resources/skynet/monitor.py index 514025a..280b6c6 100644 --- a/src/nextbillionai/resources/skynet/monitor.py +++ b/src/nextbillionai/resources/skynet/monitor.py @@ -2,12 +2,11 @@ from __future__ import annotations -from typing import List from typing_extensions import Literal import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -58,13 +57,13 @@ def create( self, *, key: str, - tags: List[str], + tags: SequenceNotStr[str], type: Literal["enter", "exit", "enter_and_exit", "speeding", "idle"], cluster: Literal["america"] | NotGiven = NOT_GIVEN, custom_id: str | NotGiven = NOT_GIVEN, description: str | NotGiven = NOT_GIVEN, geofence_config: monitor_create_params.GeofenceConfig | NotGiven = NOT_GIVEN, - geofence_ids: List[str] | NotGiven = NOT_GIVEN, + geofence_ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, idle_config: monitor_create_params.IdleConfig | NotGiven = NOT_GIVEN, match_filter: monitor_create_params.MatchFilter | NotGiven = NOT_GIVEN, meta_data: MetadataParam | NotGiven = NOT_GIVEN, @@ -255,13 +254,13 @@ def update( key: str, description: str | NotGiven = NOT_GIVEN, geofence_config: monitor_update_params.GeofenceConfig | NotGiven = NOT_GIVEN, - geofence_ids: List[str] | NotGiven = NOT_GIVEN, + geofence_ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, idle_config: monitor_update_params.IdleConfig | NotGiven = NOT_GIVEN, match_filter: monitor_update_params.MatchFilter | NotGiven = NOT_GIVEN, meta_data: MetadataParam | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, speeding_config: monitor_update_params.SpeedingConfig | NotGiven = NOT_GIVEN, - tags: List[str] | NotGiven = NOT_GIVEN, + tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, type: Literal["enter", "exit", "enter_and_exit", "speeding", "idle"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -517,13 +516,13 @@ async def create( self, *, key: str, - tags: List[str], + tags: SequenceNotStr[str], type: Literal["enter", "exit", "enter_and_exit", "speeding", "idle"], cluster: Literal["america"] | NotGiven = NOT_GIVEN, custom_id: str | NotGiven = NOT_GIVEN, description: str | NotGiven = NOT_GIVEN, geofence_config: monitor_create_params.GeofenceConfig | NotGiven = NOT_GIVEN, - geofence_ids: List[str] | NotGiven = NOT_GIVEN, + geofence_ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, idle_config: monitor_create_params.IdleConfig | NotGiven = NOT_GIVEN, match_filter: monitor_create_params.MatchFilter | NotGiven = NOT_GIVEN, meta_data: MetadataParam | NotGiven = NOT_GIVEN, @@ -714,13 +713,13 @@ async def update( key: str, description: str | NotGiven = NOT_GIVEN, geofence_config: monitor_update_params.GeofenceConfig | NotGiven = NOT_GIVEN, - geofence_ids: List[str] | NotGiven = NOT_GIVEN, + geofence_ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, idle_config: monitor_update_params.IdleConfig | NotGiven = NOT_GIVEN, match_filter: monitor_update_params.MatchFilter | NotGiven = NOT_GIVEN, meta_data: MetadataParam | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, speeding_config: monitor_update_params.SpeedingConfig | NotGiven = NOT_GIVEN, - tags: List[str] | NotGiven = NOT_GIVEN, + tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, type: Literal["enter", "exit", "enter_and_exit", "speeding", "idle"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. diff --git a/src/nextbillionai/types/geofence/batch_delete_params.py b/src/nextbillionai/types/geofence/batch_delete_params.py index 0423c4b..8a6a2f0 100644 --- a/src/nextbillionai/types/geofence/batch_delete_params.py +++ b/src/nextbillionai/types/geofence/batch_delete_params.py @@ -2,9 +2,10 @@ from __future__ import annotations -from typing import List from typing_extensions import Required, TypedDict +from ..._types import SequenceNotStr + __all__ = ["BatchDeleteParams"] @@ -15,7 +16,7 @@ class BatchDeleteParams(TypedDict, total=False): API. """ - ids: List[str] + ids: SequenceNotStr[str] """An array IDs of the geofence to be deleted. These are the IDs that were generated/provided at the time of creating the diff --git a/src/nextbillionai/types/geofence/console_preview_params.py b/src/nextbillionai/types/geofence/console_preview_params.py index ff557d0..6d0e3d6 100644 --- a/src/nextbillionai/types/geofence/console_preview_params.py +++ b/src/nextbillionai/types/geofence/console_preview_params.py @@ -2,9 +2,11 @@ from __future__ import annotations -from typing import List, Iterable +from typing import Iterable from typing_extensions import Literal, Required, TypedDict +from ..._types import SequenceNotStr + __all__ = ["ConsolePreviewParams", "Circle", "CircleCenter", "Isochrone", "Polygon", "PolygonGeojson"] @@ -66,7 +68,7 @@ class ConsolePreviewParams(TypedDict, total=False): Area of the polygon should be less than 2000 km2. """ - tags: List[str] + tags: SequenceNotStr[str] """An array of strings to associate multiple tags to the geofence. tags can be used to search or filter geofences (using Get Geofence List method). diff --git a/src/nextbillionai/types/geofence_create_params.py b/src/nextbillionai/types/geofence_create_params.py index a9f6494..6c5a21f 100644 --- a/src/nextbillionai/types/geofence_create_params.py +++ b/src/nextbillionai/types/geofence_create_params.py @@ -2,9 +2,11 @@ from __future__ import annotations -from typing import List, Iterable +from typing import Iterable from typing_extensions import Literal, Required, TypedDict +from .._types import SequenceNotStr + __all__ = ["GeofenceCreateParams", "Circle", "CircleCenter", "Isochrone", "Polygon", "PolygonGeojson"] @@ -72,7 +74,7 @@ class GeofenceCreateParams(TypedDict, total=False): Area of the polygon should be less than 2000 km2. """ - tags: List[str] + tags: SequenceNotStr[str] """An array of strings to associate multiple tags to the geofence. tags can be used to search or filter geofences (using Get Geofence List method). diff --git a/src/nextbillionai/types/geofence_entity_create_param.py b/src/nextbillionai/types/geofence_entity_create_param.py index 59cb0c7..250f6d7 100644 --- a/src/nextbillionai/types/geofence_entity_create_param.py +++ b/src/nextbillionai/types/geofence_entity_create_param.py @@ -2,9 +2,11 @@ from __future__ import annotations -from typing import List, Iterable +from typing import Iterable from typing_extensions import Literal, Required, TypedDict +from .._types import SequenceNotStr + __all__ = ["GeofenceEntityCreateParam", "Circle", "CircleCenter", "Isochrone", "Polygon", "PolygonGeojson"] @@ -165,7 +167,7 @@ class GeofenceEntityCreateParam(TypedDict, total=False): Area of the polygon should be less than 2000 km2. """ - tags: List[str] + tags: SequenceNotStr[str] """An array of strings to associate multiple tags to the geofence. tags can be used to search or filter geofences (using Get Geofence List method). diff --git a/src/nextbillionai/types/geofence_update_params.py b/src/nextbillionai/types/geofence_update_params.py index 3aa905b..5cf4932 100644 --- a/src/nextbillionai/types/geofence_update_params.py +++ b/src/nextbillionai/types/geofence_update_params.py @@ -2,9 +2,11 @@ from __future__ import annotations -from typing import List, Iterable +from typing import Iterable from typing_extensions import Literal, Required, TypedDict +from .._types import SequenceNotStr + __all__ = ["GeofenceUpdateParams", "Circle", "CircleCenter", "Isochrone", "Polygon", "PolygonGeojson"] @@ -60,7 +62,7 @@ class GeofenceUpdateParams(TypedDict, total=False): Area of the polygon should be less than 2000 km2. """ - tags: List[str] + tags: SequenceNotStr[str] """Use this parameter to add/modify one or multiple tags of a geofence. tags can be used to search or filter geofences (using Get Geofence List method). diff --git a/src/nextbillionai/types/optimization/job_param.py b/src/nextbillionai/types/optimization/job_param.py index 4388e15..3b3efa2 100644 --- a/src/nextbillionai/types/optimization/job_param.py +++ b/src/nextbillionai/types/optimization/job_param.py @@ -2,9 +2,11 @@ from __future__ import annotations -from typing import List, Iterable +from typing import Iterable from typing_extensions import Literal, Required, TypedDict +from ..._types import SequenceNotStr + __all__ = ["JobParam", "Volume"] @@ -74,7 +76,7 @@ class JobParam(TypedDict, total=False): vehicles.start_depot_ids to know more. """ - depot_ids: List[str] + depot_ids: SequenceNotStr[str] """Specify the depots which can be used to fulfil this job. In case of a pickup job, the assigned vehicle will deliver the goods to the @@ -102,7 +104,7 @@ class JobParam(TypedDict, total=False): unloading sequence of cargo is important. The default is false. """ - incompatible_load_types: List[str] + incompatible_load_types: SequenceNotStr[str] """ Use this parameter to specify the type of loads which are incompatible with the job’s load type. Once this property is configured, the job can only be serviced @@ -138,7 +140,7 @@ class JobParam(TypedDict, total=False): attributes are also provided in the input request. """ - load_types: List[str] + load_types: SequenceNotStr[str] """Use this parameter to specify the type of loads for the given job. Once this property is configured, the job can not be served by a vehicle which diff --git a/src/nextbillionai/types/optimization/shipment_param.py b/src/nextbillionai/types/optimization/shipment_param.py index 03ec679..7ba9820 100644 --- a/src/nextbillionai/types/optimization/shipment_param.py +++ b/src/nextbillionai/types/optimization/shipment_param.py @@ -2,9 +2,11 @@ from __future__ import annotations -from typing import List, Iterable +from typing import Iterable from typing_extensions import Literal, Required, TypedDict +from ..._types import SequenceNotStr + __all__ = ["ShipmentParam", "Delivery", "Pickup", "Volume"] @@ -251,7 +253,7 @@ class ShipmentParam(TypedDict, total=False): The default value is \false\\.. """ - incompatible_load_types: List[str] + incompatible_load_types: SequenceNotStr[str] """ Use this parameter to specify the type of loads which are incompatible with the shipment’s load type. Once this property is configured, the shipment can only be @@ -285,7 +287,7 @@ class ShipmentParam(TypedDict, total=False): attributes are also provided in the input request. """ - load_types: List[str] + load_types: SequenceNotStr[str] """Use this parameter to specify the type of loads for the given shipment. Once this property is configured, the shipment can not be served by a vehicle diff --git a/src/nextbillionai/types/optimization/v2_submit_params.py b/src/nextbillionai/types/optimization/v2_submit_params.py index 336c421..4a43962 100644 --- a/src/nextbillionai/types/optimization/v2_submit_params.py +++ b/src/nextbillionai/types/optimization/v2_submit_params.py @@ -5,6 +5,7 @@ from typing import List, Iterable from typing_extensions import Literal, Required, TypedDict +from ..._types import SequenceNotStr from .job_param import JobParam from .vehicle_param import VehicleParam from .shipment_param import ShipmentParam @@ -222,7 +223,7 @@ class V2SubmitParams(TypedDict, total=False): class Locations(TypedDict, total=False): - location: Required[List[str]] + location: Required[SequenceNotStr[str]] """Indicate all the location coordinates that will be used during optimization. The coordinates should be specified in the format “latitude, longitude”. It is @@ -948,7 +949,7 @@ class Solution(TypedDict, total=False): class Unassigned(TypedDict, total=False): - jobs: List[str] + jobs: SequenceNotStr[str] """Specify the unassigned job IDs from the previous optimization result. Please note the IDs should also be present in the jobs part of the input. @@ -959,7 +960,7 @@ class Unassigned(TypedDict, total=False): Providing mixed value types in the array, will lead to an error. """ - shipments: Iterable[List[str]] + shipments: Iterable[SequenceNotStr[str]] """ Specify the unassigned shipment pickup & delivery IDs from the previous optimization result. Both the pickup & delivery steps of a shipment should be diff --git a/src/nextbillionai/types/optimization_re_optimize_params.py b/src/nextbillionai/types/optimization_re_optimize_params.py index d23e80a..48c5877 100644 --- a/src/nextbillionai/types/optimization_re_optimize_params.py +++ b/src/nextbillionai/types/optimization_re_optimize_params.py @@ -2,9 +2,10 @@ from __future__ import annotations -from typing import List, Iterable +from typing import Iterable from typing_extensions import Required, TypedDict +from .._types import SequenceNotStr from .optimization.job_param import JobParam from .optimization.vehicle_param import VehicleParam from .optimization.shipment_param import ShipmentParam @@ -30,7 +31,7 @@ class OptimizationReOptimizeParams(TypedDict, total=False): re-optimization process. """ - locations: List[str] + locations: SequenceNotStr[str] """Provide the list of locations to be used during re-optimization process. Please note that @@ -87,7 +88,7 @@ class JobChanges(TypedDict, total=False): IDs provided here are same as the ones in the original request. """ - remove: List[str] + remove: SequenceNotStr[str] """An array of job IDs to be removed when during re-optimization. All job IDs provided must have been part of the original request. @@ -110,7 +111,7 @@ class ShipmentChanges(TypedDict, total=False): all the shipment IDs provided here are same as the ones in the original request. """ - remove: List[str] + remove: SequenceNotStr[str] """An array of shipment IDs to be removed when during re-optimization. All shipment IDs provided must have been part of the original request. @@ -128,7 +129,7 @@ class VehicleChanges(TypedDict, total=False): modify: VehicleParam - remove: List[str] + remove: SequenceNotStr[str] """An array of vehicle IDs to be removed when during re-optimization. All vehicle IDs provided must have been part of the original request. diff --git a/src/nextbillionai/types/skynet/asset_create_params.py b/src/nextbillionai/types/skynet/asset_create_params.py index 9bc91ba..86d6c0e 100644 --- a/src/nextbillionai/types/skynet/asset_create_params.py +++ b/src/nextbillionai/types/skynet/asset_create_params.py @@ -2,9 +2,9 @@ from __future__ import annotations -from typing import List from typing_extensions import Literal, Required, TypedDict +from ..._types import SequenceNotStr from .meta_data_param import MetaDataParam __all__ = ["AssetCreateParams"] @@ -56,7 +56,7 @@ class AssetCreateParams(TypedDict, total=False): Use this field to assign a meaningful, custom name to the asset being created. """ - tags: List[str] + tags: SequenceNotStr[str] """ **This parameter will be deprecated soon! Please use the attributes parameter to add labels or markers for the asset.** diff --git a/src/nextbillionai/types/skynet/asset_update_params.py b/src/nextbillionai/types/skynet/asset_update_params.py index 80ce2f4..7ed7e3e 100644 --- a/src/nextbillionai/types/skynet/asset_update_params.py +++ b/src/nextbillionai/types/skynet/asset_update_params.py @@ -2,9 +2,9 @@ from __future__ import annotations -from typing import List from typing_extensions import Literal, Required, TypedDict +from ..._types import SequenceNotStr from .meta_data_param import MetaDataParam __all__ = ["AssetUpdateParams"] @@ -51,7 +51,7 @@ class AssetUpdateParams(TypedDict, total=False): Users can assign meaningful custom names to their assets. """ - tags: List[str] + tags: SequenceNotStr[str] """ **This parameter will be deprecated soon! Please use the attributes parameter to add labels or markers for the asset.** diff --git a/src/nextbillionai/types/skynet/config_update_params.py b/src/nextbillionai/types/skynet/config_update_params.py index 96629d7..916e8a0 100644 --- a/src/nextbillionai/types/skynet/config_update_params.py +++ b/src/nextbillionai/types/skynet/config_update_params.py @@ -2,9 +2,10 @@ from __future__ import annotations -from typing import List from typing_extensions import Literal, Required, TypedDict +from ..._types import SequenceNotStr + __all__ = ["ConfigUpdateParams"] @@ -18,7 +19,7 @@ class ConfigUpdateParams(TypedDict, total=False): cluster: Literal["america"] """the cluster of the region you want to use""" - webhook: List[str] + webhook: SequenceNotStr[str] """Use this array to update information about the webhooks. Please note that the webhooks will be overwritten every time this method is diff --git a/src/nextbillionai/types/skynet/monitor_create_params.py b/src/nextbillionai/types/skynet/monitor_create_params.py index 134dd72..fe50055 100644 --- a/src/nextbillionai/types/skynet/monitor_create_params.py +++ b/src/nextbillionai/types/skynet/monitor_create_params.py @@ -2,9 +2,9 @@ from __future__ import annotations -from typing import List from typing_extensions import Literal, Required, TypedDict +from ..._types import SequenceNotStr from .metadata_param import MetadataParam __all__ = ["MonitorCreateParams", "GeofenceConfig", "IdleConfig", "MatchFilter", "SpeedingConfig"] @@ -17,7 +17,7 @@ class MonitorCreateParams(TypedDict, total=False): API. """ - tags: Required[List[str]] + tags: Required[SequenceNotStr[str]] """Use this parameter to add tags to the monitor. tags can be used for filtering monitors in the _Get Monitor List_ operation. @@ -80,7 +80,7 @@ class MonitorCreateParams(TypedDict, total=False): of enter, exit or enter_and_exit. """ - geofence_ids: List[str] + geofence_ids: SequenceNotStr[str] """\\**\\**Deprecated. Please use the geofence_config to specify the geofence_ids for this monitor.\\**\\** @@ -131,7 +131,7 @@ class MonitorCreateParams(TypedDict, total=False): class GeofenceConfig(TypedDict, total=False): - geofence_ids: Required[List[str]] + geofence_ids: Required[SequenceNotStr[str]] """ An array of strings to collect the geofence IDs that should be linked to the monitor. Please note geofence_ids are mandatory when using the geofence_config diff --git a/src/nextbillionai/types/skynet/monitor_update_params.py b/src/nextbillionai/types/skynet/monitor_update_params.py index e9d64cb..f69b10a 100644 --- a/src/nextbillionai/types/skynet/monitor_update_params.py +++ b/src/nextbillionai/types/skynet/monitor_update_params.py @@ -2,9 +2,9 @@ from __future__ import annotations -from typing import List from typing_extensions import Literal, Required, TypedDict +from ..._types import SequenceNotStr from .metadata_param import MetadataParam __all__ = ["MonitorUpdateParams", "GeofenceConfig", "IdleConfig", "MatchFilter", "SpeedingConfig"] @@ -28,7 +28,7 @@ class MonitorUpdateParams(TypedDict, total=False): exit or enter_and_exit. """ - geofence_ids: List[str] + geofence_ids: SequenceNotStr[str] """ Use this parameter to update the geofences linked to the monitor by providing the geofence id as , separated strings. Geofences are geographic boundaries that @@ -73,7 +73,7 @@ class MonitorUpdateParams(TypedDict, total=False): Please note that this object is mandatory when the monitor type is speeding. """ - tags: List[str] + tags: SequenceNotStr[str] """Use this parameter to update the tags of the monitor. tags can be used for filtering monitors in the _Get Monitor List_ operation. @@ -112,7 +112,7 @@ class MonitorUpdateParams(TypedDict, total=False): class GeofenceConfig(TypedDict, total=False): - geofence_ids: Required[List[str]] + geofence_ids: Required[SequenceNotStr[str]] """Use this array to update the geofence IDs that should be linked to the monitor. Please note geofence_ids are mandatory when using the geofence_config attribute. From 86738898fdc5c9a72a4b933398f2dbe013b038d6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 4 Sep 2025 04:12:24 +0000 Subject: [PATCH 11/35] feat: improve future compat with pydantic v3 --- src/nextbillionai/_base_client.py | 6 +- src/nextbillionai/_compat.py | 96 +++++++------- src/nextbillionai/_models.py | 80 ++++++------ src/nextbillionai/_utils/__init__.py | 10 +- src/nextbillionai/_utils/_compat.py | 45 +++++++ src/nextbillionai/_utils/_datetime_parse.py | 136 ++++++++++++++++++++ src/nextbillionai/_utils/_transform.py | 6 +- src/nextbillionai/_utils/_typing.py | 2 +- src/nextbillionai/_utils/_utils.py | 1 - tests/test_models.py | 48 +++---- tests/test_transform.py | 16 +-- tests/test_utils/test_datetime_parse.py | 110 ++++++++++++++++ tests/utils.py | 8 +- 13 files changed, 432 insertions(+), 132 deletions(-) create mode 100644 src/nextbillionai/_utils/_compat.py create mode 100644 src/nextbillionai/_utils/_datetime_parse.py create mode 100644 tests/test_utils/test_datetime_parse.py diff --git a/src/nextbillionai/_base_client.py b/src/nextbillionai/_base_client.py index 0a0608c..6463e2c 100644 --- a/src/nextbillionai/_base_client.py +++ b/src/nextbillionai/_base_client.py @@ -59,7 +59,7 @@ ModelBuilderProtocol, ) from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping -from ._compat import PYDANTIC_V2, model_copy, model_dump +from ._compat import PYDANTIC_V1, model_copy, model_dump from ._models import GenericModel, FinalRequestOptions, validate_type, construct_type from ._response import ( APIResponse, @@ -232,7 +232,7 @@ def _set_private_attributes( model: Type[_T], options: FinalRequestOptions, ) -> None: - if PYDANTIC_V2 and getattr(self, "__pydantic_private__", None) is None: + if (not PYDANTIC_V1) and getattr(self, "__pydantic_private__", None) is None: self.__pydantic_private__ = {} self._model = model @@ -320,7 +320,7 @@ def _set_private_attributes( client: AsyncAPIClient, options: FinalRequestOptions, ) -> None: - if PYDANTIC_V2 and getattr(self, "__pydantic_private__", None) is None: + if (not PYDANTIC_V1) and getattr(self, "__pydantic_private__", None) is None: self.__pydantic_private__ = {} self._model = model diff --git a/src/nextbillionai/_compat.py b/src/nextbillionai/_compat.py index 92d9ee6..bdef67f 100644 --- a/src/nextbillionai/_compat.py +++ b/src/nextbillionai/_compat.py @@ -12,14 +12,13 @@ _T = TypeVar("_T") _ModelT = TypeVar("_ModelT", bound=pydantic.BaseModel) -# --------------- Pydantic v2 compatibility --------------- +# --------------- Pydantic v2, v3 compatibility --------------- # Pyright incorrectly reports some of our functions as overriding a method when they don't # pyright: reportIncompatibleMethodOverride=false -PYDANTIC_V2 = pydantic.VERSION.startswith("2.") +PYDANTIC_V1 = pydantic.VERSION.startswith("1.") -# v1 re-exports if TYPE_CHECKING: def parse_date(value: date | StrBytesIntFloat) -> date: # noqa: ARG001 @@ -44,90 +43,92 @@ def is_typeddict(type_: type[Any]) -> bool: # noqa: ARG001 ... else: - if PYDANTIC_V2: - from pydantic.v1.typing import ( + # v1 re-exports + if PYDANTIC_V1: + from pydantic.typing import ( get_args as get_args, is_union as is_union, get_origin as get_origin, is_typeddict as is_typeddict, is_literal_type as is_literal_type, ) - from pydantic.v1.datetime_parse import parse_date as parse_date, parse_datetime as parse_datetime + from pydantic.datetime_parse import parse_date as parse_date, parse_datetime as parse_datetime else: - from pydantic.typing import ( + from ._utils import ( get_args as get_args, is_union as is_union, get_origin as get_origin, + parse_date as parse_date, is_typeddict as is_typeddict, + parse_datetime as parse_datetime, is_literal_type as is_literal_type, ) - from pydantic.datetime_parse import parse_date as parse_date, parse_datetime as parse_datetime # refactored config if TYPE_CHECKING: from pydantic import ConfigDict as ConfigDict else: - if PYDANTIC_V2: - from pydantic import ConfigDict - else: + if PYDANTIC_V1: # TODO: provide an error message here? ConfigDict = None + else: + from pydantic import ConfigDict as ConfigDict # renamed methods / properties def parse_obj(model: type[_ModelT], value: object) -> _ModelT: - if PYDANTIC_V2: - return model.model_validate(value) - else: + if PYDANTIC_V1: return cast(_ModelT, model.parse_obj(value)) # pyright: ignore[reportDeprecated, reportUnnecessaryCast] + else: + return model.model_validate(value) def field_is_required(field: FieldInfo) -> bool: - if PYDANTIC_V2: - return field.is_required() - return field.required # type: ignore + if PYDANTIC_V1: + return field.required # type: ignore + return field.is_required() def field_get_default(field: FieldInfo) -> Any: value = field.get_default() - if PYDANTIC_V2: - from pydantic_core import PydanticUndefined - - if value == PydanticUndefined: - return None + if PYDANTIC_V1: return value + from pydantic_core import PydanticUndefined + + if value == PydanticUndefined: + return None return value def field_outer_type(field: FieldInfo) -> Any: - if PYDANTIC_V2: - return field.annotation - return field.outer_type_ # type: ignore + if PYDANTIC_V1: + return field.outer_type_ # type: ignore + return field.annotation def get_model_config(model: type[pydantic.BaseModel]) -> Any: - if PYDANTIC_V2: - return model.model_config - return model.__config__ # type: ignore + if PYDANTIC_V1: + return model.__config__ # type: ignore + return model.model_config def get_model_fields(model: type[pydantic.BaseModel]) -> dict[str, FieldInfo]: - if PYDANTIC_V2: - return model.model_fields - return model.__fields__ # type: ignore + if PYDANTIC_V1: + return model.__fields__ # type: ignore + return model.model_fields def model_copy(model: _ModelT, *, deep: bool = False) -> _ModelT: - if PYDANTIC_V2: - return model.model_copy(deep=deep) - return model.copy(deep=deep) # type: ignore + if PYDANTIC_V1: + return model.copy(deep=deep) # type: ignore + return model.model_copy(deep=deep) def model_json(model: pydantic.BaseModel, *, indent: int | None = None) -> str: - if PYDANTIC_V2: - return model.model_dump_json(indent=indent) - return model.json(indent=indent) # type: ignore + if PYDANTIC_V1: + return model.json(indent=indent) # type: ignore + return model.model_dump_json(indent=indent) def model_dump( @@ -139,14 +140,14 @@ def model_dump( warnings: bool = True, mode: Literal["json", "python"] = "python", ) -> dict[str, Any]: - if PYDANTIC_V2 or hasattr(model, "model_dump"): + if (not PYDANTIC_V1) or hasattr(model, "model_dump"): return model.model_dump( mode=mode, exclude=exclude, exclude_unset=exclude_unset, exclude_defaults=exclude_defaults, # warnings are not supported in Pydantic v1 - warnings=warnings if PYDANTIC_V2 else True, + warnings=True if PYDANTIC_V1 else warnings, ) return cast( "dict[str, Any]", @@ -159,9 +160,9 @@ def model_dump( def model_parse(model: type[_ModelT], data: Any) -> _ModelT: - if PYDANTIC_V2: - return model.model_validate(data) - return model.parse_obj(data) # pyright: ignore[reportDeprecated] + if PYDANTIC_V1: + return model.parse_obj(data) # pyright: ignore[reportDeprecated] + return model.model_validate(data) # generic models @@ -170,17 +171,16 @@ def model_parse(model: type[_ModelT], data: Any) -> _ModelT: class GenericModel(pydantic.BaseModel): ... else: - if PYDANTIC_V2: + if PYDANTIC_V1: + import pydantic.generics + + class GenericModel(pydantic.generics.GenericModel, pydantic.BaseModel): ... + else: # there no longer needs to be a distinction in v2 but # we still have to create our own subclass to avoid # inconsistent MRO ordering errors class GenericModel(pydantic.BaseModel): ... - else: - import pydantic.generics - - class GenericModel(pydantic.generics.GenericModel, pydantic.BaseModel): ... - # cached properties if TYPE_CHECKING: diff --git a/src/nextbillionai/_models.py b/src/nextbillionai/_models.py index 92f7c10..3a6017e 100644 --- a/src/nextbillionai/_models.py +++ b/src/nextbillionai/_models.py @@ -50,7 +50,7 @@ strip_annotated_type, ) from ._compat import ( - PYDANTIC_V2, + PYDANTIC_V1, ConfigDict, GenericModel as BaseGenericModel, get_args, @@ -81,11 +81,7 @@ class _ConfigProtocol(Protocol): class BaseModel(pydantic.BaseModel): - if PYDANTIC_V2: - model_config: ClassVar[ConfigDict] = ConfigDict( - extra="allow", defer_build=coerce_boolean(os.environ.get("DEFER_PYDANTIC_BUILD", "true")) - ) - else: + if PYDANTIC_V1: @property @override @@ -95,6 +91,10 @@ def model_fields_set(self) -> set[str]: class Config(pydantic.BaseConfig): # pyright: ignore[reportDeprecated] extra: Any = pydantic.Extra.allow # type: ignore + else: + model_config: ClassVar[ConfigDict] = ConfigDict( + extra="allow", defer_build=coerce_boolean(os.environ.get("DEFER_PYDANTIC_BUILD", "true")) + ) def to_dict( self, @@ -215,25 +215,25 @@ def construct( # pyright: ignore[reportIncompatibleMethodOverride] if key not in model_fields: parsed = construct_type(value=value, type_=extra_field_type) if extra_field_type is not None else value - if PYDANTIC_V2: - _extra[key] = parsed - else: + if PYDANTIC_V1: _fields_set.add(key) fields_values[key] = parsed + else: + _extra[key] = parsed object.__setattr__(m, "__dict__", fields_values) - if PYDANTIC_V2: - # these properties are copied from Pydantic's `model_construct()` method - object.__setattr__(m, "__pydantic_private__", None) - object.__setattr__(m, "__pydantic_extra__", _extra) - object.__setattr__(m, "__pydantic_fields_set__", _fields_set) - else: + if PYDANTIC_V1: # init_private_attributes() does not exist in v2 m._init_private_attributes() # type: ignore # copied from Pydantic v1's `construct()` method object.__setattr__(m, "__fields_set__", _fields_set) + else: + # these properties are copied from Pydantic's `model_construct()` method + object.__setattr__(m, "__pydantic_private__", None) + object.__setattr__(m, "__pydantic_extra__", _extra) + object.__setattr__(m, "__pydantic_fields_set__", _fields_set) return m @@ -243,7 +243,7 @@ def construct( # pyright: ignore[reportIncompatibleMethodOverride] # although not in practice model_construct = construct - if not PYDANTIC_V2: + if PYDANTIC_V1: # we define aliases for some of the new pydantic v2 methods so # that we can just document these methods without having to specify # a specific pydantic version as some users may not know which @@ -363,10 +363,10 @@ def _construct_field(value: object, field: FieldInfo, key: str) -> object: if value is None: return field_get_default(field) - if PYDANTIC_V2: - type_ = field.annotation - else: + if PYDANTIC_V1: type_ = cast(type, field.outer_type_) # type: ignore + else: + type_ = field.annotation # type: ignore if type_ is None: raise RuntimeError(f"Unexpected field type is None for {key}") @@ -375,7 +375,7 @@ def _construct_field(value: object, field: FieldInfo, key: str) -> object: def _get_extra_fields_type(cls: type[pydantic.BaseModel]) -> type | None: - if not PYDANTIC_V2: + if PYDANTIC_V1: # TODO return None @@ -628,30 +628,30 @@ def _build_discriminated_union_meta(*, union: type, meta_annotations: tuple[Any, for variant in get_args(union): variant = strip_annotated_type(variant) if is_basemodel_type(variant): - if PYDANTIC_V2: - field = _extract_field_schema_pv2(variant, discriminator_field_name) - if not field: + if PYDANTIC_V1: + field_info = cast("dict[str, FieldInfo]", variant.__fields__).get(discriminator_field_name) # pyright: ignore[reportDeprecated, reportUnnecessaryCast] + if not field_info: continue # Note: if one variant defines an alias then they all should - discriminator_alias = field.get("serialization_alias") - - field_schema = field["schema"] + discriminator_alias = field_info.alias - if field_schema["type"] == "literal": - for entry in cast("LiteralSchema", field_schema)["expected"]: + if (annotation := getattr(field_info, "annotation", None)) and is_literal_type(annotation): + for entry in get_args(annotation): if isinstance(entry, str): mapping[entry] = variant else: - field_info = cast("dict[str, FieldInfo]", variant.__fields__).get(discriminator_field_name) # pyright: ignore[reportDeprecated, reportUnnecessaryCast] - if not field_info: + field = _extract_field_schema_pv2(variant, discriminator_field_name) + if not field: continue # Note: if one variant defines an alias then they all should - discriminator_alias = field_info.alias + discriminator_alias = field.get("serialization_alias") - if (annotation := getattr(field_info, "annotation", None)) and is_literal_type(annotation): - for entry in get_args(annotation): + field_schema = field["schema"] + + if field_schema["type"] == "literal": + for entry in cast("LiteralSchema", field_schema)["expected"]: if isinstance(entry, str): mapping[entry] = variant @@ -714,7 +714,7 @@ class GenericModel(BaseGenericModel, BaseModel): pass -if PYDANTIC_V2: +if not PYDANTIC_V1: from pydantic import TypeAdapter as _TypeAdapter _CachedTypeAdapter = cast("TypeAdapter[object]", lru_cache(maxsize=None)(_TypeAdapter)) @@ -782,12 +782,12 @@ class FinalRequestOptions(pydantic.BaseModel): json_data: Union[Body, None] = None extra_json: Union[AnyMapping, None] = None - if PYDANTIC_V2: - model_config: ClassVar[ConfigDict] = ConfigDict(arbitrary_types_allowed=True) - else: + if PYDANTIC_V1: class Config(pydantic.BaseConfig): # pyright: ignore[reportDeprecated] arbitrary_types_allowed: bool = True + else: + model_config: ClassVar[ConfigDict] = ConfigDict(arbitrary_types_allowed=True) def get_max_retries(self, max_retries: int) -> int: if isinstance(self.max_retries, NotGiven): @@ -820,9 +820,9 @@ def construct( # type: ignore key: strip_not_given(value) for key, value in values.items() } - if PYDANTIC_V2: - return super().model_construct(_fields_set, **kwargs) - return cast(FinalRequestOptions, super().construct(_fields_set, **kwargs)) # pyright: ignore[reportDeprecated] + if PYDANTIC_V1: + return cast(FinalRequestOptions, super().construct(_fields_set, **kwargs)) # pyright: ignore[reportDeprecated] + return super().model_construct(_fields_set, **kwargs) if not TYPE_CHECKING: # type checkers incorrectly complain about this assignment diff --git a/src/nextbillionai/_utils/__init__.py b/src/nextbillionai/_utils/__init__.py index ca547ce..dc64e29 100644 --- a/src/nextbillionai/_utils/__init__.py +++ b/src/nextbillionai/_utils/__init__.py @@ -10,7 +10,6 @@ lru_cache as lru_cache, is_mapping as is_mapping, is_tuple_t as is_tuple_t, - parse_date as parse_date, is_iterable as is_iterable, is_sequence as is_sequence, coerce_float as coerce_float, @@ -23,7 +22,6 @@ coerce_boolean as coerce_boolean, coerce_integer as coerce_integer, file_from_path as file_from_path, - parse_datetime as parse_datetime, strip_not_given as strip_not_given, deepcopy_minimal as deepcopy_minimal, get_async_library as get_async_library, @@ -32,6 +30,13 @@ maybe_coerce_boolean as maybe_coerce_boolean, maybe_coerce_integer as maybe_coerce_integer, ) +from ._compat import ( + get_args as get_args, + is_union as is_union, + get_origin as get_origin, + is_typeddict as is_typeddict, + is_literal_type as is_literal_type, +) from ._typing import ( is_list_type as is_list_type, is_union_type as is_union_type, @@ -56,3 +61,4 @@ function_has_argument as function_has_argument, assert_signatures_in_sync as assert_signatures_in_sync, ) +from ._datetime_parse import parse_date as parse_date, parse_datetime as parse_datetime diff --git a/src/nextbillionai/_utils/_compat.py b/src/nextbillionai/_utils/_compat.py new file mode 100644 index 0000000..dd70323 --- /dev/null +++ b/src/nextbillionai/_utils/_compat.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +import sys +import typing_extensions +from typing import Any, Type, Union, Literal, Optional +from datetime import date, datetime +from typing_extensions import get_args as _get_args, get_origin as _get_origin + +from .._types import StrBytesIntFloat +from ._datetime_parse import parse_date as _parse_date, parse_datetime as _parse_datetime + +_LITERAL_TYPES = {Literal, typing_extensions.Literal} + + +def get_args(tp: type[Any]) -> tuple[Any, ...]: + return _get_args(tp) + + +def get_origin(tp: type[Any]) -> type[Any] | None: + return _get_origin(tp) + + +def is_union(tp: Optional[Type[Any]]) -> bool: + if sys.version_info < (3, 10): + return tp is Union # type: ignore[comparison-overlap] + else: + import types + + return tp is Union or tp is types.UnionType + + +def is_typeddict(tp: Type[Any]) -> bool: + return typing_extensions.is_typeddict(tp) + + +def is_literal_type(tp: Type[Any]) -> bool: + return get_origin(tp) in _LITERAL_TYPES + + +def parse_date(value: Union[date, StrBytesIntFloat]) -> date: + return _parse_date(value) + + +def parse_datetime(value: Union[datetime, StrBytesIntFloat]) -> datetime: + return _parse_datetime(value) diff --git a/src/nextbillionai/_utils/_datetime_parse.py b/src/nextbillionai/_utils/_datetime_parse.py new file mode 100644 index 0000000..7cb9d9e --- /dev/null +++ b/src/nextbillionai/_utils/_datetime_parse.py @@ -0,0 +1,136 @@ +""" +This file contains code from https://github.com/pydantic/pydantic/blob/main/pydantic/v1/datetime_parse.py +without the Pydantic v1 specific errors. +""" + +from __future__ import annotations + +import re +from typing import Dict, Union, Optional +from datetime import date, datetime, timezone, timedelta + +from .._types import StrBytesIntFloat + +date_expr = r"(?P\d{4})-(?P\d{1,2})-(?P\d{1,2})" +time_expr = ( + r"(?P\d{1,2}):(?P\d{1,2})" + r"(?::(?P\d{1,2})(?:\.(?P\d{1,6})\d{0,6})?)?" + r"(?PZ|[+-]\d{2}(?::?\d{2})?)?$" +) + +date_re = re.compile(f"{date_expr}$") +datetime_re = re.compile(f"{date_expr}[T ]{time_expr}") + + +EPOCH = datetime(1970, 1, 1) +# if greater than this, the number is in ms, if less than or equal it's in seconds +# (in seconds this is 11th October 2603, in ms it's 20th August 1970) +MS_WATERSHED = int(2e10) +# slightly more than datetime.max in ns - (datetime.max - EPOCH).total_seconds() * 1e9 +MAX_NUMBER = int(3e20) + + +def _get_numeric(value: StrBytesIntFloat, native_expected_type: str) -> Union[None, int, float]: + if isinstance(value, (int, float)): + return value + try: + return float(value) + except ValueError: + return None + except TypeError: + raise TypeError(f"invalid type; expected {native_expected_type}, string, bytes, int or float") from None + + +def _from_unix_seconds(seconds: Union[int, float]) -> datetime: + if seconds > MAX_NUMBER: + return datetime.max + elif seconds < -MAX_NUMBER: + return datetime.min + + while abs(seconds) > MS_WATERSHED: + seconds /= 1000 + dt = EPOCH + timedelta(seconds=seconds) + return dt.replace(tzinfo=timezone.utc) + + +def _parse_timezone(value: Optional[str]) -> Union[None, int, timezone]: + if value == "Z": + return timezone.utc + elif value is not None: + offset_mins = int(value[-2:]) if len(value) > 3 else 0 + offset = 60 * int(value[1:3]) + offset_mins + if value[0] == "-": + offset = -offset + return timezone(timedelta(minutes=offset)) + else: + return None + + +def parse_datetime(value: Union[datetime, StrBytesIntFloat]) -> datetime: + """ + Parse a datetime/int/float/string and return a datetime.datetime. + + This function supports time zone offsets. When the input contains one, + the output uses a timezone with a fixed offset from UTC. + + Raise ValueError if the input is well formatted but not a valid datetime. + Raise ValueError if the input isn't well formatted. + """ + if isinstance(value, datetime): + return value + + number = _get_numeric(value, "datetime") + if number is not None: + return _from_unix_seconds(number) + + if isinstance(value, bytes): + value = value.decode() + + assert not isinstance(value, (float, int)) + + match = datetime_re.match(value) + if match is None: + raise ValueError("invalid datetime format") + + kw = match.groupdict() + if kw["microsecond"]: + kw["microsecond"] = kw["microsecond"].ljust(6, "0") + + tzinfo = _parse_timezone(kw.pop("tzinfo")) + kw_: Dict[str, Union[None, int, timezone]] = {k: int(v) for k, v in kw.items() if v is not None} + kw_["tzinfo"] = tzinfo + + return datetime(**kw_) # type: ignore + + +def parse_date(value: Union[date, StrBytesIntFloat]) -> date: + """ + Parse a date/int/float/string and return a datetime.date. + + Raise ValueError if the input is well formatted but not a valid date. + Raise ValueError if the input isn't well formatted. + """ + if isinstance(value, date): + if isinstance(value, datetime): + return value.date() + else: + return value + + number = _get_numeric(value, "date") + if number is not None: + return _from_unix_seconds(number).date() + + if isinstance(value, bytes): + value = value.decode() + + assert not isinstance(value, (float, int)) + match = date_re.match(value) + if match is None: + raise ValueError("invalid date format") + + kw = {k: int(v) for k, v in match.groupdict().items()} + + try: + return date(**kw) + except ValueError: + raise ValueError("invalid date format") from None diff --git a/src/nextbillionai/_utils/_transform.py b/src/nextbillionai/_utils/_transform.py index f0bcefd..c19124f 100644 --- a/src/nextbillionai/_utils/_transform.py +++ b/src/nextbillionai/_utils/_transform.py @@ -19,6 +19,7 @@ is_sequence, ) from .._files import is_base64_file_input +from ._compat import get_origin, is_typeddict from ._typing import ( is_list_type, is_union_type, @@ -29,7 +30,6 @@ is_annotated_type, strip_annotated_type, ) -from .._compat import get_origin, model_dump, is_typeddict _T = TypeVar("_T") @@ -169,6 +169,8 @@ def _transform_recursive( Defaults to the same value as the `annotation` argument. """ + from .._compat import model_dump + if inner_type is None: inner_type = annotation @@ -333,6 +335,8 @@ async def _async_transform_recursive( Defaults to the same value as the `annotation` argument. """ + from .._compat import model_dump + if inner_type is None: inner_type = annotation diff --git a/src/nextbillionai/_utils/_typing.py b/src/nextbillionai/_utils/_typing.py index 845cd6b..193109f 100644 --- a/src/nextbillionai/_utils/_typing.py +++ b/src/nextbillionai/_utils/_typing.py @@ -15,7 +15,7 @@ from ._utils import lru_cache from .._types import InheritsGeneric -from .._compat import is_union as _is_union +from ._compat import is_union as _is_union def is_annotated_type(typ: type) -> bool: diff --git a/src/nextbillionai/_utils/_utils.py b/src/nextbillionai/_utils/_utils.py index ea3cf3f..f081859 100644 --- a/src/nextbillionai/_utils/_utils.py +++ b/src/nextbillionai/_utils/_utils.py @@ -22,7 +22,6 @@ import sniffio from .._types import NotGiven, FileTypes, NotGivenOr, HeadersLike -from .._compat import parse_date as parse_date, parse_datetime as parse_datetime _T = TypeVar("_T") _TupleT = TypeVar("_TupleT", bound=Tuple[object, ...]) diff --git a/tests/test_models.py b/tests/test_models.py index 992d50f..bc7508e 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -8,7 +8,7 @@ from pydantic import Field from nextbillionai._utils import PropertyInfo -from nextbillionai._compat import PYDANTIC_V2, parse_obj, model_dump, model_json +from nextbillionai._compat import PYDANTIC_V1, parse_obj, model_dump, model_json from nextbillionai._models import BaseModel, construct_type @@ -294,12 +294,12 @@ class Model(BaseModel): assert cast(bool, m.foo) is True m = Model.construct(foo={"name": 3}) - if PYDANTIC_V2: - assert isinstance(m.foo, Submodel1) - assert m.foo.name == 3 # type: ignore - else: + if PYDANTIC_V1: assert isinstance(m.foo, Submodel2) assert m.foo.name == "3" + else: + assert isinstance(m.foo, Submodel1) + assert m.foo.name == 3 # type: ignore def test_list_of_unions() -> None: @@ -426,10 +426,10 @@ class Model(BaseModel): expected = datetime(2019, 12, 27, 18, 11, 19, 117000, tzinfo=timezone.utc) - if PYDANTIC_V2: - expected_json = '{"created_at":"2019-12-27T18:11:19.117000Z"}' - else: + if PYDANTIC_V1: expected_json = '{"created_at": "2019-12-27T18:11:19.117000+00:00"}' + else: + expected_json = '{"created_at":"2019-12-27T18:11:19.117000Z"}' model = Model.construct(created_at="2019-12-27T18:11:19.117Z") assert model.created_at == expected @@ -531,7 +531,7 @@ class Model2(BaseModel): assert m4.to_dict(mode="python") == {"created_at": datetime.fromisoformat(time_str)} assert m4.to_dict(mode="json") == {"created_at": time_str} - if not PYDANTIC_V2: + if PYDANTIC_V1: with pytest.raises(ValueError, match="warnings is only supported in Pydantic v2"): m.to_dict(warnings=False) @@ -556,7 +556,7 @@ class Model(BaseModel): assert m3.model_dump() == {"foo": None} assert m3.model_dump(exclude_none=True) == {} - if not PYDANTIC_V2: + if PYDANTIC_V1: with pytest.raises(ValueError, match="round_trip is only supported in Pydantic v2"): m.model_dump(round_trip=True) @@ -580,10 +580,10 @@ class Model(BaseModel): assert json.loads(m.to_json()) == {"FOO": "hello"} assert json.loads(m.to_json(use_api_names=False)) == {"foo": "hello"} - if PYDANTIC_V2: - assert m.to_json(indent=None) == '{"FOO":"hello"}' - else: + if PYDANTIC_V1: assert m.to_json(indent=None) == '{"FOO": "hello"}' + else: + assert m.to_json(indent=None) == '{"FOO":"hello"}' m2 = Model() assert json.loads(m2.to_json()) == {} @@ -595,7 +595,7 @@ class Model(BaseModel): assert json.loads(m3.to_json()) == {"FOO": None} assert json.loads(m3.to_json(exclude_none=True)) == {} - if not PYDANTIC_V2: + if PYDANTIC_V1: with pytest.raises(ValueError, match="warnings is only supported in Pydantic v2"): m.to_json(warnings=False) @@ -622,7 +622,7 @@ class Model(BaseModel): assert json.loads(m3.model_dump_json()) == {"foo": None} assert json.loads(m3.model_dump_json(exclude_none=True)) == {} - if not PYDANTIC_V2: + if PYDANTIC_V1: with pytest.raises(ValueError, match="round_trip is only supported in Pydantic v2"): m.model_dump_json(round_trip=True) @@ -679,12 +679,12 @@ class B(BaseModel): ) assert isinstance(m, A) assert m.type == "a" - if PYDANTIC_V2: - assert m.data == 100 # type: ignore[comparison-overlap] - else: + if PYDANTIC_V1: # pydantic v1 automatically converts inputs to strings # if the expected type is a str assert m.data == "100" + else: + assert m.data == 100 # type: ignore[comparison-overlap] def test_discriminated_unions_unknown_variant() -> None: @@ -768,12 +768,12 @@ class B(BaseModel): ) assert isinstance(m, A) assert m.foo_type == "a" - if PYDANTIC_V2: - assert m.data == 100 # type: ignore[comparison-overlap] - else: + if PYDANTIC_V1: # pydantic v1 automatically converts inputs to strings # if the expected type is a str assert m.data == "100" + else: + assert m.data == 100 # type: ignore[comparison-overlap] def test_discriminated_unions_overlapping_discriminators_invalid_data() -> None: @@ -833,7 +833,7 @@ class B(BaseModel): assert UnionType.__discriminator__ is discriminator -@pytest.mark.skipif(not PYDANTIC_V2, reason="TypeAliasType is not supported in Pydantic v1") +@pytest.mark.skipif(PYDANTIC_V1, reason="TypeAliasType is not supported in Pydantic v1") def test_type_alias_type() -> None: Alias = TypeAliasType("Alias", str) # pyright: ignore @@ -849,7 +849,7 @@ class Model(BaseModel): assert m.union == "bar" -@pytest.mark.skipif(not PYDANTIC_V2, reason="TypeAliasType is not supported in Pydantic v1") +@pytest.mark.skipif(PYDANTIC_V1, reason="TypeAliasType is not supported in Pydantic v1") def test_field_named_cls() -> None: class Model(BaseModel): cls: str @@ -936,7 +936,7 @@ class Type2(BaseModel): assert isinstance(model.value, InnerType2) -@pytest.mark.skipif(not PYDANTIC_V2, reason="this is only supported in pydantic v2 for now") +@pytest.mark.skipif(PYDANTIC_V1, reason="this is only supported in pydantic v2 for now") def test_extra_properties() -> None: class Item(BaseModel): prop: int diff --git a/tests/test_transform.py b/tests/test_transform.py index 1711c72..74d8801 100644 --- a/tests/test_transform.py +++ b/tests/test_transform.py @@ -15,7 +15,7 @@ parse_datetime, async_transform as _async_transform, ) -from nextbillionai._compat import PYDANTIC_V2 +from nextbillionai._compat import PYDANTIC_V1 from nextbillionai._models import BaseModel _T = TypeVar("_T") @@ -189,7 +189,7 @@ class DateModel(BaseModel): @pytest.mark.asyncio async def test_iso8601_format(use_async: bool) -> None: dt = datetime.fromisoformat("2023-02-23T14:16:36.337692+00:00") - tz = "Z" if PYDANTIC_V2 else "+00:00" + tz = "+00:00" if PYDANTIC_V1 else "Z" assert await transform({"foo": dt}, DatetimeDict, use_async) == {"foo": "2023-02-23T14:16:36.337692+00:00"} # type: ignore[comparison-overlap] assert await transform(DatetimeModel(foo=dt), Any, use_async) == {"foo": "2023-02-23T14:16:36.337692" + tz} # type: ignore[comparison-overlap] @@ -297,11 +297,11 @@ async def test_pydantic_unknown_field(use_async: bool) -> None: @pytest.mark.asyncio async def test_pydantic_mismatched_types(use_async: bool) -> None: model = MyModel.construct(foo=True) - if PYDANTIC_V2: + if PYDANTIC_V1: + params = await transform(model, Any, use_async) + else: with pytest.warns(UserWarning): params = await transform(model, Any, use_async) - else: - params = await transform(model, Any, use_async) assert cast(Any, params) == {"foo": True} @@ -309,11 +309,11 @@ async def test_pydantic_mismatched_types(use_async: bool) -> None: @pytest.mark.asyncio async def test_pydantic_mismatched_object_type(use_async: bool) -> None: model = MyModel.construct(foo=MyModel.construct(hello="world")) - if PYDANTIC_V2: + if PYDANTIC_V1: + params = await transform(model, Any, use_async) + else: with pytest.warns(UserWarning): params = await transform(model, Any, use_async) - else: - params = await transform(model, Any, use_async) assert cast(Any, params) == {"foo": {"hello": "world"}} diff --git a/tests/test_utils/test_datetime_parse.py b/tests/test_utils/test_datetime_parse.py new file mode 100644 index 0000000..c041440 --- /dev/null +++ b/tests/test_utils/test_datetime_parse.py @@ -0,0 +1,110 @@ +""" +Copied from https://github.com/pydantic/pydantic/blob/v1.10.22/tests/test_datetime_parse.py +with modifications so it works without pydantic v1 imports. +""" + +from typing import Type, Union +from datetime import date, datetime, timezone, timedelta + +import pytest + +from nextbillionai._utils import parse_date, parse_datetime + + +def create_tz(minutes: int) -> timezone: + return timezone(timedelta(minutes=minutes)) + + +@pytest.mark.parametrize( + "value,result", + [ + # Valid inputs + ("1494012444.883309", date(2017, 5, 5)), + (b"1494012444.883309", date(2017, 5, 5)), + (1_494_012_444.883_309, date(2017, 5, 5)), + ("1494012444", date(2017, 5, 5)), + (1_494_012_444, date(2017, 5, 5)), + (0, date(1970, 1, 1)), + ("2012-04-23", date(2012, 4, 23)), + (b"2012-04-23", date(2012, 4, 23)), + ("2012-4-9", date(2012, 4, 9)), + (date(2012, 4, 9), date(2012, 4, 9)), + (datetime(2012, 4, 9, 12, 15), date(2012, 4, 9)), + # Invalid inputs + ("x20120423", ValueError), + ("2012-04-56", ValueError), + (19_999_999_999, date(2603, 10, 11)), # just before watershed + (20_000_000_001, date(1970, 8, 20)), # just after watershed + (1_549_316_052, date(2019, 2, 4)), # nowish in s + (1_549_316_052_104, date(2019, 2, 4)), # nowish in ms + (1_549_316_052_104_324, date(2019, 2, 4)), # nowish in μs + (1_549_316_052_104_324_096, date(2019, 2, 4)), # nowish in ns + ("infinity", date(9999, 12, 31)), + ("inf", date(9999, 12, 31)), + (float("inf"), date(9999, 12, 31)), + ("infinity ", date(9999, 12, 31)), + (int("1" + "0" * 100), date(9999, 12, 31)), + (1e1000, date(9999, 12, 31)), + ("-infinity", date(1, 1, 1)), + ("-inf", date(1, 1, 1)), + ("nan", ValueError), + ], +) +def test_date_parsing(value: Union[str, bytes, int, float], result: Union[date, Type[Exception]]) -> None: + if type(result) == type and issubclass(result, Exception): # pyright: ignore[reportUnnecessaryIsInstance] + with pytest.raises(result): + parse_date(value) + else: + assert parse_date(value) == result + + +@pytest.mark.parametrize( + "value,result", + [ + # Valid inputs + # values in seconds + ("1494012444.883309", datetime(2017, 5, 5, 19, 27, 24, 883_309, tzinfo=timezone.utc)), + (1_494_012_444.883_309, datetime(2017, 5, 5, 19, 27, 24, 883_309, tzinfo=timezone.utc)), + ("1494012444", datetime(2017, 5, 5, 19, 27, 24, tzinfo=timezone.utc)), + (b"1494012444", datetime(2017, 5, 5, 19, 27, 24, tzinfo=timezone.utc)), + (1_494_012_444, datetime(2017, 5, 5, 19, 27, 24, tzinfo=timezone.utc)), + # values in ms + ("1494012444000.883309", datetime(2017, 5, 5, 19, 27, 24, 883, tzinfo=timezone.utc)), + ("-1494012444000.883309", datetime(1922, 8, 29, 4, 32, 35, 999117, tzinfo=timezone.utc)), + (1_494_012_444_000, datetime(2017, 5, 5, 19, 27, 24, tzinfo=timezone.utc)), + ("2012-04-23T09:15:00", datetime(2012, 4, 23, 9, 15)), + ("2012-4-9 4:8:16", datetime(2012, 4, 9, 4, 8, 16)), + ("2012-04-23T09:15:00Z", datetime(2012, 4, 23, 9, 15, 0, 0, timezone.utc)), + ("2012-4-9 4:8:16-0320", datetime(2012, 4, 9, 4, 8, 16, 0, create_tz(-200))), + ("2012-04-23T10:20:30.400+02:30", datetime(2012, 4, 23, 10, 20, 30, 400_000, create_tz(150))), + ("2012-04-23T10:20:30.400+02", datetime(2012, 4, 23, 10, 20, 30, 400_000, create_tz(120))), + ("2012-04-23T10:20:30.400-02", datetime(2012, 4, 23, 10, 20, 30, 400_000, create_tz(-120))), + (b"2012-04-23T10:20:30.400-02", datetime(2012, 4, 23, 10, 20, 30, 400_000, create_tz(-120))), + (datetime(2017, 5, 5), datetime(2017, 5, 5)), + (0, datetime(1970, 1, 1, 0, 0, 0, tzinfo=timezone.utc)), + # Invalid inputs + ("x20120423091500", ValueError), + ("2012-04-56T09:15:90", ValueError), + ("2012-04-23T11:05:00-25:00", ValueError), + (19_999_999_999, datetime(2603, 10, 11, 11, 33, 19, tzinfo=timezone.utc)), # just before watershed + (20_000_000_001, datetime(1970, 8, 20, 11, 33, 20, 1000, tzinfo=timezone.utc)), # just after watershed + (1_549_316_052, datetime(2019, 2, 4, 21, 34, 12, 0, tzinfo=timezone.utc)), # nowish in s + (1_549_316_052_104, datetime(2019, 2, 4, 21, 34, 12, 104_000, tzinfo=timezone.utc)), # nowish in ms + (1_549_316_052_104_324, datetime(2019, 2, 4, 21, 34, 12, 104_324, tzinfo=timezone.utc)), # nowish in μs + (1_549_316_052_104_324_096, datetime(2019, 2, 4, 21, 34, 12, 104_324, tzinfo=timezone.utc)), # nowish in ns + ("infinity", datetime(9999, 12, 31, 23, 59, 59, 999999)), + ("inf", datetime(9999, 12, 31, 23, 59, 59, 999999)), + ("inf ", datetime(9999, 12, 31, 23, 59, 59, 999999)), + (1e50, datetime(9999, 12, 31, 23, 59, 59, 999999)), + (float("inf"), datetime(9999, 12, 31, 23, 59, 59, 999999)), + ("-infinity", datetime(1, 1, 1, 0, 0)), + ("-inf", datetime(1, 1, 1, 0, 0)), + ("nan", ValueError), + ], +) +def test_datetime_parsing(value: Union[str, bytes, int, float], result: Union[datetime, Type[Exception]]) -> None: + if type(result) == type and issubclass(result, Exception): # pyright: ignore[reportUnnecessaryIsInstance] + with pytest.raises(result): + parse_datetime(value) + else: + assert parse_datetime(value) == result diff --git a/tests/utils.py b/tests/utils.py index ddab04d..1c7ff5e 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -19,7 +19,7 @@ is_annotated_type, is_type_alias_type, ) -from nextbillionai._compat import PYDANTIC_V2, field_outer_type, get_model_fields +from nextbillionai._compat import PYDANTIC_V1, field_outer_type, get_model_fields from nextbillionai._models import BaseModel BaseModelT = TypeVar("BaseModelT", bound=BaseModel) @@ -28,12 +28,12 @@ def assert_matches_model(model: type[BaseModelT], value: BaseModelT, *, path: list[str]) -> bool: for name, field in get_model_fields(model).items(): field_value = getattr(value, name) - if PYDANTIC_V2: - allow_none = False - else: + if PYDANTIC_V1: # in v1 nullability was structured differently # https://docs.pydantic.dev/2.0/migration/#required-optional-and-nullable-fields allow_none = getattr(field, "allow_none", False) + else: + allow_none = False assert_matches_type( field_outer_type(field), From 8c3c148d136fd0541c4ef1ce1cafd28f39512cf0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 5 Sep 2025 04:55:56 +0000 Subject: [PATCH 12/35] chore(internal): move mypy configurations to `pyproject.toml` file --- mypy.ini | 50 ------------------------------------------------ pyproject.toml | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 50 deletions(-) delete mode 100644 mypy.ini diff --git a/mypy.ini b/mypy.ini deleted file mode 100644 index 96f1f31..0000000 --- a/mypy.ini +++ /dev/null @@ -1,50 +0,0 @@ -[mypy] -pretty = True -show_error_codes = True - -# Exclude _files.py because mypy isn't smart enough to apply -# the correct type narrowing and as this is an internal module -# it's fine to just use Pyright. -# -# We also exclude our `tests` as mypy doesn't always infer -# types correctly and Pyright will still catch any type errors. -exclude = ^(src/nextbillionai/_files\.py|_dev/.*\.py|tests/.*)$ - -strict_equality = True -implicit_reexport = True -check_untyped_defs = True -no_implicit_optional = True - -warn_return_any = True -warn_unreachable = True -warn_unused_configs = True - -# Turn these options off as it could cause conflicts -# with the Pyright options. -warn_unused_ignores = False -warn_redundant_casts = False - -disallow_any_generics = True -disallow_untyped_defs = True -disallow_untyped_calls = True -disallow_subclassing_any = True -disallow_incomplete_defs = True -disallow_untyped_decorators = True -cache_fine_grained = True - -# By default, mypy reports an error if you assign a value to the result -# of a function call that doesn't return anything. We do this in our test -# cases: -# ``` -# result = ... -# assert result is None -# ``` -# Changing this codegen to make mypy happy would increase complexity -# and would not be worth it. -disable_error_code = func-returns-value,overload-cannot-match - -# https://github.com/python/mypy/issues/12162 -[mypy.overrides] -module = "black.files.*" -ignore_errors = true -ignore_missing_imports = true diff --git a/pyproject.toml b/pyproject.toml index e8012f0..5716153 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -157,6 +157,58 @@ reportOverlappingOverload = false reportImportCycles = false reportPrivateUsage = false +[tool.mypy] +pretty = true +show_error_codes = true + +# Exclude _files.py because mypy isn't smart enough to apply +# the correct type narrowing and as this is an internal module +# it's fine to just use Pyright. +# +# We also exclude our `tests` as mypy doesn't always infer +# types correctly and Pyright will still catch any type errors. +exclude = ['src/nextbillionai/_files.py', '_dev/.*.py', 'tests/.*'] + +strict_equality = true +implicit_reexport = true +check_untyped_defs = true +no_implicit_optional = true + +warn_return_any = true +warn_unreachable = true +warn_unused_configs = true + +# Turn these options off as it could cause conflicts +# with the Pyright options. +warn_unused_ignores = false +warn_redundant_casts = false + +disallow_any_generics = true +disallow_untyped_defs = true +disallow_untyped_calls = true +disallow_subclassing_any = true +disallow_incomplete_defs = true +disallow_untyped_decorators = true +cache_fine_grained = true + +# By default, mypy reports an error if you assign a value to the result +# of a function call that doesn't return anything. We do this in our test +# cases: +# ``` +# result = ... +# assert result is None +# ``` +# Changing this codegen to make mypy happy would increase complexity +# and would not be worth it. +disable_error_code = "func-returns-value,overload-cannot-match" + +# https://github.com/python/mypy/issues/12162 +[[tool.mypy.overrides]] +module = "black.files.*" +ignore_errors = true +ignore_missing_imports = true + + [tool.ruff] line-length = 120 output-format = "grouped" From e80b9a7726b0736e33539db461449522179510ab Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 6 Sep 2025 05:54:35 +0000 Subject: [PATCH 13/35] chore(tests): simplify `get_platform` test `nest_asyncio` is archived and broken on some platforms so it's not worth keeping in our test suite. --- pyproject.toml | 1 - requirements-dev.lock | 1 - tests/test_client.py | 53 +++++-------------------------------------- 3 files changed, 6 insertions(+), 49 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5716153..753d773 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,6 @@ dev-dependencies = [ "dirty-equals>=0.6.0", "importlib-metadata>=6.7.0", "rich>=13.7.1", - "nest_asyncio==1.6.0", "pytest-xdist>=3.6.1", ] diff --git a/requirements-dev.lock b/requirements-dev.lock index 6adfade..e759504 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -75,7 +75,6 @@ multidict==6.4.4 mypy==1.14.1 mypy-extensions==1.0.0 # via mypy -nest-asyncio==1.6.0 nodeenv==1.8.0 # via pyright nox==2023.4.22 diff --git a/tests/test_client.py b/tests/test_client.py index d535bb6..975bade 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -6,13 +6,10 @@ import os import sys import json -import time import asyncio import inspect -import subprocess import tracemalloc from typing import Any, Union, cast -from textwrap import dedent from unittest import mock from typing_extensions import Literal @@ -23,14 +20,17 @@ from nextbillionai import NextbillionSDK, AsyncNextbillionSDK, APIResponseValidationError from nextbillionai._types import Omit +from nextbillionai._utils import asyncify from nextbillionai._models import BaseModel, FinalRequestOptions from nextbillionai._exceptions import APIStatusError, APITimeoutError, APIResponseValidationError from nextbillionai._base_client import ( DEFAULT_TIMEOUT, HTTPX_DEFAULT_TIMEOUT, BaseClient, + OtherPlatform, DefaultHttpxClient, DefaultAsyncHttpxClient, + get_platform, make_request_options, ) @@ -1647,50 +1647,9 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: assert response.http_request.headers.get("x-stainless-retry-count") == "42" - def test_get_platform(self) -> None: - # A previous implementation of asyncify could leave threads unterminated when - # used with nest_asyncio. - # - # Since nest_asyncio.apply() is global and cannot be un-applied, this - # test is run in a separate process to avoid affecting other tests. - test_code = dedent(""" - import asyncio - import nest_asyncio - import threading - - from nextbillionai._utils import asyncify - from nextbillionai._base_client import get_platform - - async def test_main() -> None: - result = await asyncify(get_platform)() - print(result) - for thread in threading.enumerate(): - print(thread.name) - - nest_asyncio.apply() - asyncio.run(test_main()) - """) - with subprocess.Popen( - [sys.executable, "-c", test_code], - text=True, - ) as process: - timeout = 10 # seconds - - start_time = time.monotonic() - while True: - return_code = process.poll() - if return_code is not None: - if return_code != 0: - raise AssertionError("calling get_platform using asyncify resulted in a non-zero exit code") - - # success - break - - if time.monotonic() - start_time > timeout: - process.kill() - raise AssertionError("calling get_platform using asyncify resulted in a hung process") - - time.sleep(0.1) + async def test_get_platform(self) -> None: + platform = await asyncify(get_platform)() + assert isinstance(platform, (str, OtherPlatform)) async def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None: # Test that the proxy environment variables are set correctly From ea4f37d389e1f99726b67b01821a24b2f2eed439 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 10 Sep 2025 06:03:34 +0000 Subject: [PATCH 14/35] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index eb48141..4a7461b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 95 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/nextbillion-ai%2Fnextbillion-sdk-b647f1808dda89d18a6340cee497eca5248f6f7d0172dfcf903a6361a1261013.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/nextbillion-ai%2Fnextbillion-sdk-1e5aa8d623200cf13b0f55738d28d0f716eb9c6bc21336bafe77c5e1e6f8515f.yml openapi_spec_hash: 6af51daccd4c91b5d04f71c45dbc31d8 config_hash: 297ad5b2a79da3c4bae12d9bce4efcc7 From fd7ed5b1b53ed3502ab1874621719f000398023b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 17 Sep 2025 03:26:28 +0000 Subject: [PATCH 15/35] chore(internal): update pydantic dependency --- requirements-dev.lock | 7 +++++-- requirements.lock | 7 +++++-- src/nextbillionai/_models.py | 14 ++++++++++---- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/requirements-dev.lock b/requirements-dev.lock index e759504..515fb50 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -88,9 +88,9 @@ pluggy==1.5.0 propcache==0.3.1 # via aiohttp # via yarl -pydantic==2.10.3 +pydantic==2.11.9 # via nextbillionai -pydantic-core==2.27.1 +pydantic-core==2.33.2 # via pydantic pygments==2.18.0 # via rich @@ -126,6 +126,9 @@ typing-extensions==4.12.2 # via pydantic # via pydantic-core # via pyright + # via typing-inspection +typing-inspection==0.4.1 + # via pydantic virtualenv==20.24.5 # via nox yarl==1.20.0 diff --git a/requirements.lock b/requirements.lock index 5c922a8..b392db4 100644 --- a/requirements.lock +++ b/requirements.lock @@ -55,9 +55,9 @@ multidict==6.4.4 propcache==0.3.1 # via aiohttp # via yarl -pydantic==2.10.3 +pydantic==2.11.9 # via nextbillionai -pydantic-core==2.27.1 +pydantic-core==2.33.2 # via pydantic sniffio==1.3.0 # via anyio @@ -68,5 +68,8 @@ typing-extensions==4.12.2 # via nextbillionai # via pydantic # via pydantic-core + # via typing-inspection +typing-inspection==0.4.1 + # via pydantic yarl==1.20.0 # via aiohttp diff --git a/src/nextbillionai/_models.py b/src/nextbillionai/_models.py index 3a6017e..6a3cd1d 100644 --- a/src/nextbillionai/_models.py +++ b/src/nextbillionai/_models.py @@ -256,7 +256,7 @@ def model_dump( mode: Literal["json", "python"] | str = "python", include: IncEx | None = None, exclude: IncEx | None = None, - by_alias: bool = False, + by_alias: bool | None = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, @@ -264,6 +264,7 @@ def model_dump( warnings: bool | Literal["none", "warn", "error"] = True, context: dict[str, Any] | None = None, serialize_as_any: bool = False, + fallback: Callable[[Any], Any] | None = None, ) -> dict[str, Any]: """Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump @@ -295,10 +296,12 @@ def model_dump( raise ValueError("context is only supported in Pydantic v2") if serialize_as_any != False: raise ValueError("serialize_as_any is only supported in Pydantic v2") + if fallback is not None: + raise ValueError("fallback is only supported in Pydantic v2") dumped = super().dict( # pyright: ignore[reportDeprecated] include=include, exclude=exclude, - by_alias=by_alias, + by_alias=by_alias if by_alias is not None else False, exclude_unset=exclude_unset, exclude_defaults=exclude_defaults, exclude_none=exclude_none, @@ -313,13 +316,14 @@ def model_dump_json( indent: int | None = None, include: IncEx | None = None, exclude: IncEx | None = None, - by_alias: bool = False, + by_alias: bool | None = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, round_trip: bool = False, warnings: bool | Literal["none", "warn", "error"] = True, context: dict[str, Any] | None = None, + fallback: Callable[[Any], Any] | None = None, serialize_as_any: bool = False, ) -> str: """Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump_json @@ -348,11 +352,13 @@ def model_dump_json( raise ValueError("context is only supported in Pydantic v2") if serialize_as_any != False: raise ValueError("serialize_as_any is only supported in Pydantic v2") + if fallback is not None: + raise ValueError("fallback is only supported in Pydantic v2") return super().json( # type: ignore[reportDeprecated] indent=indent, include=include, exclude=exclude, - by_alias=by_alias, + by_alias=by_alias if by_alias is not None else False, exclude_unset=exclude_unset, exclude_defaults=exclude_defaults, exclude_none=exclude_none, From e140d77f0549af65b3ca81528a6ad2e8d13fe144 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 19 Sep 2025 03:52:29 +0000 Subject: [PATCH 16/35] chore(types): change optional parameter type from NotGiven to Omit --- src/nextbillionai/__init__.py | 4 +- src/nextbillionai/_base_client.py | 18 +- src/nextbillionai/_client.py | 16 +- src/nextbillionai/_qs.py | 14 +- src/nextbillionai/_types.py | 29 ++- src/nextbillionai/_utils/_transform.py | 4 +- src/nextbillionai/_utils/_utils.py | 8 +- src/nextbillionai/resources/areas.py | 6 +- src/nextbillionai/resources/autocomplete.py | 22 +- src/nextbillionai/resources/autosuggest.py | 22 +- src/nextbillionai/resources/batch.py | 14 +- src/nextbillionai/resources/browse.py | 26 +- src/nextbillionai/resources/directions.py | 102 ++++---- src/nextbillionai/resources/discover.py | 22 +- .../resources/distance_matrix/json.py | 30 +-- .../resources/fleetify/document_templates.py | 30 +-- .../resources/fleetify/routes/routes.py | 30 +-- .../resources/fleetify/routes/steps.py | 86 +++---- src/nextbillionai/resources/geocode.py | 66 ++--- src/nextbillionai/resources/geofence/batch.py | 22 +- .../resources/geofence/console.py | 38 +-- .../resources/geofence/geofence.py | 102 ++++---- src/nextbillionai/resources/isochrone.py | 30 +-- src/nextbillionai/resources/lookup.py | 6 +- src/nextbillionai/resources/map.py | 6 +- src/nextbillionai/resources/mdm.py | 66 ++--- .../resources/multigeocode/multigeocode.py | 38 +-- .../resources/multigeocode/place.py | 42 ++-- src/nextbillionai/resources/navigation.py | 62 ++--- .../optimization/driver_assignment.py | 10 +- .../resources/optimization/optimization.py | 54 ++--- .../resources/optimization/v2.py | 62 ++--- src/nextbillionai/resources/postalcode.py | 22 +- src/nextbillionai/resources/restrictions.py | 226 +++++++++--------- .../resources/restrictions_items.py | 32 ++- src/nextbillionai/resources/revgeocode.py | 14 +- src/nextbillionai/resources/route_report.py | 6 +- .../resources/skynet/asset/asset.py | 126 +++++----- .../resources/skynet/asset/event.py | 30 +-- .../resources/skynet/asset/location.py | 42 ++-- src/nextbillionai/resources/skynet/config.py | 26 +- src/nextbillionai/resources/skynet/monitor.py | 122 +++++----- .../resources/skynet/namespaced_apikeys.py | 10 +- .../resources/skynet/search/polygon.py | 70 +++--- .../resources/skynet/search/search.py | 82 +++---- src/nextbillionai/resources/skynet/skynet.py | 14 +- src/nextbillionai/resources/skynet/trip.py | 94 ++++---- src/nextbillionai/resources/snap_to_roads.py | 42 ++-- tests/test_transform.py | 11 +- 49 files changed, 1033 insertions(+), 1023 deletions(-) diff --git a/src/nextbillionai/__init__.py b/src/nextbillionai/__init__.py index e64971a..70f243e 100644 --- a/src/nextbillionai/__init__.py +++ b/src/nextbillionai/__init__.py @@ -3,7 +3,7 @@ import typing as _t from . import types -from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes +from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes, omit, not_given from ._utils import file_from_path from ._client import ( Client, @@ -48,7 +48,9 @@ "ProxiesTypes", "NotGiven", "NOT_GIVEN", + "not_given", "Omit", + "omit", "NextbillionSDKError", "APIError", "APIStatusError", diff --git a/src/nextbillionai/_base_client.py b/src/nextbillionai/_base_client.py index 6463e2c..fdbd123 100644 --- a/src/nextbillionai/_base_client.py +++ b/src/nextbillionai/_base_client.py @@ -42,7 +42,6 @@ from ._qs import Querystring from ._files import to_httpx_files, async_to_httpx_files from ._types import ( - NOT_GIVEN, Body, Omit, Query, @@ -57,6 +56,7 @@ RequestOptions, HttpxRequestFiles, ModelBuilderProtocol, + not_given, ) from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping from ._compat import PYDANTIC_V1, model_copy, model_dump @@ -145,9 +145,9 @@ def __init__( def __init__( self, *, - url: URL | NotGiven = NOT_GIVEN, - json: Body | NotGiven = NOT_GIVEN, - params: Query | NotGiven = NOT_GIVEN, + url: URL | NotGiven = not_given, + json: Body | NotGiven = not_given, + params: Query | NotGiven = not_given, ) -> None: self.url = url self.json = json @@ -595,7 +595,7 @@ def _maybe_override_cast_to(self, cast_to: type[ResponseT], options: FinalReques # we internally support defining a temporary header to override the # default `cast_to` type for use with `.with_raw_response` and `.with_streaming_response` # see _response.py for implementation details - override_cast_to = headers.pop(OVERRIDE_CAST_TO_HEADER, NOT_GIVEN) + override_cast_to = headers.pop(OVERRIDE_CAST_TO_HEADER, not_given) if is_given(override_cast_to): options.headers = headers return cast(Type[ResponseT], override_cast_to) @@ -825,7 +825,7 @@ def __init__( version: str, base_url: str | URL, max_retries: int = DEFAULT_MAX_RETRIES, - timeout: float | Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | Timeout | None | NotGiven = not_given, http_client: httpx.Client | None = None, custom_headers: Mapping[str, str] | None = None, custom_query: Mapping[str, object] | None = None, @@ -1356,7 +1356,7 @@ def __init__( base_url: str | URL, _strict_response_validation: bool, max_retries: int = DEFAULT_MAX_RETRIES, - timeout: float | Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | Timeout | None | NotGiven = not_given, http_client: httpx.AsyncClient | None = None, custom_headers: Mapping[str, str] | None = None, custom_query: Mapping[str, object] | None = None, @@ -1818,8 +1818,8 @@ def make_request_options( extra_query: Query | None = None, extra_body: Body | None = None, idempotency_key: str | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - post_parser: PostParser | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + post_parser: PostParser | NotGiven = not_given, ) -> RequestOptions: """Create a dict of type RequestOptions without keys of NotGiven values.""" options: RequestOptions = {} diff --git a/src/nextbillionai/_client.py b/src/nextbillionai/_client.py index 8de588f..7ad0066 100644 --- a/src/nextbillionai/_client.py +++ b/src/nextbillionai/_client.py @@ -3,7 +3,7 @@ from __future__ import annotations import os -from typing import Any, Union, Mapping +from typing import Any, Mapping from typing_extensions import Self, override import httpx @@ -11,13 +11,13 @@ from . import _exceptions from ._qs import Querystring from ._types import ( - NOT_GIVEN, Omit, Timeout, NotGiven, Transport, ProxiesTypes, RequestOptions, + not_given, ) from ._utils import is_given, get_async_library from ._version import __version__ @@ -105,7 +105,7 @@ def __init__( *, api_key: str | None = None, base_url: str | httpx.URL | None = None, - timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, + timeout: float | Timeout | None | NotGiven = not_given, max_retries: int = DEFAULT_MAX_RETRIES, default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, @@ -207,9 +207,9 @@ def copy( *, api_key: str | None = None, base_url: str | httpx.URL | None = None, - timeout: float | Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | Timeout | None | NotGiven = not_given, http_client: httpx.Client | None = None, - max_retries: int | NotGiven = NOT_GIVEN, + max_retries: int | NotGiven = not_given, default_headers: Mapping[str, str] | None = None, set_default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, @@ -324,7 +324,7 @@ def __init__( *, api_key: str | None = None, base_url: str | httpx.URL | None = None, - timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, + timeout: float | Timeout | None | NotGiven = not_given, max_retries: int = DEFAULT_MAX_RETRIES, default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, @@ -426,9 +426,9 @@ def copy( *, api_key: str | None = None, base_url: str | httpx.URL | None = None, - timeout: float | Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | Timeout | None | NotGiven = not_given, http_client: httpx.AsyncClient | None = None, - max_retries: int | NotGiven = NOT_GIVEN, + max_retries: int | NotGiven = not_given, default_headers: Mapping[str, str] | None = None, set_default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, diff --git a/src/nextbillionai/_qs.py b/src/nextbillionai/_qs.py index 274320c..ada6fd3 100644 --- a/src/nextbillionai/_qs.py +++ b/src/nextbillionai/_qs.py @@ -4,7 +4,7 @@ from urllib.parse import parse_qs, urlencode from typing_extensions import Literal, get_args -from ._types import NOT_GIVEN, NotGiven, NotGivenOr +from ._types import NotGiven, not_given from ._utils import flatten _T = TypeVar("_T") @@ -41,8 +41,8 @@ def stringify( self, params: Params, *, - array_format: NotGivenOr[ArrayFormat] = NOT_GIVEN, - nested_format: NotGivenOr[NestedFormat] = NOT_GIVEN, + array_format: ArrayFormat | NotGiven = not_given, + nested_format: NestedFormat | NotGiven = not_given, ) -> str: return urlencode( self.stringify_items( @@ -56,8 +56,8 @@ def stringify_items( self, params: Params, *, - array_format: NotGivenOr[ArrayFormat] = NOT_GIVEN, - nested_format: NotGivenOr[NestedFormat] = NOT_GIVEN, + array_format: ArrayFormat | NotGiven = not_given, + nested_format: NestedFormat | NotGiven = not_given, ) -> list[tuple[str, str]]: opts = Options( qs=self, @@ -143,8 +143,8 @@ def __init__( self, qs: Querystring = _qs, *, - array_format: NotGivenOr[ArrayFormat] = NOT_GIVEN, - nested_format: NotGivenOr[NestedFormat] = NOT_GIVEN, + array_format: ArrayFormat | NotGiven = not_given, + nested_format: NestedFormat | NotGiven = not_given, ) -> None: self.array_format = qs.array_format if isinstance(array_format, NotGiven) else array_format self.nested_format = qs.nested_format if isinstance(nested_format, NotGiven) else nested_format diff --git a/src/nextbillionai/_types.py b/src/nextbillionai/_types.py index 6f6f291..815f94e 100644 --- a/src/nextbillionai/_types.py +++ b/src/nextbillionai/_types.py @@ -117,18 +117,21 @@ class RequestOptions(TypedDict, total=False): # Sentinel class used until PEP 0661 is accepted class NotGiven: """ - A sentinel singleton class used to distinguish omitted keyword arguments - from those passed in with the value None (which may have different behavior). + For parameters with a meaningful None value, we need to distinguish between + the user explicitly passing None, and the user not passing the parameter at + all. + + User code shouldn't need to use not_given directly. For example: ```py - def get(timeout: Union[int, NotGiven, None] = NotGiven()) -> Response: ... + def create(timeout: Timeout | None | NotGiven = not_given): ... - get(timeout=1) # 1s timeout - get(timeout=None) # No timeout - get() # Default timeout behavior, which may not be statically known at the method definition. + create(timeout=1) # 1s timeout + create(timeout=None) # No timeout + create() # Default timeout behavior ``` """ @@ -140,13 +143,14 @@ def __repr__(self) -> str: return "NOT_GIVEN" -NotGivenOr = Union[_T, NotGiven] +not_given = NotGiven() +# for backwards compatibility: NOT_GIVEN = NotGiven() class Omit: - """In certain situations you need to be able to represent a case where a default value has - to be explicitly removed and `None` is not an appropriate substitute, for example: + """ + To explicitly omit something from being sent in a request, use `omit`. ```py # as the default `Content-Type` header is `application/json` that will be sent @@ -156,8 +160,8 @@ class Omit: # to look something like: 'multipart/form-data; boundary=0d8382fcf5f8c3be01ca2e11002d2983' client.post(..., headers={"Content-Type": "multipart/form-data"}) - # instead you can remove the default `application/json` header by passing Omit - client.post(..., headers={"Content-Type": Omit()}) + # instead you can remove the default `application/json` header by passing omit + client.post(..., headers={"Content-Type": omit}) ``` """ @@ -165,6 +169,9 @@ def __bool__(self) -> Literal[False]: return False +omit = Omit() + + @runtime_checkable class ModelBuilderProtocol(Protocol): @classmethod diff --git a/src/nextbillionai/_utils/_transform.py b/src/nextbillionai/_utils/_transform.py index c19124f..5207549 100644 --- a/src/nextbillionai/_utils/_transform.py +++ b/src/nextbillionai/_utils/_transform.py @@ -268,7 +268,7 @@ def _transform_typeddict( annotations = get_type_hints(expected_type, include_extras=True) for key, value in data.items(): if not is_given(value): - # we don't need to include `NotGiven` values here as they'll + # we don't need to include omitted values here as they'll # be stripped out before the request is sent anyway continue @@ -434,7 +434,7 @@ async def _async_transform_typeddict( annotations = get_type_hints(expected_type, include_extras=True) for key, value in data.items(): if not is_given(value): - # we don't need to include `NotGiven` values here as they'll + # we don't need to include omitted values here as they'll # be stripped out before the request is sent anyway continue diff --git a/src/nextbillionai/_utils/_utils.py b/src/nextbillionai/_utils/_utils.py index f081859..50d5926 100644 --- a/src/nextbillionai/_utils/_utils.py +++ b/src/nextbillionai/_utils/_utils.py @@ -21,7 +21,7 @@ import sniffio -from .._types import NotGiven, FileTypes, NotGivenOr, HeadersLike +from .._types import Omit, NotGiven, FileTypes, HeadersLike _T = TypeVar("_T") _TupleT = TypeVar("_TupleT", bound=Tuple[object, ...]) @@ -63,7 +63,7 @@ def _extract_items( try: key = path[index] except IndexError: - if isinstance(obj, NotGiven): + if not is_given(obj): # no value was provided - we can safely ignore return [] @@ -126,8 +126,8 @@ def _extract_items( return [] -def is_given(obj: NotGivenOr[_T]) -> TypeGuard[_T]: - return not isinstance(obj, NotGiven) +def is_given(obj: _T | NotGiven | Omit) -> TypeGuard[_T]: + return not isinstance(obj, NotGiven) and not isinstance(obj, Omit) # Type safe methods for narrowing types with TypeVars. diff --git a/src/nextbillionai/resources/areas.py b/src/nextbillionai/resources/areas.py index 6b82bb0..ac72726 100644 --- a/src/nextbillionai/resources/areas.py +++ b/src/nextbillionai/resources/areas.py @@ -5,7 +5,7 @@ import httpx from ..types import area_list_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Query, Headers, NotGiven, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -50,7 +50,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AreaListResponse: """ Get available areas @@ -109,7 +109,7 @@ async def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AreaListResponse: """ Get available areas diff --git a/src/nextbillionai/resources/autocomplete.py b/src/nextbillionai/resources/autocomplete.py index d9bc102..aaf2ea0 100644 --- a/src/nextbillionai/resources/autocomplete.py +++ b/src/nextbillionai/resources/autocomplete.py @@ -5,7 +5,7 @@ import httpx from ..types import autocomplete_suggest_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -46,16 +46,16 @@ def suggest( *, key: str, q: str, - at: str | NotGiven = NOT_GIVEN, - in_: str | NotGiven = NOT_GIVEN, - lang: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + at: str | Omit = omit, + in_: str | Omit = omit, + lang: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AutocompleteSuggestResponse: """ Autocomplete @@ -163,16 +163,16 @@ async def suggest( *, key: str, q: str, - at: str | NotGiven = NOT_GIVEN, - in_: str | NotGiven = NOT_GIVEN, - lang: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + at: str | Omit = omit, + in_: str | Omit = omit, + lang: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AutocompleteSuggestResponse: """ Autocomplete diff --git a/src/nextbillionai/resources/autosuggest.py b/src/nextbillionai/resources/autosuggest.py index 581caf5..c1f3025 100644 --- a/src/nextbillionai/resources/autosuggest.py +++ b/src/nextbillionai/resources/autosuggest.py @@ -5,7 +5,7 @@ import httpx from ..types import autosuggest_suggest_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -46,16 +46,16 @@ def suggest( *, key: str, q: str, - at: str | NotGiven = NOT_GIVEN, - in_: str | NotGiven = NOT_GIVEN, - lang: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + at: str | Omit = omit, + in_: str | Omit = omit, + lang: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AutosuggestSuggestResponse: """ Autosuggest @@ -163,16 +163,16 @@ async def suggest( *, key: str, q: str, - at: str | NotGiven = NOT_GIVEN, - in_: str | NotGiven = NOT_GIVEN, - lang: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + at: str | Omit = omit, + in_: str | Omit = omit, + lang: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AutosuggestSuggestResponse: """ Autosuggest diff --git a/src/nextbillionai/resources/batch.py b/src/nextbillionai/resources/batch.py index 4d255a2..dbce3a9 100644 --- a/src/nextbillionai/resources/batch.py +++ b/src/nextbillionai/resources/batch.py @@ -7,7 +7,7 @@ import httpx from ..types import batch_create_params, batch_retrieve_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -48,13 +48,13 @@ def create( self, *, key: str, - requests: Iterable[batch_create_params.Request] | NotGiven = NOT_GIVEN, + requests: Iterable[batch_create_params.Request] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> BatchCreateResponse: """ Create Batch Routing @@ -97,7 +97,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> BatchRetrieveResponse: """ Get Batch Result @@ -160,13 +160,13 @@ async def create( self, *, key: str, - requests: Iterable[batch_create_params.Request] | NotGiven = NOT_GIVEN, + requests: Iterable[batch_create_params.Request] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> BatchCreateResponse: """ Create Batch Routing @@ -209,7 +209,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> BatchRetrieveResponse: """ Get Batch Result diff --git a/src/nextbillionai/resources/browse.py b/src/nextbillionai/resources/browse.py index 89d3e15..a3fe4c9 100644 --- a/src/nextbillionai/resources/browse.py +++ b/src/nextbillionai/resources/browse.py @@ -5,7 +5,7 @@ import httpx from ..types import browse_search_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -45,17 +45,17 @@ def search( self, *, key: str, - at: str | NotGiven = NOT_GIVEN, - categories: str | NotGiven = NOT_GIVEN, - in_: str | NotGiven = NOT_GIVEN, - lang: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + at: str | Omit = omit, + categories: str | Omit = omit, + in_: str | Omit = omit, + lang: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> BrowseSearchResponse: """ Browse a search area using a free text query @@ -161,17 +161,17 @@ async def search( self, *, key: str, - at: str | NotGiven = NOT_GIVEN, - categories: str | NotGiven = NOT_GIVEN, - in_: str | NotGiven = NOT_GIVEN, - lang: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + at: str | Omit = omit, + categories: str | Omit = omit, + in_: str | Omit = omit, + lang: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> BrowseSearchResponse: """ Browse a search area using a free text query diff --git a/src/nextbillionai/resources/directions.py b/src/nextbillionai/resources/directions.py index e10cb8a..a3fbba8 100644 --- a/src/nextbillionai/resources/directions.py +++ b/src/nextbillionai/resources/directions.py @@ -7,7 +7,7 @@ import httpx from ..types import direction_compute_route_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -48,9 +48,9 @@ def compute_route( *, destination: str, origin: str, - altcount: int | NotGiven = NOT_GIVEN, - alternatives: bool | NotGiven = NOT_GIVEN, - approaches: str | NotGiven = NOT_GIVEN, + altcount: int | Omit = omit, + alternatives: bool | Omit = omit, + approaches: str | Omit = omit, avoid: Literal[ "toll", "ferry", @@ -65,39 +65,39 @@ def compute_route( "geofence_id", "tunnel", ] - | NotGiven = NOT_GIVEN, - bearings: str | NotGiven = NOT_GIVEN, - cross_border: bool | NotGiven = NOT_GIVEN, - departure_time: int | NotGiven = NOT_GIVEN, - drive_time_limits: str | NotGiven = NOT_GIVEN, + | Omit = omit, + bearings: str | Omit = omit, + cross_border: bool | Omit = omit, + departure_time: int | Omit = omit, + drive_time_limits: str | Omit = omit, emission_class: Literal[ "euro0", "euro1", "euro2", "euro3", "euro4", "euro5", "euro6", "euro7", "euro8", "euro9" ] - | NotGiven = NOT_GIVEN, + | Omit = omit, exclude: Literal[ "toll", "ferry", "highway", "service_road", "uturn", "sharp_turn", "left_turn", "right_turn", "none" ] - | NotGiven = NOT_GIVEN, - geometry: Literal["polyline", "polyline6", "geojson"] | NotGiven = NOT_GIVEN, - hazmat_type: Literal["general", "circumstantial", "explosive", "harmful_to_water"] | NotGiven = NOT_GIVEN, - mode: Literal["car", "truck"] | NotGiven = NOT_GIVEN, - option: Literal["fast", "flexible"] | NotGiven = NOT_GIVEN, - overview: Literal["full", "simplified", "false"] | NotGiven = NOT_GIVEN, - rest_times: str | NotGiven = NOT_GIVEN, - road_info: Literal["max_speed", "toll_distance", "toll_cost"] | NotGiven = NOT_GIVEN, - route_type: Literal["fastest", "shortest"] | NotGiven = NOT_GIVEN, - steps: bool | NotGiven = NOT_GIVEN, - truck_axle_load: float | NotGiven = NOT_GIVEN, - truck_size: str | NotGiven = NOT_GIVEN, - truck_weight: int | NotGiven = NOT_GIVEN, - turn_angle_range: int | NotGiven = NOT_GIVEN, - waypoints: str | NotGiven = NOT_GIVEN, + | Omit = omit, + geometry: Literal["polyline", "polyline6", "geojson"] | Omit = omit, + hazmat_type: Literal["general", "circumstantial", "explosive", "harmful_to_water"] | Omit = omit, + mode: Literal["car", "truck"] | Omit = omit, + option: Literal["fast", "flexible"] | Omit = omit, + overview: Literal["full", "simplified", "false"] | Omit = omit, + rest_times: str | Omit = omit, + road_info: Literal["max_speed", "toll_distance", "toll_cost"] | Omit = omit, + route_type: Literal["fastest", "shortest"] | Omit = omit, + steps: bool | Omit = omit, + truck_axle_load: float | Omit = omit, + truck_size: str | Omit = omit, + truck_weight: int | Omit = omit, + turn_angle_range: int | Omit = omit, + waypoints: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DirectionComputeRouteResponse: """ Directions API is a service that computes a route with given coordinates. @@ -439,9 +439,9 @@ async def compute_route( *, destination: str, origin: str, - altcount: int | NotGiven = NOT_GIVEN, - alternatives: bool | NotGiven = NOT_GIVEN, - approaches: str | NotGiven = NOT_GIVEN, + altcount: int | Omit = omit, + alternatives: bool | Omit = omit, + approaches: str | Omit = omit, avoid: Literal[ "toll", "ferry", @@ -456,39 +456,39 @@ async def compute_route( "geofence_id", "tunnel", ] - | NotGiven = NOT_GIVEN, - bearings: str | NotGiven = NOT_GIVEN, - cross_border: bool | NotGiven = NOT_GIVEN, - departure_time: int | NotGiven = NOT_GIVEN, - drive_time_limits: str | NotGiven = NOT_GIVEN, + | Omit = omit, + bearings: str | Omit = omit, + cross_border: bool | Omit = omit, + departure_time: int | Omit = omit, + drive_time_limits: str | Omit = omit, emission_class: Literal[ "euro0", "euro1", "euro2", "euro3", "euro4", "euro5", "euro6", "euro7", "euro8", "euro9" ] - | NotGiven = NOT_GIVEN, + | Omit = omit, exclude: Literal[ "toll", "ferry", "highway", "service_road", "uturn", "sharp_turn", "left_turn", "right_turn", "none" ] - | NotGiven = NOT_GIVEN, - geometry: Literal["polyline", "polyline6", "geojson"] | NotGiven = NOT_GIVEN, - hazmat_type: Literal["general", "circumstantial", "explosive", "harmful_to_water"] | NotGiven = NOT_GIVEN, - mode: Literal["car", "truck"] | NotGiven = NOT_GIVEN, - option: Literal["fast", "flexible"] | NotGiven = NOT_GIVEN, - overview: Literal["full", "simplified", "false"] | NotGiven = NOT_GIVEN, - rest_times: str | NotGiven = NOT_GIVEN, - road_info: Literal["max_speed", "toll_distance", "toll_cost"] | NotGiven = NOT_GIVEN, - route_type: Literal["fastest", "shortest"] | NotGiven = NOT_GIVEN, - steps: bool | NotGiven = NOT_GIVEN, - truck_axle_load: float | NotGiven = NOT_GIVEN, - truck_size: str | NotGiven = NOT_GIVEN, - truck_weight: int | NotGiven = NOT_GIVEN, - turn_angle_range: int | NotGiven = NOT_GIVEN, - waypoints: str | NotGiven = NOT_GIVEN, + | Omit = omit, + geometry: Literal["polyline", "polyline6", "geojson"] | Omit = omit, + hazmat_type: Literal["general", "circumstantial", "explosive", "harmful_to_water"] | Omit = omit, + mode: Literal["car", "truck"] | Omit = omit, + option: Literal["fast", "flexible"] | Omit = omit, + overview: Literal["full", "simplified", "false"] | Omit = omit, + rest_times: str | Omit = omit, + road_info: Literal["max_speed", "toll_distance", "toll_cost"] | Omit = omit, + route_type: Literal["fastest", "shortest"] | Omit = omit, + steps: bool | Omit = omit, + truck_axle_load: float | Omit = omit, + truck_size: str | Omit = omit, + truck_weight: int | Omit = omit, + turn_angle_range: int | Omit = omit, + waypoints: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DirectionComputeRouteResponse: """ Directions API is a service that computes a route with given coordinates. diff --git a/src/nextbillionai/resources/discover.py b/src/nextbillionai/resources/discover.py index 063374a..bc4397b 100644 --- a/src/nextbillionai/resources/discover.py +++ b/src/nextbillionai/resources/discover.py @@ -5,7 +5,7 @@ import httpx from ..types import discover_retrieve_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -46,16 +46,16 @@ def retrieve( *, key: str, q: str, - at: str | NotGiven = NOT_GIVEN, - in_: str | NotGiven = NOT_GIVEN, - lang: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + at: str | Omit = omit, + in_: str | Omit = omit, + lang: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DiscoverRetrieveResponse: """ Discover matching places @@ -163,16 +163,16 @@ async def retrieve( *, key: str, q: str, - at: str | NotGiven = NOT_GIVEN, - in_: str | NotGiven = NOT_GIVEN, - lang: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + at: str | Omit = omit, + in_: str | Omit = omit, + lang: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DiscoverRetrieveResponse: """ Discover matching places diff --git a/src/nextbillionai/resources/distance_matrix/json.py b/src/nextbillionai/resources/distance_matrix/json.py index 9d0a952..5bde2a1 100644 --- a/src/nextbillionai/resources/distance_matrix/json.py +++ b/src/nextbillionai/resources/distance_matrix/json.py @@ -6,7 +6,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven +from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -51,7 +51,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """asfd""" extra_headers = {"Accept": "*/*", **(extra_headers or {})} @@ -69,17 +69,17 @@ def retrieve( destinations: str, key: str, origins: str, - approaches: Literal["unrestricted", "curb"] | NotGiven = NOT_GIVEN, - avoid: Literal["toll", "ferry", "highway", "none"] | NotGiven = NOT_GIVEN, - bearings: str | NotGiven = NOT_GIVEN, - mode: Literal["car", "truck"] | NotGiven = NOT_GIVEN, - route_failed_prompt: bool | NotGiven = NOT_GIVEN, + approaches: Literal["unrestricted", "curb"] | Omit = omit, + avoid: Literal["toll", "ferry", "highway", "none"] | Omit = omit, + bearings: str | Omit = omit, + mode: Literal["car", "truck"] | Omit = omit, + route_failed_prompt: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> JsonRetrieveResponse: """ Nextbillion.ai Distance Matrix API computes distances and ETAs between a set of @@ -232,7 +232,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """asfd""" extra_headers = {"Accept": "*/*", **(extra_headers or {})} @@ -250,17 +250,17 @@ async def retrieve( destinations: str, key: str, origins: str, - approaches: Literal["unrestricted", "curb"] | NotGiven = NOT_GIVEN, - avoid: Literal["toll", "ferry", "highway", "none"] | NotGiven = NOT_GIVEN, - bearings: str | NotGiven = NOT_GIVEN, - mode: Literal["car", "truck"] | NotGiven = NOT_GIVEN, - route_failed_prompt: bool | NotGiven = NOT_GIVEN, + approaches: Literal["unrestricted", "curb"] | Omit = omit, + avoid: Literal["toll", "ferry", "highway", "none"] | Omit = omit, + bearings: str | Omit = omit, + mode: Literal["car", "truck"] | Omit = omit, + route_failed_prompt: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> JsonRetrieveResponse: """ Nextbillion.ai Distance Matrix API computes distances and ETAs between a set of diff --git a/src/nextbillionai/resources/fleetify/document_templates.py b/src/nextbillionai/resources/fleetify/document_templates.py index 56cb140..5548b0a 100644 --- a/src/nextbillionai/resources/fleetify/document_templates.py +++ b/src/nextbillionai/resources/fleetify/document_templates.py @@ -6,7 +6,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -65,7 +65,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DocumentTemplateCreateResponse: """ Create Document template @@ -117,7 +117,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DocumentTemplateRetrieveResponse: """ Retrieve template by ID @@ -153,14 +153,14 @@ def update( id: str, *, key: str, - content: Iterable[DocumentTemplateContentRequestParam] | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + content: Iterable[DocumentTemplateContentRequestParam] | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DocumentTemplateUpdateResponse: """ Update a document template @@ -213,7 +213,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DocumentTemplateListResponse: """ Get all document templates @@ -252,7 +252,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DocumentTemplateDeleteResponse: """ Delete a document template @@ -315,7 +315,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DocumentTemplateCreateResponse: """ Create Document template @@ -369,7 +369,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DocumentTemplateRetrieveResponse: """ Retrieve template by ID @@ -407,14 +407,14 @@ async def update( id: str, *, key: str, - content: Iterable[DocumentTemplateContentRequestParam] | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + content: Iterable[DocumentTemplateContentRequestParam] | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DocumentTemplateUpdateResponse: """ Update a document template @@ -469,7 +469,7 @@ async def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DocumentTemplateListResponse: """ Get all document templates @@ -510,7 +510,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DocumentTemplateDeleteResponse: """ Delete a document template diff --git a/src/nextbillionai/resources/fleetify/routes/routes.py b/src/nextbillionai/resources/fleetify/routes/routes.py index 1f8e2d7..47c1202 100644 --- a/src/nextbillionai/resources/fleetify/routes/routes.py +++ b/src/nextbillionai/resources/fleetify/routes/routes.py @@ -14,7 +14,7 @@ StepsResourceWithStreamingResponse, AsyncStepsResourceWithStreamingResponse, ) -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ...._utils import maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -63,16 +63,16 @@ def create( key: str, driver_email: str, steps: Iterable[RouteStepsRequestParam], - distance: int | NotGiven = NOT_GIVEN, - document_template_id: str | NotGiven = NOT_GIVEN, - ro_request_id: str | NotGiven = NOT_GIVEN, - routing: route_create_params.Routing | NotGiven = NOT_GIVEN, + distance: int | Omit = omit, + document_template_id: str | Omit = omit, + ro_request_id: str | Omit = omit, + routing: route_create_params.Routing | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RouteCreateResponse: """ Dispatch a new route @@ -161,13 +161,13 @@ def redispatch( *, key: str, operations: Iterable[route_redispatch_params.Operation], - distance: float | NotGiven = NOT_GIVEN, + distance: float | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RouteRedispatchResponse: """ Re-dispatch route @@ -241,16 +241,16 @@ async def create( key: str, driver_email: str, steps: Iterable[RouteStepsRequestParam], - distance: int | NotGiven = NOT_GIVEN, - document_template_id: str | NotGiven = NOT_GIVEN, - ro_request_id: str | NotGiven = NOT_GIVEN, - routing: route_create_params.Routing | NotGiven = NOT_GIVEN, + distance: int | Omit = omit, + document_template_id: str | Omit = omit, + ro_request_id: str | Omit = omit, + routing: route_create_params.Routing | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RouteCreateResponse: """ Dispatch a new route @@ -339,13 +339,13 @@ async def redispatch( *, key: str, operations: Iterable[route_redispatch_params.Operation], - distance: float | NotGiven = NOT_GIVEN, + distance: float | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RouteRedispatchResponse: """ Re-dispatch route diff --git a/src/nextbillionai/resources/fleetify/routes/steps.py b/src/nextbillionai/resources/fleetify/routes/steps.py index e2f608b..733f6ea 100644 --- a/src/nextbillionai/resources/fleetify/routes/steps.py +++ b/src/nextbillionai/resources/fleetify/routes/steps.py @@ -7,7 +7,7 @@ import httpx -from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven +from ...._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given from ...._utils import maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -64,18 +64,18 @@ def create( location: Iterable[float], position: int, type: Literal["start", "job", "pickup", "delivery", "break", "layover", "end"], - address: str | NotGiven = NOT_GIVEN, - completion_mode: RouteStepCompletionMode | NotGiven = NOT_GIVEN, - document_template_id: str | NotGiven = NOT_GIVEN, - duration: int | NotGiven = NOT_GIVEN, - geofence_config: RouteStepGeofenceConfigParam | NotGiven = NOT_GIVEN, - meta: step_create_params.Meta | NotGiven = NOT_GIVEN, + address: str | Omit = omit, + completion_mode: RouteStepCompletionMode | Omit = omit, + document_template_id: str | Omit = omit, + duration: int | Omit = omit, + geofence_config: RouteStepGeofenceConfigParam | Omit = omit, + meta: step_create_params.Meta | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> StepCreateResponse: """ Insert a new step @@ -182,20 +182,20 @@ def update( key: str, arrival: int, position: int, - address: str | NotGiven = NOT_GIVEN, - completion_mode: RouteStepCompletionMode | NotGiven = NOT_GIVEN, - document_template_id: str | NotGiven = NOT_GIVEN, - duration: int | NotGiven = NOT_GIVEN, - geofence_config: RouteStepGeofenceConfigParam | NotGiven = NOT_GIVEN, - location: Iterable[float] | NotGiven = NOT_GIVEN, - meta: step_update_params.Meta | NotGiven = NOT_GIVEN, - type: Literal["start", "job", "pickup", "delivery", "break", "layover", "end"] | NotGiven = NOT_GIVEN, + address: str | Omit = omit, + completion_mode: RouteStepCompletionMode | Omit = omit, + document_template_id: str | Omit = omit, + duration: int | Omit = omit, + geofence_config: RouteStepGeofenceConfigParam | Omit = omit, + location: Iterable[float] | Omit = omit, + meta: step_update_params.Meta | Omit = omit, + type: Literal["start", "job", "pickup", "delivery", "break", "layover", "end"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> StepUpdateResponse: """ Update a step @@ -302,7 +302,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> StepDeleteResponse: """ Delete a step @@ -341,15 +341,15 @@ def complete( *, route_id: str, key: str, - document: DocumentSubmissionParam | NotGiven = NOT_GIVEN, - mode: str | NotGiven = NOT_GIVEN, - status: str | NotGiven = NOT_GIVEN, + document: DocumentSubmissionParam | Omit = omit, + mode: str | Omit = omit, + status: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ Complete a route step with document submission, or update the document of a @@ -441,18 +441,18 @@ async def create( location: Iterable[float], position: int, type: Literal["start", "job", "pickup", "delivery", "break", "layover", "end"], - address: str | NotGiven = NOT_GIVEN, - completion_mode: RouteStepCompletionMode | NotGiven = NOT_GIVEN, - document_template_id: str | NotGiven = NOT_GIVEN, - duration: int | NotGiven = NOT_GIVEN, - geofence_config: RouteStepGeofenceConfigParam | NotGiven = NOT_GIVEN, - meta: step_create_params.Meta | NotGiven = NOT_GIVEN, + address: str | Omit = omit, + completion_mode: RouteStepCompletionMode | Omit = omit, + document_template_id: str | Omit = omit, + duration: int | Omit = omit, + geofence_config: RouteStepGeofenceConfigParam | Omit = omit, + meta: step_create_params.Meta | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> StepCreateResponse: """ Insert a new step @@ -559,20 +559,20 @@ async def update( key: str, arrival: int, position: int, - address: str | NotGiven = NOT_GIVEN, - completion_mode: RouteStepCompletionMode | NotGiven = NOT_GIVEN, - document_template_id: str | NotGiven = NOT_GIVEN, - duration: int | NotGiven = NOT_GIVEN, - geofence_config: RouteStepGeofenceConfigParam | NotGiven = NOT_GIVEN, - location: Iterable[float] | NotGiven = NOT_GIVEN, - meta: step_update_params.Meta | NotGiven = NOT_GIVEN, - type: Literal["start", "job", "pickup", "delivery", "break", "layover", "end"] | NotGiven = NOT_GIVEN, + address: str | Omit = omit, + completion_mode: RouteStepCompletionMode | Omit = omit, + document_template_id: str | Omit = omit, + duration: int | Omit = omit, + geofence_config: RouteStepGeofenceConfigParam | Omit = omit, + location: Iterable[float] | Omit = omit, + meta: step_update_params.Meta | Omit = omit, + type: Literal["start", "job", "pickup", "delivery", "break", "layover", "end"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> StepUpdateResponse: """ Update a step @@ -679,7 +679,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> StepDeleteResponse: """ Delete a step @@ -718,15 +718,15 @@ async def complete( *, route_id: str, key: str, - document: DocumentSubmissionParam | NotGiven = NOT_GIVEN, - mode: str | NotGiven = NOT_GIVEN, - status: str | NotGiven = NOT_GIVEN, + document: DocumentSubmissionParam | Omit = omit, + mode: str | Omit = omit, + status: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ Complete a route step with document submission, or update the document of a diff --git a/src/nextbillionai/resources/geocode.py b/src/nextbillionai/resources/geocode.py index cbfd55d..e2e19a1 100644 --- a/src/nextbillionai/resources/geocode.py +++ b/src/nextbillionai/resources/geocode.py @@ -7,7 +7,7 @@ import httpx from ..types import geocode_retrieve_params, geocode_batch_create_params, geocode_structured_retrieve_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -50,16 +50,16 @@ def retrieve( *, key: str, q: str, - at: str | NotGiven = NOT_GIVEN, - in_: str | NotGiven = NOT_GIVEN, - lang: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + at: str | Omit = omit, + in_: str | Omit = omit, + lang: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GeocodeRetrieveResponse: """ Geocode @@ -151,7 +151,7 @@ def batch_create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GeocodeBatchCreateResponse: """ Batch Geocode @@ -186,21 +186,21 @@ def structured_retrieve( *, country_code: str, key: str, - at: str | NotGiven = NOT_GIVEN, - city: str | NotGiven = NOT_GIVEN, - county: str | NotGiven = NOT_GIVEN, - house_number: str | NotGiven = NOT_GIVEN, - in_: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - postal_code: str | NotGiven = NOT_GIVEN, - state: str | NotGiven = NOT_GIVEN, - street: str | NotGiven = NOT_GIVEN, + at: str | Omit = omit, + city: str | Omit = omit, + county: str | Omit = omit, + house_number: str | Omit = omit, + in_: str | Omit = omit, + limit: int | Omit = omit, + postal_code: str | Omit = omit, + state: str | Omit = omit, + street: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GeocodeStructuredRetrieveResponse: """ Structured Geocode @@ -316,16 +316,16 @@ async def retrieve( *, key: str, q: str, - at: str | NotGiven = NOT_GIVEN, - in_: str | NotGiven = NOT_GIVEN, - lang: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + at: str | Omit = omit, + in_: str | Omit = omit, + lang: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GeocodeRetrieveResponse: """ Geocode @@ -417,7 +417,7 @@ async def batch_create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GeocodeBatchCreateResponse: """ Batch Geocode @@ -452,21 +452,21 @@ async def structured_retrieve( *, country_code: str, key: str, - at: str | NotGiven = NOT_GIVEN, - city: str | NotGiven = NOT_GIVEN, - county: str | NotGiven = NOT_GIVEN, - house_number: str | NotGiven = NOT_GIVEN, - in_: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - postal_code: str | NotGiven = NOT_GIVEN, - state: str | NotGiven = NOT_GIVEN, - street: str | NotGiven = NOT_GIVEN, + at: str | Omit = omit, + city: str | Omit = omit, + county: str | Omit = omit, + house_number: str | Omit = omit, + in_: str | Omit = omit, + limit: int | Omit = omit, + postal_code: str | Omit = omit, + state: str | Omit = omit, + street: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GeocodeStructuredRetrieveResponse: """ Structured Geocode diff --git a/src/nextbillionai/resources/geofence/batch.py b/src/nextbillionai/resources/geofence/batch.py index 3c93e59..d54780a 100644 --- a/src/nextbillionai/resources/geofence/batch.py +++ b/src/nextbillionai/resources/geofence/batch.py @@ -6,7 +6,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr +from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -50,13 +50,13 @@ def create( self, *, key: str, - geofences: Iterable[GeofenceEntityCreateParam] | NotGiven = NOT_GIVEN, + geofences: Iterable[GeofenceEntityCreateParam] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> BatchCreateResponse: """ Batch Creation of Geofence @@ -99,7 +99,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> BatchListResponse: """ Batch Query of Geofence @@ -140,13 +140,13 @@ def delete( self, *, key: str, - ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, + ids: SequenceNotStr[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SimpleResp: """ Delete Batch Geofence @@ -204,13 +204,13 @@ async def create( self, *, key: str, - geofences: Iterable[GeofenceEntityCreateParam] | NotGiven = NOT_GIVEN, + geofences: Iterable[GeofenceEntityCreateParam] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> BatchCreateResponse: """ Batch Creation of Geofence @@ -253,7 +253,7 @@ async def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> BatchListResponse: """ Batch Query of Geofence @@ -294,13 +294,13 @@ async def delete( self, *, key: str, - ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, + ids: SequenceNotStr[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SimpleResp: """ Delete Batch Geofence diff --git a/src/nextbillionai/resources/geofence/console.py b/src/nextbillionai/resources/geofence/console.py index 9183f63..b685109 100644 --- a/src/nextbillionai/resources/geofence/console.py +++ b/src/nextbillionai/resources/geofence/console.py @@ -6,7 +6,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr +from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -48,19 +48,19 @@ def preview( self, *, type: Literal["circle", "polygon", "isochrone"], - circle: console_preview_params.Circle | NotGiven = NOT_GIVEN, - custom_id: str | NotGiven = NOT_GIVEN, - isochrone: console_preview_params.Isochrone | NotGiven = NOT_GIVEN, - meta_data: object | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - polygon: console_preview_params.Polygon | NotGiven = NOT_GIVEN, - tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, + circle: console_preview_params.Circle | Omit = omit, + custom_id: str | Omit = omit, + isochrone: console_preview_params.Isochrone | Omit = omit, + meta_data: object | Omit = omit, + name: str | Omit = omit, + polygon: console_preview_params.Polygon | Omit = omit, + tags: SequenceNotStr[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ConsolePreviewResponse: """ preview geofence geojson @@ -146,7 +146,7 @@ def search( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ConsoleSearchResponse: """ Console Geofence Search API @@ -199,19 +199,19 @@ async def preview( self, *, type: Literal["circle", "polygon", "isochrone"], - circle: console_preview_params.Circle | NotGiven = NOT_GIVEN, - custom_id: str | NotGiven = NOT_GIVEN, - isochrone: console_preview_params.Isochrone | NotGiven = NOT_GIVEN, - meta_data: object | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - polygon: console_preview_params.Polygon | NotGiven = NOT_GIVEN, - tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, + circle: console_preview_params.Circle | Omit = omit, + custom_id: str | Omit = omit, + isochrone: console_preview_params.Isochrone | Omit = omit, + meta_data: object | Omit = omit, + name: str | Omit = omit, + polygon: console_preview_params.Polygon | Omit = omit, + tags: SequenceNotStr[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ConsolePreviewResponse: """ preview geofence geojson @@ -297,7 +297,7 @@ async def search( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ConsoleSearchResponse: """ Console Geofence Search API diff --git a/src/nextbillionai/resources/geofence/geofence.py b/src/nextbillionai/resources/geofence/geofence.py index 68f6836..0ae6fe5 100644 --- a/src/nextbillionai/resources/geofence/geofence.py +++ b/src/nextbillionai/resources/geofence/geofence.py @@ -30,7 +30,7 @@ ConsoleResourceWithStreamingResponse, AsyncConsoleResourceWithStreamingResponse, ) -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr +from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -83,19 +83,19 @@ def create( *, key: str, type: Literal["circle", "polygon", "isochrone"], - circle: geofence_create_params.Circle | NotGiven = NOT_GIVEN, - custom_id: str | NotGiven = NOT_GIVEN, - isochrone: geofence_create_params.Isochrone | NotGiven = NOT_GIVEN, - meta_data: object | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - polygon: geofence_create_params.Polygon | NotGiven = NOT_GIVEN, - tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, + circle: geofence_create_params.Circle | Omit = omit, + custom_id: str | Omit = omit, + isochrone: geofence_create_params.Isochrone | Omit = omit, + meta_data: object | Omit = omit, + name: str | Omit = omit, + polygon: geofence_create_params.Polygon | Omit = omit, + tags: SequenceNotStr[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GeofenceCreateResponse: """ Create a geofence @@ -189,7 +189,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GeofenceRetrieveResponse: """ Get a Geofence @@ -225,19 +225,19 @@ def update( id: str, *, key: str, - circle: geofence_update_params.Circle | NotGiven = NOT_GIVEN, - isochrone: geofence_update_params.Isochrone | NotGiven = NOT_GIVEN, - meta_data: object | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - polygon: geofence_update_params.Polygon | NotGiven = NOT_GIVEN, - tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - type: Literal["circle", "polygon", "isochrone"] | NotGiven = NOT_GIVEN, + circle: geofence_update_params.Circle | Omit = omit, + isochrone: geofence_update_params.Isochrone | Omit = omit, + meta_data: object | Omit = omit, + name: str | Omit = omit, + polygon: geofence_update_params.Polygon | Omit = omit, + tags: SequenceNotStr[str] | Omit = omit, + type: Literal["circle", "polygon", "isochrone"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SimpleResp: """ Update a Geofence @@ -323,15 +323,15 @@ def list( self, *, key: str, - pn: int | NotGiven = NOT_GIVEN, - ps: int | NotGiven = NOT_GIVEN, - tags: str | NotGiven = NOT_GIVEN, + pn: int | Omit = omit, + ps: int | Omit = omit, + tags: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GeofenceListResponse: """ Get Geofence List @@ -392,7 +392,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SimpleResp: """ Delete a Geofence @@ -428,14 +428,14 @@ def contains( *, key: str, locations: str, - geofences: str | NotGiven = NOT_GIVEN, - verbose: str | NotGiven = NOT_GIVEN, + geofences: str | Omit = omit, + verbose: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GeofenceContainsResponse: """ Geofence Contains @@ -518,19 +518,19 @@ async def create( *, key: str, type: Literal["circle", "polygon", "isochrone"], - circle: geofence_create_params.Circle | NotGiven = NOT_GIVEN, - custom_id: str | NotGiven = NOT_GIVEN, - isochrone: geofence_create_params.Isochrone | NotGiven = NOT_GIVEN, - meta_data: object | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - polygon: geofence_create_params.Polygon | NotGiven = NOT_GIVEN, - tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, + circle: geofence_create_params.Circle | Omit = omit, + custom_id: str | Omit = omit, + isochrone: geofence_create_params.Isochrone | Omit = omit, + meta_data: object | Omit = omit, + name: str | Omit = omit, + polygon: geofence_create_params.Polygon | Omit = omit, + tags: SequenceNotStr[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GeofenceCreateResponse: """ Create a geofence @@ -624,7 +624,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GeofenceRetrieveResponse: """ Get a Geofence @@ -660,19 +660,19 @@ async def update( id: str, *, key: str, - circle: geofence_update_params.Circle | NotGiven = NOT_GIVEN, - isochrone: geofence_update_params.Isochrone | NotGiven = NOT_GIVEN, - meta_data: object | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - polygon: geofence_update_params.Polygon | NotGiven = NOT_GIVEN, - tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - type: Literal["circle", "polygon", "isochrone"] | NotGiven = NOT_GIVEN, + circle: geofence_update_params.Circle | Omit = omit, + isochrone: geofence_update_params.Isochrone | Omit = omit, + meta_data: object | Omit = omit, + name: str | Omit = omit, + polygon: geofence_update_params.Polygon | Omit = omit, + tags: SequenceNotStr[str] | Omit = omit, + type: Literal["circle", "polygon", "isochrone"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SimpleResp: """ Update a Geofence @@ -758,15 +758,15 @@ async def list( self, *, key: str, - pn: int | NotGiven = NOT_GIVEN, - ps: int | NotGiven = NOT_GIVEN, - tags: str | NotGiven = NOT_GIVEN, + pn: int | Omit = omit, + ps: int | Omit = omit, + tags: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GeofenceListResponse: """ Get Geofence List @@ -827,7 +827,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SimpleResp: """ Delete a Geofence @@ -863,14 +863,14 @@ async def contains( *, key: str, locations: str, - geofences: str | NotGiven = NOT_GIVEN, - verbose: str | NotGiven = NOT_GIVEN, + geofences: str | Omit = omit, + verbose: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GeofenceContainsResponse: """ Geofence Contains diff --git a/src/nextbillionai/resources/isochrone.py b/src/nextbillionai/resources/isochrone.py index c3e62d6..67d5351 100644 --- a/src/nextbillionai/resources/isochrone.py +++ b/src/nextbillionai/resources/isochrone.py @@ -7,7 +7,7 @@ import httpx from ..types import isochrone_compute_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -50,18 +50,18 @@ def compute( contours_minutes: int, coordinates: str, key: str, - contours_colors: str | NotGiven = NOT_GIVEN, - denoise: float | NotGiven = NOT_GIVEN, - departure_time: int | NotGiven = NOT_GIVEN, - generalize: float | NotGiven = NOT_GIVEN, - mode: Literal["car", "truck"] | NotGiven = NOT_GIVEN, - polygons: bool | NotGiven = NOT_GIVEN, + contours_colors: str | Omit = omit, + denoise: float | Omit = omit, + departure_time: int | Omit = omit, + generalize: float | Omit = omit, + mode: Literal["car", "truck"] | Omit = omit, + polygons: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> IsochroneComputeResponse: """ The NextBillion.ai Isochrone API computes areas that are reachable within a @@ -185,18 +185,18 @@ async def compute( contours_minutes: int, coordinates: str, key: str, - contours_colors: str | NotGiven = NOT_GIVEN, - denoise: float | NotGiven = NOT_GIVEN, - departure_time: int | NotGiven = NOT_GIVEN, - generalize: float | NotGiven = NOT_GIVEN, - mode: Literal["car", "truck"] | NotGiven = NOT_GIVEN, - polygons: bool | NotGiven = NOT_GIVEN, + contours_colors: str | Omit = omit, + denoise: float | Omit = omit, + departure_time: int | Omit = omit, + generalize: float | Omit = omit, + mode: Literal["car", "truck"] | Omit = omit, + polygons: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> IsochroneComputeResponse: """ The NextBillion.ai Isochrone API computes areas that are reachable within a diff --git a/src/nextbillionai/resources/lookup.py b/src/nextbillionai/resources/lookup.py index fe87519..e97c9b3 100644 --- a/src/nextbillionai/resources/lookup.py +++ b/src/nextbillionai/resources/lookup.py @@ -5,7 +5,7 @@ import httpx from ..types import lookup_by_id_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Query, Headers, NotGiven, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -51,7 +51,7 @@ def by_id( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> LookupByIDResponse: """ Lookup By ID @@ -120,7 +120,7 @@ async def by_id( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> LookupByIDResponse: """ Lookup By ID diff --git a/src/nextbillionai/resources/map.py b/src/nextbillionai/resources/map.py index 76d74b7..27f6049 100644 --- a/src/nextbillionai/resources/map.py +++ b/src/nextbillionai/resources/map.py @@ -4,7 +4,7 @@ import httpx -from .._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven +from .._types import Body, Query, Headers, NoneType, NotGiven, not_given from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -46,7 +46,7 @@ def create_segment( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """Road Segments""" extra_headers = {"Accept": "*/*", **(extra_headers or {})} @@ -87,7 +87,7 @@ async def create_segment( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """Road Segments""" extra_headers = {"Accept": "*/*", **(extra_headers or {})} diff --git a/src/nextbillionai/resources/mdm.py b/src/nextbillionai/resources/mdm.py index 507f789..3f720be 100644 --- a/src/nextbillionai/resources/mdm.py +++ b/src/nextbillionai/resources/mdm.py @@ -7,7 +7,7 @@ import httpx from ..types import mdm_create_distance_matrix_params, mdm_get_distance_matrix_status_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -50,29 +50,29 @@ def create_distance_matrix( key: str, option: Literal["flexible"], origins: str, - spliter: Literal["od_number_spliter", "straight_distance_spliter", "location_spliter"] | NotGiven = NOT_GIVEN, - area: Literal["singapore", "usa", "india"] | NotGiven = NOT_GIVEN, + spliter: Literal["od_number_spliter", "straight_distance_spliter", "location_spliter"] | Omit = omit, + area: Literal["singapore", "usa", "india"] | Omit = omit, avoid: Literal[ "toll", "ferry", "highway", "sharp_turn", "service_road", "bbox", "left_turn", "right_turn", "none" ] - | NotGiven = NOT_GIVEN, - cross_border: bool | NotGiven = NOT_GIVEN, - departure_time: int | NotGiven = NOT_GIVEN, - destinations: str | NotGiven = NOT_GIVEN, - destinations_approach: Literal["unrestricted", "curb"] | NotGiven = NOT_GIVEN, - hazmat_type: Literal["general", "circumstantial", "explosive", "harmful_to_water"] | NotGiven = NOT_GIVEN, - mode: Literal["car", "truck"] | NotGiven = NOT_GIVEN, - origins_approach: Literal["unrestricted", "curb"] | NotGiven = NOT_GIVEN, - route_type: Literal["fastest", "shortest"] | NotGiven = NOT_GIVEN, - truck_axle_load: float | NotGiven = NOT_GIVEN, - truck_size: str | NotGiven = NOT_GIVEN, - truck_weight: int | NotGiven = NOT_GIVEN, + | Omit = omit, + cross_border: bool | Omit = omit, + departure_time: int | Omit = omit, + destinations: str | Omit = omit, + destinations_approach: Literal["unrestricted", "curb"] | Omit = omit, + hazmat_type: Literal["general", "circumstantial", "explosive", "harmful_to_water"] | Omit = omit, + mode: Literal["car", "truck"] | Omit = omit, + origins_approach: Literal["unrestricted", "curb"] | Omit = omit, + route_type: Literal["fastest", "shortest"] | Omit = omit, + truck_axle_load: float | Omit = omit, + truck_size: str | Omit = omit, + truck_weight: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> MdmCreateDistanceMatrixResponse: """ Create a massive distance matrix task @@ -249,7 +249,7 @@ def get_distance_matrix_status( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> MdmGetDistanceMatrixStatusResponse: """ Get massive distance matrix task status @@ -314,29 +314,29 @@ async def create_distance_matrix( key: str, option: Literal["flexible"], origins: str, - spliter: Literal["od_number_spliter", "straight_distance_spliter", "location_spliter"] | NotGiven = NOT_GIVEN, - area: Literal["singapore", "usa", "india"] | NotGiven = NOT_GIVEN, + spliter: Literal["od_number_spliter", "straight_distance_spliter", "location_spliter"] | Omit = omit, + area: Literal["singapore", "usa", "india"] | Omit = omit, avoid: Literal[ "toll", "ferry", "highway", "sharp_turn", "service_road", "bbox", "left_turn", "right_turn", "none" ] - | NotGiven = NOT_GIVEN, - cross_border: bool | NotGiven = NOT_GIVEN, - departure_time: int | NotGiven = NOT_GIVEN, - destinations: str | NotGiven = NOT_GIVEN, - destinations_approach: Literal["unrestricted", "curb"] | NotGiven = NOT_GIVEN, - hazmat_type: Literal["general", "circumstantial", "explosive", "harmful_to_water"] | NotGiven = NOT_GIVEN, - mode: Literal["car", "truck"] | NotGiven = NOT_GIVEN, - origins_approach: Literal["unrestricted", "curb"] | NotGiven = NOT_GIVEN, - route_type: Literal["fastest", "shortest"] | NotGiven = NOT_GIVEN, - truck_axle_load: float | NotGiven = NOT_GIVEN, - truck_size: str | NotGiven = NOT_GIVEN, - truck_weight: int | NotGiven = NOT_GIVEN, + | Omit = omit, + cross_border: bool | Omit = omit, + departure_time: int | Omit = omit, + destinations: str | Omit = omit, + destinations_approach: Literal["unrestricted", "curb"] | Omit = omit, + hazmat_type: Literal["general", "circumstantial", "explosive", "harmful_to_water"] | Omit = omit, + mode: Literal["car", "truck"] | Omit = omit, + origins_approach: Literal["unrestricted", "curb"] | Omit = omit, + route_type: Literal["fastest", "shortest"] | Omit = omit, + truck_axle_load: float | Omit = omit, + truck_size: str | Omit = omit, + truck_weight: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> MdmCreateDistanceMatrixResponse: """ Create a massive distance matrix task @@ -513,7 +513,7 @@ async def get_distance_matrix_status( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> MdmGetDistanceMatrixStatusResponse: """ Get massive distance matrix task status diff --git a/src/nextbillionai/resources/multigeocode/multigeocode.py b/src/nextbillionai/resources/multigeocode/multigeocode.py index 56237f4..3d64b84 100644 --- a/src/nextbillionai/resources/multigeocode/multigeocode.py +++ b/src/nextbillionai/resources/multigeocode/multigeocode.py @@ -13,7 +13,7 @@ AsyncPlaceResourceWithStreamingResponse, ) from ...types import multigeocode_search_params -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -59,20 +59,20 @@ def search( key: str, at: multigeocode_search_params.At, query: str, - city: str | NotGiven = NOT_GIVEN, - country: str | NotGiven = NOT_GIVEN, - district: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - radius: str | NotGiven = NOT_GIVEN, - state: str | NotGiven = NOT_GIVEN, - street: str | NotGiven = NOT_GIVEN, - sub_district: str | NotGiven = NOT_GIVEN, + city: str | Omit = omit, + country: str | Omit = omit, + district: str | Omit = omit, + limit: int | Omit = omit, + radius: str | Omit = omit, + state: str | Omit = omit, + street: str | Omit = omit, + sub_district: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> MultigeocodeSearchResponse: """ The method enables searching for known places from multiple data sources @@ -180,20 +180,20 @@ async def search( key: str, at: multigeocode_search_params.At, query: str, - city: str | NotGiven = NOT_GIVEN, - country: str | NotGiven = NOT_GIVEN, - district: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - radius: str | NotGiven = NOT_GIVEN, - state: str | NotGiven = NOT_GIVEN, - street: str | NotGiven = NOT_GIVEN, - sub_district: str | NotGiven = NOT_GIVEN, + city: str | Omit = omit, + country: str | Omit = omit, + district: str | Omit = omit, + limit: int | Omit = omit, + radius: str | Omit = omit, + state: str | Omit = omit, + street: str | Omit = omit, + sub_district: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> MultigeocodeSearchResponse: """ The method enables searching for known places from multiple data sources diff --git a/src/nextbillionai/resources/multigeocode/place.py b/src/nextbillionai/resources/multigeocode/place.py index a57adc9..e8ccf4c 100644 --- a/src/nextbillionai/resources/multigeocode/place.py +++ b/src/nextbillionai/resources/multigeocode/place.py @@ -6,7 +6,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -52,15 +52,15 @@ def create( *, key: str, place: Iterable[place_create_params.Place], - data_source: place_create_params.DataSource | NotGiven = NOT_GIVEN, - force: bool | NotGiven = NOT_GIVEN, - score: int | NotGiven = NOT_GIVEN, + data_source: place_create_params.DataSource | Omit = omit, + force: bool | Omit = omit, + score: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> PlaceCreateResponse: """ The "Add Place" method allows users to create custom places @@ -134,7 +134,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> PlaceRetrieveResponse: """ Use this method to get the details of previously created custom places using its @@ -171,15 +171,15 @@ def update( doc_id: str, *, key: str, - data_source: place_update_params.DataSource | NotGiven = NOT_GIVEN, - place: Iterable[PlaceItemParam] | NotGiven = NOT_GIVEN, - score: int | NotGiven = NOT_GIVEN, + data_source: place_update_params.DataSource | Omit = omit, + place: Iterable[PlaceItemParam] | Omit = omit, + score: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> PlaceUpdateResponse: """ The "Update Place" method allows businesses to update the attributes of an @@ -254,7 +254,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> PlaceDeleteResponse: """ The "Delete Place" method enables businesses to delete a previously created @@ -317,15 +317,15 @@ async def create( *, key: str, place: Iterable[place_create_params.Place], - data_source: place_create_params.DataSource | NotGiven = NOT_GIVEN, - force: bool | NotGiven = NOT_GIVEN, - score: int | NotGiven = NOT_GIVEN, + data_source: place_create_params.DataSource | Omit = omit, + force: bool | Omit = omit, + score: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> PlaceCreateResponse: """ The "Add Place" method allows users to create custom places @@ -399,7 +399,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> PlaceRetrieveResponse: """ Use this method to get the details of previously created custom places using its @@ -436,15 +436,15 @@ async def update( doc_id: str, *, key: str, - data_source: place_update_params.DataSource | NotGiven = NOT_GIVEN, - place: Iterable[PlaceItemParam] | NotGiven = NOT_GIVEN, - score: int | NotGiven = NOT_GIVEN, + data_source: place_update_params.DataSource | Omit = omit, + place: Iterable[PlaceItemParam] | Omit = omit, + score: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> PlaceUpdateResponse: """ The "Update Place" method allows businesses to update the attributes of an @@ -519,7 +519,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> PlaceDeleteResponse: """ The "Delete Place" method enables businesses to delete a previously created diff --git a/src/nextbillionai/resources/navigation.py b/src/nextbillionai/resources/navigation.py index cb88d51..b4435af 100644 --- a/src/nextbillionai/resources/navigation.py +++ b/src/nextbillionai/resources/navigation.py @@ -7,7 +7,7 @@ import httpx from ..types import navigation_retrieve_route_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -47,26 +47,26 @@ def retrieve_route( self, *, key: str, - altcount: int | NotGiven = NOT_GIVEN, - alternatives: bool | NotGiven = NOT_GIVEN, - approaches: Literal["unrestricted", "curb"] | NotGiven = NOT_GIVEN, - avoid: Literal["toll", "ferry", "highway", "none"] | NotGiven = NOT_GIVEN, - bearings: str | NotGiven = NOT_GIVEN, - destination: str | NotGiven = NOT_GIVEN, - geometry: Literal["polyline", "polyline6", "geojson"] | NotGiven = NOT_GIVEN, - lang: str | NotGiven = NOT_GIVEN, - mode: Literal["car", "truck"] | NotGiven = NOT_GIVEN, - origin: str | NotGiven = NOT_GIVEN, - original_shape: str | NotGiven = NOT_GIVEN, - original_shape_type: Literal["polyline", "polyline6"] | NotGiven = NOT_GIVEN, - overview: Literal["full", "simplified", "false"] | NotGiven = NOT_GIVEN, - waypoints: str | NotGiven = NOT_GIVEN, + altcount: int | Omit = omit, + alternatives: bool | Omit = omit, + approaches: Literal["unrestricted", "curb"] | Omit = omit, + avoid: Literal["toll", "ferry", "highway", "none"] | Omit = omit, + bearings: str | Omit = omit, + destination: str | Omit = omit, + geometry: Literal["polyline", "polyline6", "geojson"] | Omit = omit, + lang: str | Omit = omit, + mode: Literal["car", "truck"] | Omit = omit, + origin: str | Omit = omit, + original_shape: str | Omit = omit, + original_shape_type: Literal["polyline", "polyline6"] | Omit = omit, + overview: Literal["full", "simplified", "false"] | Omit = omit, + waypoints: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> NavigationRetrieveRouteResponse: """ Nextbillion.ai’s Navigation API is a service that computes a route between 2 @@ -246,26 +246,26 @@ async def retrieve_route( self, *, key: str, - altcount: int | NotGiven = NOT_GIVEN, - alternatives: bool | NotGiven = NOT_GIVEN, - approaches: Literal["unrestricted", "curb"] | NotGiven = NOT_GIVEN, - avoid: Literal["toll", "ferry", "highway", "none"] | NotGiven = NOT_GIVEN, - bearings: str | NotGiven = NOT_GIVEN, - destination: str | NotGiven = NOT_GIVEN, - geometry: Literal["polyline", "polyline6", "geojson"] | NotGiven = NOT_GIVEN, - lang: str | NotGiven = NOT_GIVEN, - mode: Literal["car", "truck"] | NotGiven = NOT_GIVEN, - origin: str | NotGiven = NOT_GIVEN, - original_shape: str | NotGiven = NOT_GIVEN, - original_shape_type: Literal["polyline", "polyline6"] | NotGiven = NOT_GIVEN, - overview: Literal["full", "simplified", "false"] | NotGiven = NOT_GIVEN, - waypoints: str | NotGiven = NOT_GIVEN, + altcount: int | Omit = omit, + alternatives: bool | Omit = omit, + approaches: Literal["unrestricted", "curb"] | Omit = omit, + avoid: Literal["toll", "ferry", "highway", "none"] | Omit = omit, + bearings: str | Omit = omit, + destination: str | Omit = omit, + geometry: Literal["polyline", "polyline6", "geojson"] | Omit = omit, + lang: str | Omit = omit, + mode: Literal["car", "truck"] | Omit = omit, + origin: str | Omit = omit, + original_shape: str | Omit = omit, + original_shape_type: Literal["polyline", "polyline6"] | Omit = omit, + overview: Literal["full", "simplified", "false"] | Omit = omit, + waypoints: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> NavigationRetrieveRouteResponse: """ Nextbillion.ai’s Navigation API is a service that computes a route between 2 diff --git a/src/nextbillionai/resources/optimization/driver_assignment.py b/src/nextbillionai/resources/optimization/driver_assignment.py index 468e79d..741559f 100644 --- a/src/nextbillionai/resources/optimization/driver_assignment.py +++ b/src/nextbillionai/resources/optimization/driver_assignment.py @@ -6,7 +6,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -51,13 +51,13 @@ def assign( filter: driver_assignment_assign_params.Filter, orders: Iterable[driver_assignment_assign_params.Order], vehicles: Iterable[VehicleParam], - options: driver_assignment_assign_params.Options | NotGiven = NOT_GIVEN, + options: driver_assignment_assign_params.Options | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DriverAssignmentAssignResponse: """ Assigns available drivers (vehicles) to open orders based on specified criteria @@ -137,13 +137,13 @@ async def assign( filter: driver_assignment_assign_params.Filter, orders: Iterable[driver_assignment_assign_params.Order], vehicles: Iterable[VehicleParam], - options: driver_assignment_assign_params.Options | NotGiven = NOT_GIVEN, + options: driver_assignment_assign_params.Options | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DriverAssignmentAssignResponse: """ Assigns available drivers (vehicles) to open orders based on specified criteria diff --git a/src/nextbillionai/resources/optimization/optimization.py b/src/nextbillionai/resources/optimization/optimization.py index 62cdd37..6ffb6ac 100644 --- a/src/nextbillionai/resources/optimization/optimization.py +++ b/src/nextbillionai/resources/optimization/optimization.py @@ -15,7 +15,7 @@ AsyncV2ResourceWithStreamingResponse, ) from ...types import optimization_compute_params, optimization_re_optimize_params -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr +from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -73,19 +73,19 @@ def compute( *, coordinates: str, key: str, - approaches: Literal["unrestricted", "curb"] | NotGiven = NOT_GIVEN, - destination: Literal["any", "last"] | NotGiven = NOT_GIVEN, - geometries: Literal["polyline", "polyline6", "geojson"] | NotGiven = NOT_GIVEN, - mode: Literal["car", "truck"] | NotGiven = NOT_GIVEN, - roundtrip: bool | NotGiven = NOT_GIVEN, - source: Literal["any", "first"] | NotGiven = NOT_GIVEN, - with_geometry: bool | NotGiven = NOT_GIVEN, + approaches: Literal["unrestricted", "curb"] | Omit = omit, + destination: Literal["any", "last"] | Omit = omit, + geometries: Literal["polyline", "polyline6", "geojson"] | Omit = omit, + mode: Literal["car", "truck"] | Omit = omit, + roundtrip: bool | Omit = omit, + source: Literal["any", "first"] | Omit = omit, + with_geometry: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> OptimizationComputeResponse: """ Nextbillion.ai Optimization API computes and returns an optimized route between @@ -192,16 +192,16 @@ def re_optimize( *, key: str, existing_request_id: str, - job_changes: optimization_re_optimize_params.JobChanges | NotGiven = NOT_GIVEN, - locations: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - shipment_changes: optimization_re_optimize_params.ShipmentChanges | NotGiven = NOT_GIVEN, - vehicle_changes: optimization_re_optimize_params.VehicleChanges | NotGiven = NOT_GIVEN, + job_changes: optimization_re_optimize_params.JobChanges | Omit = omit, + locations: SequenceNotStr[str] | Omit = omit, + shipment_changes: optimization_re_optimize_params.ShipmentChanges | Omit = omit, + vehicle_changes: optimization_re_optimize_params.VehicleChanges | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> PostResponse: """ Re-optimization @@ -312,19 +312,19 @@ async def compute( *, coordinates: str, key: str, - approaches: Literal["unrestricted", "curb"] | NotGiven = NOT_GIVEN, - destination: Literal["any", "last"] | NotGiven = NOT_GIVEN, - geometries: Literal["polyline", "polyline6", "geojson"] | NotGiven = NOT_GIVEN, - mode: Literal["car", "truck"] | NotGiven = NOT_GIVEN, - roundtrip: bool | NotGiven = NOT_GIVEN, - source: Literal["any", "first"] | NotGiven = NOT_GIVEN, - with_geometry: bool | NotGiven = NOT_GIVEN, + approaches: Literal["unrestricted", "curb"] | Omit = omit, + destination: Literal["any", "last"] | Omit = omit, + geometries: Literal["polyline", "polyline6", "geojson"] | Omit = omit, + mode: Literal["car", "truck"] | Omit = omit, + roundtrip: bool | Omit = omit, + source: Literal["any", "first"] | Omit = omit, + with_geometry: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> OptimizationComputeResponse: """ Nextbillion.ai Optimization API computes and returns an optimized route between @@ -431,16 +431,16 @@ async def re_optimize( *, key: str, existing_request_id: str, - job_changes: optimization_re_optimize_params.JobChanges | NotGiven = NOT_GIVEN, - locations: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - shipment_changes: optimization_re_optimize_params.ShipmentChanges | NotGiven = NOT_GIVEN, - vehicle_changes: optimization_re_optimize_params.VehicleChanges | NotGiven = NOT_GIVEN, + job_changes: optimization_re_optimize_params.JobChanges | Omit = omit, + locations: SequenceNotStr[str] | Omit = omit, + shipment_changes: optimization_re_optimize_params.ShipmentChanges | Omit = omit, + vehicle_changes: optimization_re_optimize_params.VehicleChanges | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> PostResponse: """ Re-optimization diff --git a/src/nextbillionai/resources/optimization/v2.py b/src/nextbillionai/resources/optimization/v2.py index 335ada0..e76c676 100644 --- a/src/nextbillionai/resources/optimization/v2.py +++ b/src/nextbillionai/resources/optimization/v2.py @@ -6,7 +6,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -57,7 +57,7 @@ def retrieve_result( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> V2RetrieveResultResponse: """ Flexible GET @@ -101,25 +101,25 @@ def submit( key: str, locations: v2_submit_params.Locations, vehicles: Iterable[VehicleParam], - cost_matrix: Iterable[Iterable[int]] | NotGiven = NOT_GIVEN, - depots: Iterable[v2_submit_params.Depot] | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - distance_matrix: Iterable[Iterable[int]] | NotGiven = NOT_GIVEN, - duration_matrix: Iterable[Iterable[int]] | NotGiven = NOT_GIVEN, - existing_solution_id: str | NotGiven = NOT_GIVEN, - jobs: Iterable[JobParam] | NotGiven = NOT_GIVEN, - options: v2_submit_params.Options | NotGiven = NOT_GIVEN, - relations: Iterable[v2_submit_params.Relation] | NotGiven = NOT_GIVEN, - shipments: Iterable[ShipmentParam] | NotGiven = NOT_GIVEN, - solution: Iterable[v2_submit_params.Solution] | NotGiven = NOT_GIVEN, - unassigned: v2_submit_params.Unassigned | NotGiven = NOT_GIVEN, - zones: Iterable[v2_submit_params.Zone] | NotGiven = NOT_GIVEN, + cost_matrix: Iterable[Iterable[int]] | Omit = omit, + depots: Iterable[v2_submit_params.Depot] | Omit = omit, + description: str | Omit = omit, + distance_matrix: Iterable[Iterable[int]] | Omit = omit, + duration_matrix: Iterable[Iterable[int]] | Omit = omit, + existing_solution_id: str | Omit = omit, + jobs: Iterable[JobParam] | Omit = omit, + options: v2_submit_params.Options | Omit = omit, + relations: Iterable[v2_submit_params.Relation] | Omit = omit, + shipments: Iterable[ShipmentParam] | Omit = omit, + solution: Iterable[v2_submit_params.Solution] | Omit = omit, + unassigned: v2_submit_params.Unassigned | Omit = omit, + zones: Iterable[v2_submit_params.Zone] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> PostResponse: """ Flexible POST @@ -336,7 +336,7 @@ async def retrieve_result( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> V2RetrieveResultResponse: """ Flexible GET @@ -380,25 +380,25 @@ async def submit( key: str, locations: v2_submit_params.Locations, vehicles: Iterable[VehicleParam], - cost_matrix: Iterable[Iterable[int]] | NotGiven = NOT_GIVEN, - depots: Iterable[v2_submit_params.Depot] | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - distance_matrix: Iterable[Iterable[int]] | NotGiven = NOT_GIVEN, - duration_matrix: Iterable[Iterable[int]] | NotGiven = NOT_GIVEN, - existing_solution_id: str | NotGiven = NOT_GIVEN, - jobs: Iterable[JobParam] | NotGiven = NOT_GIVEN, - options: v2_submit_params.Options | NotGiven = NOT_GIVEN, - relations: Iterable[v2_submit_params.Relation] | NotGiven = NOT_GIVEN, - shipments: Iterable[ShipmentParam] | NotGiven = NOT_GIVEN, - solution: Iterable[v2_submit_params.Solution] | NotGiven = NOT_GIVEN, - unassigned: v2_submit_params.Unassigned | NotGiven = NOT_GIVEN, - zones: Iterable[v2_submit_params.Zone] | NotGiven = NOT_GIVEN, + cost_matrix: Iterable[Iterable[int]] | Omit = omit, + depots: Iterable[v2_submit_params.Depot] | Omit = omit, + description: str | Omit = omit, + distance_matrix: Iterable[Iterable[int]] | Omit = omit, + duration_matrix: Iterable[Iterable[int]] | Omit = omit, + existing_solution_id: str | Omit = omit, + jobs: Iterable[JobParam] | Omit = omit, + options: v2_submit_params.Options | Omit = omit, + relations: Iterable[v2_submit_params.Relation] | Omit = omit, + shipments: Iterable[ShipmentParam] | Omit = omit, + solution: Iterable[v2_submit_params.Solution] | Omit = omit, + unassigned: v2_submit_params.Unassigned | Omit = omit, + zones: Iterable[v2_submit_params.Zone] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> PostResponse: """ Flexible POST diff --git a/src/nextbillionai/resources/postalcode.py b/src/nextbillionai/resources/postalcode.py index 61d2a2a..8838d83 100644 --- a/src/nextbillionai/resources/postalcode.py +++ b/src/nextbillionai/resources/postalcode.py @@ -7,7 +7,7 @@ import httpx from ..types import postalcode_retrieve_coordinates_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -47,16 +47,16 @@ def retrieve_coordinates( self, *, key: str, - at: postalcode_retrieve_coordinates_params.At | NotGiven = NOT_GIVEN, - country: str | NotGiven = NOT_GIVEN, - format: Literal["geojson"] | NotGiven = NOT_GIVEN, - postalcode: str | NotGiven = NOT_GIVEN, + at: postalcode_retrieve_coordinates_params.At | Omit = omit, + country: str | Omit = omit, + format: Literal["geojson"] | Omit = omit, + postalcode: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> PostalcodeRetrieveCoordinatesResponse: """ Retrieve coordinates by postal code @@ -142,16 +142,16 @@ async def retrieve_coordinates( self, *, key: str, - at: postalcode_retrieve_coordinates_params.At | NotGiven = NOT_GIVEN, - country: str | NotGiven = NOT_GIVEN, - format: Literal["geojson"] | NotGiven = NOT_GIVEN, - postalcode: str | NotGiven = NOT_GIVEN, + at: postalcode_retrieve_coordinates_params.At | Omit = omit, + country: str | Omit = omit, + format: Literal["geojson"] | Omit = omit, + postalcode: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> PostalcodeRetrieveCoordinatesResponse: """ Retrieve coordinates by postal code diff --git a/src/nextbillionai/resources/restrictions.py b/src/nextbillionai/resources/restrictions.py index e8c15a4..74afb3b 100644 --- a/src/nextbillionai/resources/restrictions.py +++ b/src/nextbillionai/resources/restrictions.py @@ -16,7 +16,7 @@ restriction_set_state_params, restriction_list_by_bbox_params, ) -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -62,29 +62,29 @@ def create( key: str, area: str, name: str, - latlon: bool | NotGiven = NOT_GIVEN, - comment: str | NotGiven = NOT_GIVEN, - direction: Literal["forward", "backward", "both"] | NotGiven = NOT_GIVEN, - end_time: float | NotGiven = NOT_GIVEN, - geofence: Iterable[Iterable[float]] | NotGiven = NOT_GIVEN, - height: int | NotGiven = NOT_GIVEN, - length: int | NotGiven = NOT_GIVEN, - mode: List[Literal["0w", "2w", "3w", "4w", "6w"]] | NotGiven = NOT_GIVEN, - repeat_on: str | NotGiven = NOT_GIVEN, - segments: Iterable[restriction_create_params.Segment] | NotGiven = NOT_GIVEN, - speed: float | NotGiven = NOT_GIVEN, - speed_limit: float | NotGiven = NOT_GIVEN, - start_time: float | NotGiven = NOT_GIVEN, - tracks: Iterable[Iterable[float]] | NotGiven = NOT_GIVEN, - turns: Iterable[restriction_create_params.Turn] | NotGiven = NOT_GIVEN, - weight: int | NotGiven = NOT_GIVEN, - width: int | NotGiven = NOT_GIVEN, + latlon: bool | Omit = omit, + comment: str | Omit = omit, + direction: Literal["forward", "backward", "both"] | Omit = omit, + end_time: float | Omit = omit, + geofence: Iterable[Iterable[float]] | Omit = omit, + height: int | Omit = omit, + length: int | Omit = omit, + mode: List[Literal["0w", "2w", "3w", "4w", "6w"]] | Omit = omit, + repeat_on: str | Omit = omit, + segments: Iterable[restriction_create_params.Segment] | Omit = omit, + speed: float | Omit = omit, + speed_limit: float | Omit = omit, + start_time: float | Omit = omit, + tracks: Iterable[Iterable[float]] | Omit = omit, + turns: Iterable[restriction_create_params.Turn] | Omit = omit, + weight: int | Omit = omit, + width: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RichGroupResponse: """ Create a new restriction @@ -244,13 +244,13 @@ def retrieve( id: int, *, key: str, - transform: bool | NotGiven = NOT_GIVEN, + transform: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RichGroupResponse: """ Get a restriction by id @@ -294,29 +294,29 @@ def update( key: str, area: str, name: str, - latlon: bool | NotGiven = NOT_GIVEN, - comment: str | NotGiven = NOT_GIVEN, - direction: Literal["forward", "backward", "both"] | NotGiven = NOT_GIVEN, - end_time: float | NotGiven = NOT_GIVEN, - geofence: Iterable[Iterable[float]] | NotGiven = NOT_GIVEN, - height: int | NotGiven = NOT_GIVEN, - length: int | NotGiven = NOT_GIVEN, - mode: List[Literal["0w", "2w", "3w", "4w", "6w"]] | NotGiven = NOT_GIVEN, - repeat_on: str | NotGiven = NOT_GIVEN, - segments: Iterable[restriction_update_params.Segment] | NotGiven = NOT_GIVEN, - speed: float | NotGiven = NOT_GIVEN, - speed_limit: float | NotGiven = NOT_GIVEN, - start_time: float | NotGiven = NOT_GIVEN, - tracks: Iterable[Iterable[float]] | NotGiven = NOT_GIVEN, - turns: Iterable[restriction_update_params.Turn] | NotGiven = NOT_GIVEN, - weight: int | NotGiven = NOT_GIVEN, - width: int | NotGiven = NOT_GIVEN, + latlon: bool | Omit = omit, + comment: str | Omit = omit, + direction: Literal["forward", "backward", "both"] | Omit = omit, + end_time: float | Omit = omit, + geofence: Iterable[Iterable[float]] | Omit = omit, + height: int | Omit = omit, + length: int | Omit = omit, + mode: List[Literal["0w", "2w", "3w", "4w", "6w"]] | Omit = omit, + repeat_on: str | Omit = omit, + segments: Iterable[restriction_update_params.Segment] | Omit = omit, + speed: float | Omit = omit, + speed_limit: float | Omit = omit, + start_time: float | Omit = omit, + tracks: Iterable[Iterable[float]] | Omit = omit, + turns: Iterable[restriction_update_params.Turn] | Omit = omit, + weight: int | Omit = omit, + width: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RichGroupResponse: """ Update a restriction @@ -476,20 +476,19 @@ def list( key: str, limit: int, offset: int, - mode: Literal["0w", "2w", "3w", "4w", "6w"] | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - restriction_type: Literal["turn", "parking", "fixedspeed", "maxspeed", "closure", "truck"] - | NotGiven = NOT_GIVEN, - source: Literal["rrt", "pbf"] | NotGiven = NOT_GIVEN, - state: Literal["enabled", "disabled", "deleted"] | NotGiven = NOT_GIVEN, - status: Literal["active", "inactive"] | NotGiven = NOT_GIVEN, - transform: bool | NotGiven = NOT_GIVEN, + mode: Literal["0w", "2w", "3w", "4w", "6w"] | Omit = omit, + name: str | Omit = omit, + restriction_type: Literal["turn", "parking", "fixedspeed", "maxspeed", "closure", "truck"] | Omit = omit, + source: Literal["rrt", "pbf"] | Omit = omit, + state: Literal["enabled", "disabled", "deleted"] | Omit = omit, + status: Literal["active", "inactive"] | Omit = omit, + transform: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RestrictionListResponse: """Get the paginated list of restrictions @@ -583,7 +582,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RestrictionDeleteResponse: """ Delete a restriction by ID @@ -620,19 +619,18 @@ def list_by_bbox( max_lon: float, min_lat: float, min_lon: float, - mode: List[Literal["0w", "2w", "3w", "4w", "6w"]] | NotGiven = NOT_GIVEN, - restriction_type: Literal["turn", "parking", "fixedspeed", "maxspeed", "closure", "truck"] - | NotGiven = NOT_GIVEN, - source: Literal["rrt", "pbf"] | NotGiven = NOT_GIVEN, - state: Literal["enabled", "disabled", "deleted"] | NotGiven = NOT_GIVEN, - status: Literal["active", "inactive"] | NotGiven = NOT_GIVEN, - transform: bool | NotGiven = NOT_GIVEN, + mode: List[Literal["0w", "2w", "3w", "4w", "6w"]] | Omit = omit, + restriction_type: Literal["turn", "parking", "fixedspeed", "maxspeed", "closure", "truck"] | Omit = omit, + source: Literal["rrt", "pbf"] | Omit = omit, + state: Literal["enabled", "disabled", "deleted"] | Omit = omit, + status: Literal["active", "inactive"] | Omit = omit, + transform: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RestrictionListByBboxResponse: """ Get restrictions by bbox @@ -720,7 +718,7 @@ def set_state( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RichGroupResponse: """ Set the state of a restriction by ID @@ -782,29 +780,29 @@ async def create( key: str, area: str, name: str, - latlon: bool | NotGiven = NOT_GIVEN, - comment: str | NotGiven = NOT_GIVEN, - direction: Literal["forward", "backward", "both"] | NotGiven = NOT_GIVEN, - end_time: float | NotGiven = NOT_GIVEN, - geofence: Iterable[Iterable[float]] | NotGiven = NOT_GIVEN, - height: int | NotGiven = NOT_GIVEN, - length: int | NotGiven = NOT_GIVEN, - mode: List[Literal["0w", "2w", "3w", "4w", "6w"]] | NotGiven = NOT_GIVEN, - repeat_on: str | NotGiven = NOT_GIVEN, - segments: Iterable[restriction_create_params.Segment] | NotGiven = NOT_GIVEN, - speed: float | NotGiven = NOT_GIVEN, - speed_limit: float | NotGiven = NOT_GIVEN, - start_time: float | NotGiven = NOT_GIVEN, - tracks: Iterable[Iterable[float]] | NotGiven = NOT_GIVEN, - turns: Iterable[restriction_create_params.Turn] | NotGiven = NOT_GIVEN, - weight: int | NotGiven = NOT_GIVEN, - width: int | NotGiven = NOT_GIVEN, + latlon: bool | Omit = omit, + comment: str | Omit = omit, + direction: Literal["forward", "backward", "both"] | Omit = omit, + end_time: float | Omit = omit, + geofence: Iterable[Iterable[float]] | Omit = omit, + height: int | Omit = omit, + length: int | Omit = omit, + mode: List[Literal["0w", "2w", "3w", "4w", "6w"]] | Omit = omit, + repeat_on: str | Omit = omit, + segments: Iterable[restriction_create_params.Segment] | Omit = omit, + speed: float | Omit = omit, + speed_limit: float | Omit = omit, + start_time: float | Omit = omit, + tracks: Iterable[Iterable[float]] | Omit = omit, + turns: Iterable[restriction_create_params.Turn] | Omit = omit, + weight: int | Omit = omit, + width: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RichGroupResponse: """ Create a new restriction @@ -964,13 +962,13 @@ async def retrieve( id: int, *, key: str, - transform: bool | NotGiven = NOT_GIVEN, + transform: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RichGroupResponse: """ Get a restriction by id @@ -1014,29 +1012,29 @@ async def update( key: str, area: str, name: str, - latlon: bool | NotGiven = NOT_GIVEN, - comment: str | NotGiven = NOT_GIVEN, - direction: Literal["forward", "backward", "both"] | NotGiven = NOT_GIVEN, - end_time: float | NotGiven = NOT_GIVEN, - geofence: Iterable[Iterable[float]] | NotGiven = NOT_GIVEN, - height: int | NotGiven = NOT_GIVEN, - length: int | NotGiven = NOT_GIVEN, - mode: List[Literal["0w", "2w", "3w", "4w", "6w"]] | NotGiven = NOT_GIVEN, - repeat_on: str | NotGiven = NOT_GIVEN, - segments: Iterable[restriction_update_params.Segment] | NotGiven = NOT_GIVEN, - speed: float | NotGiven = NOT_GIVEN, - speed_limit: float | NotGiven = NOT_GIVEN, - start_time: float | NotGiven = NOT_GIVEN, - tracks: Iterable[Iterable[float]] | NotGiven = NOT_GIVEN, - turns: Iterable[restriction_update_params.Turn] | NotGiven = NOT_GIVEN, - weight: int | NotGiven = NOT_GIVEN, - width: int | NotGiven = NOT_GIVEN, + latlon: bool | Omit = omit, + comment: str | Omit = omit, + direction: Literal["forward", "backward", "both"] | Omit = omit, + end_time: float | Omit = omit, + geofence: Iterable[Iterable[float]] | Omit = omit, + height: int | Omit = omit, + length: int | Omit = omit, + mode: List[Literal["0w", "2w", "3w", "4w", "6w"]] | Omit = omit, + repeat_on: str | Omit = omit, + segments: Iterable[restriction_update_params.Segment] | Omit = omit, + speed: float | Omit = omit, + speed_limit: float | Omit = omit, + start_time: float | Omit = omit, + tracks: Iterable[Iterable[float]] | Omit = omit, + turns: Iterable[restriction_update_params.Turn] | Omit = omit, + weight: int | Omit = omit, + width: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RichGroupResponse: """ Update a restriction @@ -1196,20 +1194,19 @@ async def list( key: str, limit: int, offset: int, - mode: Literal["0w", "2w", "3w", "4w", "6w"] | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - restriction_type: Literal["turn", "parking", "fixedspeed", "maxspeed", "closure", "truck"] - | NotGiven = NOT_GIVEN, - source: Literal["rrt", "pbf"] | NotGiven = NOT_GIVEN, - state: Literal["enabled", "disabled", "deleted"] | NotGiven = NOT_GIVEN, - status: Literal["active", "inactive"] | NotGiven = NOT_GIVEN, - transform: bool | NotGiven = NOT_GIVEN, + mode: Literal["0w", "2w", "3w", "4w", "6w"] | Omit = omit, + name: str | Omit = omit, + restriction_type: Literal["turn", "parking", "fixedspeed", "maxspeed", "closure", "truck"] | Omit = omit, + source: Literal["rrt", "pbf"] | Omit = omit, + state: Literal["enabled", "disabled", "deleted"] | Omit = omit, + status: Literal["active", "inactive"] | Omit = omit, + transform: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RestrictionListResponse: """Get the paginated list of restrictions @@ -1303,7 +1300,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RestrictionDeleteResponse: """ Delete a restriction by ID @@ -1340,19 +1337,18 @@ async def list_by_bbox( max_lon: float, min_lat: float, min_lon: float, - mode: List[Literal["0w", "2w", "3w", "4w", "6w"]] | NotGiven = NOT_GIVEN, - restriction_type: Literal["turn", "parking", "fixedspeed", "maxspeed", "closure", "truck"] - | NotGiven = NOT_GIVEN, - source: Literal["rrt", "pbf"] | NotGiven = NOT_GIVEN, - state: Literal["enabled", "disabled", "deleted"] | NotGiven = NOT_GIVEN, - status: Literal["active", "inactive"] | NotGiven = NOT_GIVEN, - transform: bool | NotGiven = NOT_GIVEN, + mode: List[Literal["0w", "2w", "3w", "4w", "6w"]] | Omit = omit, + restriction_type: Literal["turn", "parking", "fixedspeed", "maxspeed", "closure", "truck"] | Omit = omit, + source: Literal["rrt", "pbf"] | Omit = omit, + state: Literal["enabled", "disabled", "deleted"] | Omit = omit, + status: Literal["active", "inactive"] | Omit = omit, + transform: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RestrictionListByBboxResponse: """ Get restrictions by bbox @@ -1440,7 +1436,7 @@ async def set_state( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RichGroupResponse: """ Set the state of a restriction by ID diff --git a/src/nextbillionai/resources/restrictions_items.py b/src/nextbillionai/resources/restrictions_items.py index 2d6e643..a41562c 100644 --- a/src/nextbillionai/resources/restrictions_items.py +++ b/src/nextbillionai/resources/restrictions_items.py @@ -7,7 +7,7 @@ import httpx from ..types import restrictions_item_list_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -50,19 +50,18 @@ def list( max_lon: float, min_lat: float, min_lon: float, - group_id: float | NotGiven = NOT_GIVEN, - mode: Literal["0w", "1w", "2w", "3w", "4w", "6w"] | NotGiven = NOT_GIVEN, - restriction_type: Literal["turn", "parking", "fixedspeed", "maxspeed", "closure", "truck"] - | NotGiven = NOT_GIVEN, - source: str | NotGiven = NOT_GIVEN, - state: Literal["enabled", "disabled", "deleted"] | NotGiven = NOT_GIVEN, - status: Literal["active", "inactive"] | NotGiven = NOT_GIVEN, + group_id: float | Omit = omit, + mode: Literal["0w", "1w", "2w", "3w", "4w", "6w"] | Omit = omit, + restriction_type: Literal["turn", "parking", "fixedspeed", "maxspeed", "closure", "truck"] | Omit = omit, + source: str | Omit = omit, + state: Literal["enabled", "disabled", "deleted"] | Omit = omit, + status: Literal["active", "inactive"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RestrictionsItemListResponse: """ Get restriction items by bbox @@ -130,19 +129,18 @@ async def list( max_lon: float, min_lat: float, min_lon: float, - group_id: float | NotGiven = NOT_GIVEN, - mode: Literal["0w", "1w", "2w", "3w", "4w", "6w"] | NotGiven = NOT_GIVEN, - restriction_type: Literal["turn", "parking", "fixedspeed", "maxspeed", "closure", "truck"] - | NotGiven = NOT_GIVEN, - source: str | NotGiven = NOT_GIVEN, - state: Literal["enabled", "disabled", "deleted"] | NotGiven = NOT_GIVEN, - status: Literal["active", "inactive"] | NotGiven = NOT_GIVEN, + group_id: float | Omit = omit, + mode: Literal["0w", "1w", "2w", "3w", "4w", "6w"] | Omit = omit, + restriction_type: Literal["turn", "parking", "fixedspeed", "maxspeed", "closure", "truck"] | Omit = omit, + source: str | Omit = omit, + state: Literal["enabled", "disabled", "deleted"] | Omit = omit, + status: Literal["active", "inactive"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RestrictionsItemListResponse: """ Get restriction items by bbox diff --git a/src/nextbillionai/resources/revgeocode.py b/src/nextbillionai/resources/revgeocode.py index 194f677..d7f002b 100644 --- a/src/nextbillionai/resources/revgeocode.py +++ b/src/nextbillionai/resources/revgeocode.py @@ -5,7 +5,7 @@ import httpx from ..types import revgeocode_retrieve_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -46,14 +46,14 @@ def retrieve( *, at: str, key: str, - in_: str | NotGiven = NOT_GIVEN, - lang: str | NotGiven = NOT_GIVEN, + in_: str | Omit = omit, + lang: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RevgeocodeRetrieveResponse: """ Reverse Geocode @@ -149,14 +149,14 @@ async def retrieve( *, at: str, key: str, - in_: str | NotGiven = NOT_GIVEN, - lang: str | NotGiven = NOT_GIVEN, + in_: str | Omit = omit, + lang: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RevgeocodeRetrieveResponse: """ Reverse Geocode diff --git a/src/nextbillionai/resources/route_report.py b/src/nextbillionai/resources/route_report.py index e9dcd8e..9fb3876 100644 --- a/src/nextbillionai/resources/route_report.py +++ b/src/nextbillionai/resources/route_report.py @@ -7,7 +7,7 @@ import httpx from ..types import route_report_create_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Query, Headers, NotGiven, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -54,7 +54,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RouteReportCreateResponse: """ Route Report @@ -133,7 +133,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RouteReportCreateResponse: """ Route Report diff --git a/src/nextbillionai/resources/skynet/asset/asset.py b/src/nextbillionai/resources/skynet/asset/asset.py index 3d36c82..f2659c0 100644 --- a/src/nextbillionai/resources/skynet/asset/asset.py +++ b/src/nextbillionai/resources/skynet/asset/asset.py @@ -22,7 +22,7 @@ LocationResourceWithStreamingResponse, AsyncLocationResourceWithStreamingResponse, ) -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr +from ...._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given from ...._utils import maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -84,19 +84,19 @@ def create( self, *, key: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, - attributes: object | NotGiven = NOT_GIVEN, - custom_id: str | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - meta_data: MetaDataParam | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, + attributes: object | Omit = omit, + custom_id: str | Omit = omit, + description: str | Omit = omit, + meta_data: MetaDataParam | Omit = omit, + name: str | Omit = omit, + tags: SequenceNotStr[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AssetCreateResponse: """ Create an Asset @@ -182,13 +182,13 @@ def retrieve( id: str, *, key: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AssetRetrieveResponse: """ Get an Asset @@ -232,18 +232,18 @@ def update( id: str, *, key: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, - attributes: object | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - meta_data: MetaDataParam | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, + attributes: object | Omit = omit, + description: str | Omit = omit, + meta_data: MetaDataParam | Omit = omit, + name: str | Omit = omit, + tags: SequenceNotStr[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SimpleResp: """ Update an Asset @@ -323,19 +323,19 @@ def list( self, *, key: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, - include_all_of_attributes: str | NotGiven = NOT_GIVEN, - include_any_of_attributes: str | NotGiven = NOT_GIVEN, - pn: int | NotGiven = NOT_GIVEN, - ps: int | NotGiven = NOT_GIVEN, - sort: str | NotGiven = NOT_GIVEN, - tags: str | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, + include_all_of_attributes: str | Omit = omit, + include_any_of_attributes: str | Omit = omit, + pn: int | Omit = omit, + ps: int | Omit = omit, + sort: str | Omit = omit, + tags: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AssetListResponse: """ Get Asset List @@ -420,13 +420,13 @@ def delete( id: str, *, key: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SimpleResp: """ Delete an Asset @@ -476,7 +476,7 @@ def bind( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SimpleResp: """ Bind asset to device @@ -521,13 +521,13 @@ def track( key: str, device_id: str, locations: asset_track_params.Locations, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SimpleResp: """ Upload track info @@ -592,7 +592,7 @@ def update_attributes( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SimpleResp: """Update asset attributes. @@ -674,19 +674,19 @@ async def create( self, *, key: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, - attributes: object | NotGiven = NOT_GIVEN, - custom_id: str | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - meta_data: MetaDataParam | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, + attributes: object | Omit = omit, + custom_id: str | Omit = omit, + description: str | Omit = omit, + meta_data: MetaDataParam | Omit = omit, + name: str | Omit = omit, + tags: SequenceNotStr[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AssetCreateResponse: """ Create an Asset @@ -772,13 +772,13 @@ async def retrieve( id: str, *, key: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AssetRetrieveResponse: """ Get an Asset @@ -822,18 +822,18 @@ async def update( id: str, *, key: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, - attributes: object | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - meta_data: MetaDataParam | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, + attributes: object | Omit = omit, + description: str | Omit = omit, + meta_data: MetaDataParam | Omit = omit, + name: str | Omit = omit, + tags: SequenceNotStr[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SimpleResp: """ Update an Asset @@ -913,19 +913,19 @@ async def list( self, *, key: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, - include_all_of_attributes: str | NotGiven = NOT_GIVEN, - include_any_of_attributes: str | NotGiven = NOT_GIVEN, - pn: int | NotGiven = NOT_GIVEN, - ps: int | NotGiven = NOT_GIVEN, - sort: str | NotGiven = NOT_GIVEN, - tags: str | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, + include_all_of_attributes: str | Omit = omit, + include_any_of_attributes: str | Omit = omit, + pn: int | Omit = omit, + ps: int | Omit = omit, + sort: str | Omit = omit, + tags: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AssetListResponse: """ Get Asset List @@ -1010,13 +1010,13 @@ async def delete( id: str, *, key: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SimpleResp: """ Delete an Asset @@ -1066,7 +1066,7 @@ async def bind( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SimpleResp: """ Bind asset to device @@ -1111,13 +1111,13 @@ async def track( key: str, device_id: str, locations: asset_track_params.Locations, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SimpleResp: """ Upload track info @@ -1182,7 +1182,7 @@ async def update_attributes( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SimpleResp: """Update asset attributes. diff --git a/src/nextbillionai/resources/skynet/asset/event.py b/src/nextbillionai/resources/skynet/asset/event.py index 252d8b2..cbab431 100644 --- a/src/nextbillionai/resources/skynet/asset/event.py +++ b/src/nextbillionai/resources/skynet/asset/event.py @@ -6,7 +6,7 @@ import httpx -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ...._utils import maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -48,18 +48,18 @@ def list( id: str, *, key: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, - end_time: int | NotGiven = NOT_GIVEN, - monitor_id: str | NotGiven = NOT_GIVEN, - pn: int | NotGiven = NOT_GIVEN, - ps: int | NotGiven = NOT_GIVEN, - start_time: int | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, + end_time: int | Omit = omit, + monitor_id: str | Omit = omit, + pn: int | Omit = omit, + ps: int | Omit = omit, + start_time: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> EventListResponse: """ Event History of an Asset @@ -147,18 +147,18 @@ async def list( id: str, *, key: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, - end_time: int | NotGiven = NOT_GIVEN, - monitor_id: str | NotGiven = NOT_GIVEN, - pn: int | NotGiven = NOT_GIVEN, - ps: int | NotGiven = NOT_GIVEN, - start_time: int | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, + end_time: int | Omit = omit, + monitor_id: str | Omit = omit, + pn: int | Omit = omit, + ps: int | Omit = omit, + start_time: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> EventListResponse: """ Event History of an Asset diff --git a/src/nextbillionai/resources/skynet/asset/location.py b/src/nextbillionai/resources/skynet/asset/location.py index b541f35..b551cb0 100644 --- a/src/nextbillionai/resources/skynet/asset/location.py +++ b/src/nextbillionai/resources/skynet/asset/location.py @@ -6,7 +6,7 @@ import httpx -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ...._utils import maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -49,19 +49,19 @@ def list( id: str, *, key: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, - correction: str | NotGiven = NOT_GIVEN, - end_time: int | NotGiven = NOT_GIVEN, - geometry_type: Literal["polyline", "polyline6", "geojson"] | NotGiven = NOT_GIVEN, - pn: int | NotGiven = NOT_GIVEN, - ps: int | NotGiven = NOT_GIVEN, - start_time: int | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, + correction: str | Omit = omit, + end_time: int | Omit = omit, + geometry_type: Literal["polyline", "polyline6", "geojson"] | Omit = omit, + pn: int | Omit = omit, + ps: int | Omit = omit, + start_time: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> LocationListResponse: """ Track locations of an asset @@ -141,13 +141,13 @@ def get_last( id: str, *, key: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> LocationGetLastResponse: """ Track the last location of an asset @@ -212,19 +212,19 @@ async def list( id: str, *, key: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, - correction: str | NotGiven = NOT_GIVEN, - end_time: int | NotGiven = NOT_GIVEN, - geometry_type: Literal["polyline", "polyline6", "geojson"] | NotGiven = NOT_GIVEN, - pn: int | NotGiven = NOT_GIVEN, - ps: int | NotGiven = NOT_GIVEN, - start_time: int | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, + correction: str | Omit = omit, + end_time: int | Omit = omit, + geometry_type: Literal["polyline", "polyline6", "geojson"] | Omit = omit, + pn: int | Omit = omit, + ps: int | Omit = omit, + start_time: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> LocationListResponse: """ Track locations of an asset @@ -304,13 +304,13 @@ async def get_last( id: str, *, key: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> LocationGetLastResponse: """ Track the last location of an asset diff --git a/src/nextbillionai/resources/skynet/config.py b/src/nextbillionai/resources/skynet/config.py index 3a049a6..37dbcf8 100644 --- a/src/nextbillionai/resources/skynet/config.py +++ b/src/nextbillionai/resources/skynet/config.py @@ -6,7 +6,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr +from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -49,13 +49,13 @@ def retrieve( self, *, key: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ConfigRetrieveResponse: """ Get webhook configuration @@ -96,14 +96,14 @@ def update( self, *, key: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, - webhook: SequenceNotStr[str] | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, + webhook: SequenceNotStr[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SimpleResp: """ Update webhook configuration @@ -153,7 +153,7 @@ def test_webhook( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ConfigTestWebhookResponse: """ Test webhook configurations @@ -207,13 +207,13 @@ async def retrieve( self, *, key: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ConfigRetrieveResponse: """ Get webhook configuration @@ -254,14 +254,14 @@ async def update( self, *, key: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, - webhook: SequenceNotStr[str] | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, + webhook: SequenceNotStr[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SimpleResp: """ Update webhook configuration @@ -311,7 +311,7 @@ async def test_webhook( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ConfigTestWebhookResponse: """ Test webhook configurations diff --git a/src/nextbillionai/resources/skynet/monitor.py b/src/nextbillionai/resources/skynet/monitor.py index 280b6c6..a321bd8 100644 --- a/src/nextbillionai/resources/skynet/monitor.py +++ b/src/nextbillionai/resources/skynet/monitor.py @@ -6,7 +6,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr +from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -59,22 +59,22 @@ def create( key: str, tags: SequenceNotStr[str], type: Literal["enter", "exit", "enter_and_exit", "speeding", "idle"], - cluster: Literal["america"] | NotGiven = NOT_GIVEN, - custom_id: str | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - geofence_config: monitor_create_params.GeofenceConfig | NotGiven = NOT_GIVEN, - geofence_ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - idle_config: monitor_create_params.IdleConfig | NotGiven = NOT_GIVEN, - match_filter: monitor_create_params.MatchFilter | NotGiven = NOT_GIVEN, - meta_data: MetadataParam | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - speeding_config: monitor_create_params.SpeedingConfig | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, + custom_id: str | Omit = omit, + description: str | Omit = omit, + geofence_config: monitor_create_params.GeofenceConfig | Omit = omit, + geofence_ids: SequenceNotStr[str] | Omit = omit, + idle_config: monitor_create_params.IdleConfig | Omit = omit, + match_filter: monitor_create_params.MatchFilter | Omit = omit, + meta_data: MetadataParam | Omit = omit, + name: str | Omit = omit, + speeding_config: monitor_create_params.SpeedingConfig | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> MonitorCreateResponse: """ Create a Monitor @@ -216,7 +216,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> MonitorRetrieveResponse: """ Get a Monitor @@ -252,22 +252,22 @@ def update( id: str, *, key: str, - description: str | NotGiven = NOT_GIVEN, - geofence_config: monitor_update_params.GeofenceConfig | NotGiven = NOT_GIVEN, - geofence_ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - idle_config: monitor_update_params.IdleConfig | NotGiven = NOT_GIVEN, - match_filter: monitor_update_params.MatchFilter | NotGiven = NOT_GIVEN, - meta_data: MetadataParam | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - speeding_config: monitor_update_params.SpeedingConfig | NotGiven = NOT_GIVEN, - tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - type: Literal["enter", "exit", "enter_and_exit", "speeding", "idle"] | NotGiven = NOT_GIVEN, + description: str | Omit = omit, + geofence_config: monitor_update_params.GeofenceConfig | Omit = omit, + geofence_ids: SequenceNotStr[str] | Omit = omit, + idle_config: monitor_update_params.IdleConfig | Omit = omit, + match_filter: monitor_update_params.MatchFilter | Omit = omit, + meta_data: MetadataParam | Omit = omit, + name: str | Omit = omit, + speeding_config: monitor_update_params.SpeedingConfig | Omit = omit, + tags: SequenceNotStr[str] | Omit = omit, + type: Literal["enter", "exit", "enter_and_exit", "speeding", "idle"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SimpleResp: """ Update a Monitor @@ -380,17 +380,17 @@ def list( self, *, key: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, - pn: int | NotGiven = NOT_GIVEN, - ps: int | NotGiven = NOT_GIVEN, - sort: str | NotGiven = NOT_GIVEN, - tags: str | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, + pn: int | Omit = omit, + ps: int | Omit = omit, + sort: str | Omit = omit, + tags: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> MonitorListResponse: """ Get Monitor List @@ -460,7 +460,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SimpleResp: """ Delete a Monitor @@ -518,22 +518,22 @@ async def create( key: str, tags: SequenceNotStr[str], type: Literal["enter", "exit", "enter_and_exit", "speeding", "idle"], - cluster: Literal["america"] | NotGiven = NOT_GIVEN, - custom_id: str | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - geofence_config: monitor_create_params.GeofenceConfig | NotGiven = NOT_GIVEN, - geofence_ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - idle_config: monitor_create_params.IdleConfig | NotGiven = NOT_GIVEN, - match_filter: monitor_create_params.MatchFilter | NotGiven = NOT_GIVEN, - meta_data: MetadataParam | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - speeding_config: monitor_create_params.SpeedingConfig | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, + custom_id: str | Omit = omit, + description: str | Omit = omit, + geofence_config: monitor_create_params.GeofenceConfig | Omit = omit, + geofence_ids: SequenceNotStr[str] | Omit = omit, + idle_config: monitor_create_params.IdleConfig | Omit = omit, + match_filter: monitor_create_params.MatchFilter | Omit = omit, + meta_data: MetadataParam | Omit = omit, + name: str | Omit = omit, + speeding_config: monitor_create_params.SpeedingConfig | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> MonitorCreateResponse: """ Create a Monitor @@ -675,7 +675,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> MonitorRetrieveResponse: """ Get a Monitor @@ -711,22 +711,22 @@ async def update( id: str, *, key: str, - description: str | NotGiven = NOT_GIVEN, - geofence_config: monitor_update_params.GeofenceConfig | NotGiven = NOT_GIVEN, - geofence_ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - idle_config: monitor_update_params.IdleConfig | NotGiven = NOT_GIVEN, - match_filter: monitor_update_params.MatchFilter | NotGiven = NOT_GIVEN, - meta_data: MetadataParam | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - speeding_config: monitor_update_params.SpeedingConfig | NotGiven = NOT_GIVEN, - tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - type: Literal["enter", "exit", "enter_and_exit", "speeding", "idle"] | NotGiven = NOT_GIVEN, + description: str | Omit = omit, + geofence_config: monitor_update_params.GeofenceConfig | Omit = omit, + geofence_ids: SequenceNotStr[str] | Omit = omit, + idle_config: monitor_update_params.IdleConfig | Omit = omit, + match_filter: monitor_update_params.MatchFilter | Omit = omit, + meta_data: MetadataParam | Omit = omit, + name: str | Omit = omit, + speeding_config: monitor_update_params.SpeedingConfig | Omit = omit, + tags: SequenceNotStr[str] | Omit = omit, + type: Literal["enter", "exit", "enter_and_exit", "speeding", "idle"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SimpleResp: """ Update a Monitor @@ -839,17 +839,17 @@ async def list( self, *, key: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, - pn: int | NotGiven = NOT_GIVEN, - ps: int | NotGiven = NOT_GIVEN, - sort: str | NotGiven = NOT_GIVEN, - tags: str | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, + pn: int | Omit = omit, + ps: int | Omit = omit, + sort: str | Omit = omit, + tags: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> MonitorListResponse: """ Get Monitor List @@ -919,7 +919,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SimpleResp: """ Delete a Monitor diff --git a/src/nextbillionai/resources/skynet/namespaced_apikeys.py b/src/nextbillionai/resources/skynet/namespaced_apikeys.py index a04518f..fd21e8c 100644 --- a/src/nextbillionai/resources/skynet/namespaced_apikeys.py +++ b/src/nextbillionai/resources/skynet/namespaced_apikeys.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Query, Headers, NotGiven, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -52,7 +52,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> NamespacedApikeyCreateResponse: """ Create namespace under a parent key @@ -103,7 +103,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> NamespacedApikeyDeleteResponse: """ Delete namespace under a parent key @@ -180,7 +180,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> NamespacedApikeyCreateResponse: """ Create namespace under a parent key @@ -231,7 +231,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> NamespacedApikeyDeleteResponse: """ Delete namespace under a parent key diff --git a/src/nextbillionai/resources/skynet/search/polygon.py b/src/nextbillionai/resources/skynet/search/polygon.py index 82a6cf7..ab01c01 100644 --- a/src/nextbillionai/resources/skynet/search/polygon.py +++ b/src/nextbillionai/resources/skynet/search/polygon.py @@ -6,7 +6,7 @@ import httpx -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ...._utils import maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -48,18 +48,18 @@ def create( *, key: str, polygon: polygon_create_params.Polygon, - filter: str | NotGiven = NOT_GIVEN, - match_filter: polygon_create_params.MatchFilter | NotGiven = NOT_GIVEN, - max_search_limit: bool | NotGiven = NOT_GIVEN, - pn: int | NotGiven = NOT_GIVEN, - ps: int | NotGiven = NOT_GIVEN, - sort: polygon_create_params.Sort | NotGiven = NOT_GIVEN, + filter: str | Omit = omit, + match_filter: polygon_create_params.MatchFilter | Omit = omit, + max_search_limit: bool | Omit = omit, + pn: int | Omit = omit, + ps: int | Omit = omit, + sort: polygon_create_params.Sort | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SearchResponse: """ Polygon Search @@ -143,21 +143,21 @@ def get( *, key: str, polygon: str, - filter: str | NotGiven = NOT_GIVEN, - include_all_of_attributes: str | NotGiven = NOT_GIVEN, - include_any_of_attributes: str | NotGiven = NOT_GIVEN, - max_search_limit: bool | NotGiven = NOT_GIVEN, - pn: int | NotGiven = NOT_GIVEN, - ps: int | NotGiven = NOT_GIVEN, - sort_by: Literal["distance", "duration", "straight_distance"] | NotGiven = NOT_GIVEN, - sort_destination: str | NotGiven = NOT_GIVEN, - sort_driving_mode: Literal["car", "truck"] | NotGiven = NOT_GIVEN, + filter: str | Omit = omit, + include_all_of_attributes: str | Omit = omit, + include_any_of_attributes: str | Omit = omit, + max_search_limit: bool | Omit = omit, + pn: int | Omit = omit, + ps: int | Omit = omit, + sort_by: Literal["distance", "duration", "straight_distance"] | Omit = omit, + sort_destination: str | Omit = omit, + sort_driving_mode: Literal["car", "truck"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SearchResponse: """ Polygon Search @@ -292,18 +292,18 @@ async def create( *, key: str, polygon: polygon_create_params.Polygon, - filter: str | NotGiven = NOT_GIVEN, - match_filter: polygon_create_params.MatchFilter | NotGiven = NOT_GIVEN, - max_search_limit: bool | NotGiven = NOT_GIVEN, - pn: int | NotGiven = NOT_GIVEN, - ps: int | NotGiven = NOT_GIVEN, - sort: polygon_create_params.Sort | NotGiven = NOT_GIVEN, + filter: str | Omit = omit, + match_filter: polygon_create_params.MatchFilter | Omit = omit, + max_search_limit: bool | Omit = omit, + pn: int | Omit = omit, + ps: int | Omit = omit, + sort: polygon_create_params.Sort | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SearchResponse: """ Polygon Search @@ -387,21 +387,21 @@ async def get( *, key: str, polygon: str, - filter: str | NotGiven = NOT_GIVEN, - include_all_of_attributes: str | NotGiven = NOT_GIVEN, - include_any_of_attributes: str | NotGiven = NOT_GIVEN, - max_search_limit: bool | NotGiven = NOT_GIVEN, - pn: int | NotGiven = NOT_GIVEN, - ps: int | NotGiven = NOT_GIVEN, - sort_by: Literal["distance", "duration", "straight_distance"] | NotGiven = NOT_GIVEN, - sort_destination: str | NotGiven = NOT_GIVEN, - sort_driving_mode: Literal["car", "truck"] | NotGiven = NOT_GIVEN, + filter: str | Omit = omit, + include_all_of_attributes: str | Omit = omit, + include_any_of_attributes: str | Omit = omit, + max_search_limit: bool | Omit = omit, + pn: int | Omit = omit, + ps: int | Omit = omit, + sort_by: Literal["distance", "duration", "straight_distance"] | Omit = omit, + sort_destination: str | Omit = omit, + sort_driving_mode: Literal["car", "truck"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SearchResponse: """ Polygon Search diff --git a/src/nextbillionai/resources/skynet/search/search.py b/src/nextbillionai/resources/skynet/search/search.py index 49d1df7..e9a177a 100644 --- a/src/nextbillionai/resources/skynet/search/search.py +++ b/src/nextbillionai/resources/skynet/search/search.py @@ -14,7 +14,7 @@ PolygonResourceWithStreamingResponse, AsyncPolygonResourceWithStreamingResponse, ) -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ...._utils import maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -61,21 +61,21 @@ def around( center: str, key: str, radius: float, - filter: str | NotGiven = NOT_GIVEN, - include_all_of_attributes: str | NotGiven = NOT_GIVEN, - include_any_of_attributes: str | NotGiven = NOT_GIVEN, - max_search_limit: bool | NotGiven = NOT_GIVEN, - pn: int | NotGiven = NOT_GIVEN, - ps: int | NotGiven = NOT_GIVEN, - sort_by: Literal["distance", "duration", "straight_distance"] | NotGiven = NOT_GIVEN, - sort_destination: str | NotGiven = NOT_GIVEN, - sort_driving_mode: Literal["car", "truck"] | NotGiven = NOT_GIVEN, + filter: str | Omit = omit, + include_all_of_attributes: str | Omit = omit, + include_any_of_attributes: str | Omit = omit, + max_search_limit: bool | Omit = omit, + pn: int | Omit = omit, + ps: int | Omit = omit, + sort_by: Literal["distance", "duration", "straight_distance"] | Omit = omit, + sort_destination: str | Omit = omit, + sort_driving_mode: Literal["car", "truck"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SearchResponse: """ Around Search @@ -185,21 +185,21 @@ def bound( *, bound: str, key: str, - filter: str | NotGiven = NOT_GIVEN, - include_all_of_attributes: str | NotGiven = NOT_GIVEN, - include_any_of_attributes: str | NotGiven = NOT_GIVEN, - max_search_limit: bool | NotGiven = NOT_GIVEN, - pn: int | NotGiven = NOT_GIVEN, - ps: int | NotGiven = NOT_GIVEN, - sort_by: Literal["distance", "duration", "straight_distance"] | NotGiven = NOT_GIVEN, - sort_destination: str | NotGiven = NOT_GIVEN, - sort_driving_mode: Literal["car", "truck"] | NotGiven = NOT_GIVEN, + filter: str | Omit = omit, + include_all_of_attributes: str | Omit = omit, + include_any_of_attributes: str | Omit = omit, + max_search_limit: bool | Omit = omit, + pn: int | Omit = omit, + ps: int | Omit = omit, + sort_by: Literal["distance", "duration", "straight_distance"] | Omit = omit, + sort_destination: str | Omit = omit, + sort_driving_mode: Literal["car", "truck"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SearchResponse: """ Bound Search @@ -334,21 +334,21 @@ async def around( center: str, key: str, radius: float, - filter: str | NotGiven = NOT_GIVEN, - include_all_of_attributes: str | NotGiven = NOT_GIVEN, - include_any_of_attributes: str | NotGiven = NOT_GIVEN, - max_search_limit: bool | NotGiven = NOT_GIVEN, - pn: int | NotGiven = NOT_GIVEN, - ps: int | NotGiven = NOT_GIVEN, - sort_by: Literal["distance", "duration", "straight_distance"] | NotGiven = NOT_GIVEN, - sort_destination: str | NotGiven = NOT_GIVEN, - sort_driving_mode: Literal["car", "truck"] | NotGiven = NOT_GIVEN, + filter: str | Omit = omit, + include_all_of_attributes: str | Omit = omit, + include_any_of_attributes: str | Omit = omit, + max_search_limit: bool | Omit = omit, + pn: int | Omit = omit, + ps: int | Omit = omit, + sort_by: Literal["distance", "duration", "straight_distance"] | Omit = omit, + sort_destination: str | Omit = omit, + sort_driving_mode: Literal["car", "truck"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SearchResponse: """ Around Search @@ -458,21 +458,21 @@ async def bound( *, bound: str, key: str, - filter: str | NotGiven = NOT_GIVEN, - include_all_of_attributes: str | NotGiven = NOT_GIVEN, - include_any_of_attributes: str | NotGiven = NOT_GIVEN, - max_search_limit: bool | NotGiven = NOT_GIVEN, - pn: int | NotGiven = NOT_GIVEN, - ps: int | NotGiven = NOT_GIVEN, - sort_by: Literal["distance", "duration", "straight_distance"] | NotGiven = NOT_GIVEN, - sort_destination: str | NotGiven = NOT_GIVEN, - sort_driving_mode: Literal["car", "truck"] | NotGiven = NOT_GIVEN, + filter: str | Omit = omit, + include_all_of_attributes: str | Omit = omit, + include_any_of_attributes: str | Omit = omit, + max_search_limit: bool | Omit = omit, + pn: int | Omit = omit, + ps: int | Omit = omit, + sort_by: Literal["distance", "duration", "straight_distance"] | Omit = omit, + sort_destination: str | Omit = omit, + sort_driving_mode: Literal["car", "truck"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SearchResponse: """ Bound Search diff --git a/src/nextbillionai/resources/skynet/skynet.py b/src/nextbillionai/resources/skynet/skynet.py index 4426cdb..b5ab9a7 100644 --- a/src/nextbillionai/resources/skynet/skynet.py +++ b/src/nextbillionai/resources/skynet/skynet.py @@ -31,7 +31,7 @@ MonitorResourceWithStreamingResponse, AsyncMonitorResourceWithStreamingResponse, ) -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -119,14 +119,14 @@ def subscribe( self, *, action: Literal["TRIP_SUBSCRIBE", "TRIP_UNSUBSCRIBE", "HEARTBEAT"], - id: str | NotGiven = NOT_GIVEN, - params: skynet_subscribe_params.Params | NotGiven = NOT_GIVEN, + id: str | Omit = omit, + params: skynet_subscribe_params.Params | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SkynetSubscribeResponse: """ POST Action @@ -220,14 +220,14 @@ async def subscribe( self, *, action: Literal["TRIP_SUBSCRIBE", "TRIP_UNSUBSCRIBE", "HEARTBEAT"], - id: str | NotGiven = NOT_GIVEN, - params: skynet_subscribe_params.Params | NotGiven = NOT_GIVEN, + id: str | Omit = omit, + params: skynet_subscribe_params.Params | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SkynetSubscribeResponse: """ POST Action diff --git a/src/nextbillionai/resources/skynet/trip.py b/src/nextbillionai/resources/skynet/trip.py index 700c08c..ade1d45 100644 --- a/src/nextbillionai/resources/skynet/trip.py +++ b/src/nextbillionai/resources/skynet/trip.py @@ -7,7 +7,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -59,13 +59,13 @@ def retrieve( id: str, *, key: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> TripRetrieveResponse: """ Retrieves detailed information about a specific trip. @@ -110,18 +110,18 @@ def update( *, key: str, asset_id: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, - attributes: object | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - meta_data: object | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - stops: Iterable[trip_update_params.Stop] | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, + attributes: object | Omit = omit, + description: str | Omit = omit, + meta_data: object | Omit = omit, + name: str | Omit = omit, + stops: Iterable[trip_update_params.Stop] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SimpleResp: """ Updates the data of a specified trip with the provided data. @@ -200,13 +200,13 @@ def delete( id: str, *, key: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SimpleResp: """ Deletes a specified trip from the system. @@ -250,13 +250,13 @@ def end( *, key: str, id: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SimpleResp: """ End a trip @@ -301,13 +301,13 @@ def get_summary( id: str, *, key: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> TripGetSummaryResponse: """ Get summary of an ended trip @@ -351,19 +351,19 @@ def start( *, key: str, asset_id: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, - attributes: object | NotGiven = NOT_GIVEN, - custom_id: str | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - meta_data: object | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - stops: Iterable[trip_start_params.Stop] | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, + attributes: object | Omit = omit, + custom_id: str | Omit = omit, + description: str | Omit = omit, + meta_data: object | Omit = omit, + name: str | Omit = omit, + stops: Iterable[trip_start_params.Stop] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> TripStartResponse: """ Add a new trip to the system with the provided data. @@ -467,13 +467,13 @@ async def retrieve( id: str, *, key: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> TripRetrieveResponse: """ Retrieves detailed information about a specific trip. @@ -518,18 +518,18 @@ async def update( *, key: str, asset_id: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, - attributes: object | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - meta_data: object | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - stops: Iterable[trip_update_params.Stop] | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, + attributes: object | Omit = omit, + description: str | Omit = omit, + meta_data: object | Omit = omit, + name: str | Omit = omit, + stops: Iterable[trip_update_params.Stop] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SimpleResp: """ Updates the data of a specified trip with the provided data. @@ -608,13 +608,13 @@ async def delete( id: str, *, key: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SimpleResp: """ Deletes a specified trip from the system. @@ -658,13 +658,13 @@ async def end( *, key: str, id: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SimpleResp: """ End a trip @@ -709,13 +709,13 @@ async def get_summary( id: str, *, key: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> TripGetSummaryResponse: """ Get summary of an ended trip @@ -759,19 +759,19 @@ async def start( *, key: str, asset_id: str, - cluster: Literal["america"] | NotGiven = NOT_GIVEN, - attributes: object | NotGiven = NOT_GIVEN, - custom_id: str | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - meta_data: object | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - stops: Iterable[trip_start_params.Stop] | NotGiven = NOT_GIVEN, + cluster: Literal["america"] | Omit = omit, + attributes: object | Omit = omit, + custom_id: str | Omit = omit, + description: str | Omit = omit, + meta_data: object | Omit = omit, + name: str | Omit = omit, + stops: Iterable[trip_start_params.Stop] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> TripStartResponse: """ Add a new trip to the system with the provided data. diff --git a/src/nextbillionai/resources/snap_to_roads.py b/src/nextbillionai/resources/snap_to_roads.py index c9c0446..3c6555a 100644 --- a/src/nextbillionai/resources/snap_to_roads.py +++ b/src/nextbillionai/resources/snap_to_roads.py @@ -7,7 +7,7 @@ import httpx from ..types import snap_to_road_snap_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -48,21 +48,21 @@ def snap( *, key: str, path: str, - approaches: Literal["unrestricted", "curb"] | NotGiven = NOT_GIVEN, - avoid: Literal["toll", "ferry", "highway", "none"] | NotGiven = NOT_GIVEN, - geometry: Literal["polyline", "polyline6", "geojson"] | NotGiven = NOT_GIVEN, - mode: Literal["car", "truck"] | NotGiven = NOT_GIVEN, - option: Literal["flexible"] | NotGiven = NOT_GIVEN, - radiuses: str | NotGiven = NOT_GIVEN, - road_info: Literal["max_speed"] | NotGiven = NOT_GIVEN, - timestamps: str | NotGiven = NOT_GIVEN, - tolerate_outlier: bool | NotGiven = NOT_GIVEN, + approaches: Literal["unrestricted", "curb"] | Omit = omit, + avoid: Literal["toll", "ferry", "highway", "none"] | Omit = omit, + geometry: Literal["polyline", "polyline6", "geojson"] | Omit = omit, + mode: Literal["car", "truck"] | Omit = omit, + option: Literal["flexible"] | Omit = omit, + radiuses: str | Omit = omit, + road_info: Literal["max_speed"] | Omit = omit, + timestamps: str | Omit = omit, + tolerate_outlier: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SnapToRoadSnapResponse: """ Nextbillion.ai Snap To Roads API takes a series of locations along a route, and @@ -198,21 +198,21 @@ async def snap( *, key: str, path: str, - approaches: Literal["unrestricted", "curb"] | NotGiven = NOT_GIVEN, - avoid: Literal["toll", "ferry", "highway", "none"] | NotGiven = NOT_GIVEN, - geometry: Literal["polyline", "polyline6", "geojson"] | NotGiven = NOT_GIVEN, - mode: Literal["car", "truck"] | NotGiven = NOT_GIVEN, - option: Literal["flexible"] | NotGiven = NOT_GIVEN, - radiuses: str | NotGiven = NOT_GIVEN, - road_info: Literal["max_speed"] | NotGiven = NOT_GIVEN, - timestamps: str | NotGiven = NOT_GIVEN, - tolerate_outlier: bool | NotGiven = NOT_GIVEN, + approaches: Literal["unrestricted", "curb"] | Omit = omit, + avoid: Literal["toll", "ferry", "highway", "none"] | Omit = omit, + geometry: Literal["polyline", "polyline6", "geojson"] | Omit = omit, + mode: Literal["car", "truck"] | Omit = omit, + option: Literal["flexible"] | Omit = omit, + radiuses: str | Omit = omit, + road_info: Literal["max_speed"] | Omit = omit, + timestamps: str | Omit = omit, + tolerate_outlier: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SnapToRoadSnapResponse: """ Nextbillion.ai Snap To Roads API takes a series of locations along a route, and diff --git a/tests/test_transform.py b/tests/test_transform.py index 74d8801..ce35c86 100644 --- a/tests/test_transform.py +++ b/tests/test_transform.py @@ -8,7 +8,7 @@ import pytest -from nextbillionai._types import NOT_GIVEN, Base64FileInput +from nextbillionai._types import Base64FileInput, omit, not_given from nextbillionai._utils import ( PropertyInfo, transform as _transform, @@ -450,4 +450,11 @@ async def test_transform_skipping(use_async: bool) -> None: @pytest.mark.asyncio async def test_strips_notgiven(use_async: bool) -> None: assert await transform({"foo_bar": "bar"}, Foo1, use_async) == {"fooBar": "bar"} - assert await transform({"foo_bar": NOT_GIVEN}, Foo1, use_async) == {} + assert await transform({"foo_bar": not_given}, Foo1, use_async) == {} + + +@parametrize +@pytest.mark.asyncio +async def test_strips_omit(use_async: bool) -> None: + assert await transform({"foo_bar": "bar"}, Foo1, use_async) == {"fooBar": "bar"} + assert await transform({"foo_bar": omit}, Foo1, use_async) == {} From a676ec08499f24939b3c69b6d398e703a7f51143 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 20 Sep 2025 04:10:57 +0000 Subject: [PATCH 17/35] chore: do not install brew dependencies in ./scripts/bootstrap by default --- scripts/bootstrap | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/bootstrap b/scripts/bootstrap index e84fe62..b430fee 100755 --- a/scripts/bootstrap +++ b/scripts/bootstrap @@ -4,10 +4,18 @@ set -e cd "$(dirname "$0")/.." -if ! command -v rye >/dev/null 2>&1 && [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then +if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then brew bundle check >/dev/null 2>&1 || { - echo "==> Installing Homebrew dependencies…" - brew bundle + echo -n "==> Install Homebrew dependencies? (y/N): " + read -r response + case "$response" in + [yY][eE][sS]|[yY]) + brew bundle + ;; + *) + ;; + esac + echo } fi From f735ee00e0765848f9e9346294eaf04e80a3a1fd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 11 Oct 2025 02:44:30 +0000 Subject: [PATCH 18/35] chore(internal): codegen related update --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 753d773..74c271d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -224,6 +224,8 @@ select = [ "B", # remove unused imports "F401", + # check for missing future annotations + "FA102", # bare except statements "E722", # unused arguments @@ -246,6 +248,8 @@ unfixable = [ "T203", ] +extend-safe-fixes = ["FA102"] + [tool.ruff.lint.flake8-tidy-imports.banned-api] "functools.lru_cache".msg = "This function does not retain type information for the wrapped function's arguments; The `lru_cache` function from `_utils` should be used instead" From 9917d185f532fcbf06e56803b4cf7848b84eed7b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 18 Oct 2025 02:27:38 +0000 Subject: [PATCH 19/35] chore(internal): codegen related update --- pyproject.toml | 2 +- requirements-dev.lock | 2 +- requirements.lock | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 74c271d..8519708 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ Homepage = "https://github.com/nextbillion-ai/nextbillion-sdk-python" Repository = "https://github.com/nextbillion-ai/nextbillion-sdk-python" [project.optional-dependencies] -aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"] +aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"] [tool.rye] managed = true diff --git a/requirements-dev.lock b/requirements-dev.lock index 515fb50..477c9c8 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -56,7 +56,7 @@ httpx==0.28.1 # via httpx-aiohttp # via nextbillionai # via respx -httpx-aiohttp==0.1.8 +httpx-aiohttp==0.1.9 # via nextbillionai idna==3.4 # via anyio diff --git a/requirements.lock b/requirements.lock index b392db4..b1a2c3d 100644 --- a/requirements.lock +++ b/requirements.lock @@ -43,7 +43,7 @@ httpcore==1.0.9 httpx==0.28.1 # via httpx-aiohttp # via nextbillionai -httpx-aiohttp==0.1.8 +httpx-aiohttp==0.1.9 # via nextbillionai idna==3.4 # via anyio From 9da362bf226d118fbba85093fe623aca94e4ed73 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Oct 2025 02:59:19 +0000 Subject: [PATCH 20/35] chore(internal): codegen related update --- src/nextbillionai/_streaming.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/nextbillionai/_streaming.py b/src/nextbillionai/_streaming.py index dc7b19a..f3a4ea1 100644 --- a/src/nextbillionai/_streaming.py +++ b/src/nextbillionai/_streaming.py @@ -57,9 +57,8 @@ def __stream__(self) -> Iterator[_T]: for sse in iterator: yield process_data(data=sse.json(), cast_to=cast_to, response=response) - # Ensure the entire stream is consumed - for _sse in iterator: - ... + # As we might not fully consume the response stream, we need to close it explicitly + response.close() def __enter__(self) -> Self: return self @@ -121,9 +120,8 @@ async def __stream__(self) -> AsyncIterator[_T]: async for sse in iterator: yield process_data(data=sse.json(), cast_to=cast_to, response=response) - # Ensure the entire stream is consumed - async for _sse in iterator: - ... + # As we might not fully consume the response stream, we need to close it explicitly + await response.aclose() async def __aenter__(self) -> Self: return self From 9e5bd4484a2738f20363c0ba5b729ff9e6d1a2c2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 Oct 2025 04:29:01 +0000 Subject: [PATCH 21/35] chore(internal): codegen related update --- tests/test_client.py | 368 ++++++++++++++++++++++++------------------- 1 file changed, 204 insertions(+), 164 deletions(-) diff --git a/tests/test_client.py b/tests/test_client.py index 975bade..8dade82 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -59,51 +59,49 @@ def _get_open_connections(client: NextbillionSDK | AsyncNextbillionSDK) -> int: class TestNextbillionSDK: - client = NextbillionSDK(base_url=base_url, api_key=api_key, _strict_response_validation=True) - @pytest.mark.respx(base_url=base_url) - def test_raw_response(self, respx_mock: MockRouter) -> None: + def test_raw_response(self, respx_mock: MockRouter, client: NextbillionSDK) -> None: respx_mock.post("/foo").mock(return_value=httpx.Response(200, json={"foo": "bar"})) - response = self.client.post("/foo", cast_to=httpx.Response) + response = client.post("/foo", cast_to=httpx.Response) assert response.status_code == 200 assert isinstance(response, httpx.Response) assert response.json() == {"foo": "bar"} @pytest.mark.respx(base_url=base_url) - def test_raw_response_for_binary(self, respx_mock: MockRouter) -> None: + def test_raw_response_for_binary(self, respx_mock: MockRouter, client: NextbillionSDK) -> None: respx_mock.post("/foo").mock( return_value=httpx.Response(200, headers={"Content-Type": "application/binary"}, content='{"foo": "bar"}') ) - response = self.client.post("/foo", cast_to=httpx.Response) + response = client.post("/foo", cast_to=httpx.Response) assert response.status_code == 200 assert isinstance(response, httpx.Response) assert response.json() == {"foo": "bar"} - def test_copy(self) -> None: - copied = self.client.copy() - assert id(copied) != id(self.client) + def test_copy(self, client: NextbillionSDK) -> None: + copied = client.copy() + assert id(copied) != id(client) - copied = self.client.copy(api_key="another My API Key") + copied = client.copy(api_key="another My API Key") assert copied.api_key == "another My API Key" - assert self.client.api_key == "My API Key" + assert client.api_key == "My API Key" - def test_copy_default_options(self) -> None: + def test_copy_default_options(self, client: NextbillionSDK) -> None: # options that have a default are overridden correctly - copied = self.client.copy(max_retries=7) + copied = client.copy(max_retries=7) assert copied.max_retries == 7 - assert self.client.max_retries == 2 + assert client.max_retries == 2 copied2 = copied.copy(max_retries=6) assert copied2.max_retries == 6 assert copied.max_retries == 7 # timeout - assert isinstance(self.client.timeout, httpx.Timeout) - copied = self.client.copy(timeout=None) + assert isinstance(client.timeout, httpx.Timeout) + copied = client.copy(timeout=None) assert copied.timeout is None - assert isinstance(self.client.timeout, httpx.Timeout) + assert isinstance(client.timeout, httpx.Timeout) def test_copy_default_headers(self) -> None: client = NextbillionSDK( @@ -138,6 +136,7 @@ def test_copy_default_headers(self) -> None: match="`default_headers` and `set_default_headers` arguments are mutually exclusive", ): client.copy(set_default_headers={}, default_headers={"X-Foo": "Bar"}) + client.close() def test_copy_default_query(self) -> None: client = NextbillionSDK( @@ -175,13 +174,15 @@ def test_copy_default_query(self) -> None: ): client.copy(set_default_query={}, default_query={"foo": "Bar"}) - def test_copy_signature(self) -> None: + client.close() + + def test_copy_signature(self, client: NextbillionSDK) -> None: # ensure the same parameters that can be passed to the client are defined in the `.copy()` method init_signature = inspect.signature( # mypy doesn't like that we access the `__init__` property. - self.client.__init__, # type: ignore[misc] + client.__init__, # type: ignore[misc] ) - copy_signature = inspect.signature(self.client.copy) + copy_signature = inspect.signature(client.copy) exclude_params = {"transport", "proxies", "_strict_response_validation"} for name in init_signature.parameters.keys(): @@ -192,12 +193,12 @@ def test_copy_signature(self) -> None: assert copy_param is not None, f"copy() signature is missing the {name} param" @pytest.mark.skipif(sys.version_info >= (3, 10), reason="fails because of a memory leak that started from 3.12") - def test_copy_build_request(self) -> None: + def test_copy_build_request(self, client: NextbillionSDK) -> None: options = FinalRequestOptions(method="get", url="/foo") def build_request(options: FinalRequestOptions) -> None: - client = self.client.copy() - client._build_request(options) + client_copy = client.copy() + client_copy._build_request(options) # ensure that the machinery is warmed up before tracing starts. build_request(options) @@ -254,14 +255,12 @@ def add_leak(leaks: list[tracemalloc.StatisticDiff], diff: tracemalloc.Statistic print(frame) raise AssertionError() - def test_request_timeout(self) -> None: - request = self.client._build_request(FinalRequestOptions(method="get", url="/foo")) + def test_request_timeout(self, client: NextbillionSDK) -> None: + request = client._build_request(FinalRequestOptions(method="get", url="/foo")) timeout = httpx.Timeout(**request.extensions["timeout"]) # type: ignore assert timeout == DEFAULT_TIMEOUT - request = self.client._build_request( - FinalRequestOptions(method="get", url="/foo", timeout=httpx.Timeout(100.0)) - ) + request = client._build_request(FinalRequestOptions(method="get", url="/foo", timeout=httpx.Timeout(100.0))) timeout = httpx.Timeout(**request.extensions["timeout"]) # type: ignore assert timeout == httpx.Timeout(100.0) @@ -274,6 +273,8 @@ def test_client_timeout_option(self) -> None: timeout = httpx.Timeout(**request.extensions["timeout"]) # type: ignore assert timeout == httpx.Timeout(0) + client.close() + def test_http_client_timeout_option(self) -> None: # custom timeout given to the httpx client should be used with httpx.Client(timeout=None) as http_client: @@ -285,6 +286,8 @@ def test_http_client_timeout_option(self) -> None: timeout = httpx.Timeout(**request.extensions["timeout"]) # type: ignore assert timeout == httpx.Timeout(None) + client.close() + # no timeout given to the httpx client should not use the httpx default with httpx.Client() as http_client: client = NextbillionSDK( @@ -295,6 +298,8 @@ def test_http_client_timeout_option(self) -> None: timeout = httpx.Timeout(**request.extensions["timeout"]) # type: ignore assert timeout == DEFAULT_TIMEOUT + client.close() + # explicitly passing the default timeout currently results in it being ignored with httpx.Client(timeout=HTTPX_DEFAULT_TIMEOUT) as http_client: client = NextbillionSDK( @@ -305,6 +310,8 @@ def test_http_client_timeout_option(self) -> None: timeout = httpx.Timeout(**request.extensions["timeout"]) # type: ignore assert timeout == DEFAULT_TIMEOUT # our default + client.close() + async def test_invalid_http_client(self) -> None: with pytest.raises(TypeError, match="Invalid `http_client` arg"): async with httpx.AsyncClient() as http_client: @@ -316,14 +323,14 @@ async def test_invalid_http_client(self) -> None: ) def test_default_headers_option(self) -> None: - client = NextbillionSDK( + test_client = NextbillionSDK( base_url=base_url, api_key=api_key, _strict_response_validation=True, default_headers={"X-Foo": "bar"} ) - request = client._build_request(FinalRequestOptions(method="get", url="/foo")) + request = test_client._build_request(FinalRequestOptions(method="get", url="/foo")) assert request.headers.get("x-foo") == "bar" assert request.headers.get("x-stainless-lang") == "python" - client2 = NextbillionSDK( + test_client2 = NextbillionSDK( base_url=base_url, api_key=api_key, _strict_response_validation=True, @@ -332,10 +339,13 @@ def test_default_headers_option(self) -> None: "X-Stainless-Lang": "my-overriding-header", }, ) - request = client2._build_request(FinalRequestOptions(method="get", url="/foo")) + request = test_client2._build_request(FinalRequestOptions(method="get", url="/foo")) assert request.headers.get("x-foo") == "stainless" assert request.headers.get("x-stainless-lang") == "my-overriding-header" + test_client.close() + test_client2.close() + def test_default_query_option(self) -> None: client = NextbillionSDK( base_url=base_url, api_key=api_key, _strict_response_validation=True, default_query={"query_param": "bar"} @@ -354,8 +364,10 @@ def test_default_query_option(self) -> None: url = httpx.URL(request.url) assert dict(url.params) == {"foo": "baz", "query_param": "overridden"} - def test_request_extra_json(self) -> None: - request = self.client._build_request( + client.close() + + def test_request_extra_json(self, client: NextbillionSDK) -> None: + request = client._build_request( FinalRequestOptions( method="post", url="/foo", @@ -366,7 +378,7 @@ def test_request_extra_json(self) -> None: data = json.loads(request.content.decode("utf-8")) assert data == {"foo": "bar", "baz": False} - request = self.client._build_request( + request = client._build_request( FinalRequestOptions( method="post", url="/foo", @@ -377,7 +389,7 @@ def test_request_extra_json(self) -> None: assert data == {"baz": False} # `extra_json` takes priority over `json_data` when keys clash - request = self.client._build_request( + request = client._build_request( FinalRequestOptions( method="post", url="/foo", @@ -388,8 +400,8 @@ def test_request_extra_json(self) -> None: data = json.loads(request.content.decode("utf-8")) assert data == {"foo": "bar", "baz": None} - def test_request_extra_headers(self) -> None: - request = self.client._build_request( + def test_request_extra_headers(self, client: NextbillionSDK) -> None: + request = client._build_request( FinalRequestOptions( method="post", url="/foo", @@ -399,7 +411,7 @@ def test_request_extra_headers(self) -> None: assert request.headers.get("X-Foo") == "Foo" # `extra_headers` takes priority over `default_headers` when keys clash - request = self.client.with_options(default_headers={"X-Bar": "true"})._build_request( + request = client.with_options(default_headers={"X-Bar": "true"})._build_request( FinalRequestOptions( method="post", url="/foo", @@ -410,8 +422,8 @@ def test_request_extra_headers(self) -> None: ) assert request.headers.get("X-Bar") == "false" - def test_request_extra_query(self) -> None: - request = self.client._build_request( + def test_request_extra_query(self, client: NextbillionSDK) -> None: + request = client._build_request( FinalRequestOptions( method="post", url="/foo", @@ -424,7 +436,7 @@ def test_request_extra_query(self) -> None: assert params == {"my_query_param": "Foo"} # if both `query` and `extra_query` are given, they are merged - request = self.client._build_request( + request = client._build_request( FinalRequestOptions( method="post", url="/foo", @@ -438,7 +450,7 @@ def test_request_extra_query(self) -> None: assert params == {"bar": "1", "foo": "2"} # `extra_query` takes priority over `query` when keys clash - request = self.client._build_request( + request = client._build_request( FinalRequestOptions( method="post", url="/foo", @@ -481,7 +493,7 @@ def test_multipart_repeating_array(self, client: NextbillionSDK) -> None: ] @pytest.mark.respx(base_url=base_url) - def test_basic_union_response(self, respx_mock: MockRouter) -> None: + def test_basic_union_response(self, respx_mock: MockRouter, client: NextbillionSDK) -> None: class Model1(BaseModel): name: str @@ -490,12 +502,12 @@ class Model2(BaseModel): respx_mock.get("/foo").mock(return_value=httpx.Response(200, json={"foo": "bar"})) - response = self.client.get("/foo", cast_to=cast(Any, Union[Model1, Model2])) + response = client.get("/foo", cast_to=cast(Any, Union[Model1, Model2])) assert isinstance(response, Model2) assert response.foo == "bar" @pytest.mark.respx(base_url=base_url) - def test_union_response_different_types(self, respx_mock: MockRouter) -> None: + def test_union_response_different_types(self, respx_mock: MockRouter, client: NextbillionSDK) -> None: """Union of objects with the same field name using a different type""" class Model1(BaseModel): @@ -506,18 +518,20 @@ class Model2(BaseModel): respx_mock.get("/foo").mock(return_value=httpx.Response(200, json={"foo": "bar"})) - response = self.client.get("/foo", cast_to=cast(Any, Union[Model1, Model2])) + response = client.get("/foo", cast_to=cast(Any, Union[Model1, Model2])) assert isinstance(response, Model2) assert response.foo == "bar" respx_mock.get("/foo").mock(return_value=httpx.Response(200, json={"foo": 1})) - response = self.client.get("/foo", cast_to=cast(Any, Union[Model1, Model2])) + response = client.get("/foo", cast_to=cast(Any, Union[Model1, Model2])) assert isinstance(response, Model1) assert response.foo == 1 @pytest.mark.respx(base_url=base_url) - def test_non_application_json_content_type_for_json_data(self, respx_mock: MockRouter) -> None: + def test_non_application_json_content_type_for_json_data( + self, respx_mock: MockRouter, client: NextbillionSDK + ) -> None: """ Response that sets Content-Type to something other than application/json but returns json data """ @@ -533,7 +547,7 @@ class Model(BaseModel): ) ) - response = self.client.get("/foo", cast_to=Model) + response = client.get("/foo", cast_to=Model) assert isinstance(response, Model) assert response.foo == 2 @@ -547,6 +561,8 @@ def test_base_url_setter(self) -> None: assert client.base_url == "https://example.com/from_setter/" + client.close() + def test_base_url_env(self) -> None: with update_env(NEXTBILLION_SDK_BASE_URL="http://localhost:5000/from/env"): client = NextbillionSDK(api_key=api_key, _strict_response_validation=True) @@ -576,6 +592,7 @@ def test_base_url_trailing_slash(self, client: NextbillionSDK) -> None: ), ) assert request.url == "http://localhost:5000/custom/path/foo" + client.close() @pytest.mark.parametrize( "client", @@ -601,6 +618,7 @@ def test_base_url_no_trailing_slash(self, client: NextbillionSDK) -> None: ), ) assert request.url == "http://localhost:5000/custom/path/foo" + client.close() @pytest.mark.parametrize( "client", @@ -626,35 +644,36 @@ def test_absolute_request_url(self, client: NextbillionSDK) -> None: ), ) assert request.url == "https://myapi.com/foo" + client.close() def test_copied_client_does_not_close_http(self) -> None: - client = NextbillionSDK(base_url=base_url, api_key=api_key, _strict_response_validation=True) - assert not client.is_closed() + test_client = NextbillionSDK(base_url=base_url, api_key=api_key, _strict_response_validation=True) + assert not test_client.is_closed() - copied = client.copy() - assert copied is not client + copied = test_client.copy() + assert copied is not test_client del copied - assert not client.is_closed() + assert not test_client.is_closed() def test_client_context_manager(self) -> None: - client = NextbillionSDK(base_url=base_url, api_key=api_key, _strict_response_validation=True) - with client as c2: - assert c2 is client + test_client = NextbillionSDK(base_url=base_url, api_key=api_key, _strict_response_validation=True) + with test_client as c2: + assert c2 is test_client assert not c2.is_closed() - assert not client.is_closed() - assert client.is_closed() + assert not test_client.is_closed() + assert test_client.is_closed() @pytest.mark.respx(base_url=base_url) - def test_client_response_validation_error(self, respx_mock: MockRouter) -> None: + def test_client_response_validation_error(self, respx_mock: MockRouter, client: NextbillionSDK) -> None: class Model(BaseModel): foo: str respx_mock.get("/foo").mock(return_value=httpx.Response(200, json={"foo": {"invalid": True}})) with pytest.raises(APIResponseValidationError) as exc: - self.client.get("/foo", cast_to=Model) + client.get("/foo", cast_to=Model) assert isinstance(exc.value.__cause__, ValidationError) @@ -676,11 +695,14 @@ class Model(BaseModel): with pytest.raises(APIResponseValidationError): strict_client.get("/foo", cast_to=Model) - client = NextbillionSDK(base_url=base_url, api_key=api_key, _strict_response_validation=False) + non_strict_client = NextbillionSDK(base_url=base_url, api_key=api_key, _strict_response_validation=False) - response = client.get("/foo", cast_to=Model) + response = non_strict_client.get("/foo", cast_to=Model) assert isinstance(response, str) # type: ignore[unreachable] + strict_client.close() + non_strict_client.close() + @pytest.mark.parametrize( "remaining_retries,retry_after,timeout", [ @@ -703,9 +725,9 @@ class Model(BaseModel): ], ) @mock.patch("time.time", mock.MagicMock(return_value=1696004797)) - def test_parse_retry_after_header(self, remaining_retries: int, retry_after: str, timeout: float) -> None: - client = NextbillionSDK(base_url=base_url, api_key=api_key, _strict_response_validation=True) - + def test_parse_retry_after_header( + self, remaining_retries: int, retry_after: str, timeout: float, client: NextbillionSDK + ) -> None: headers = httpx.Headers({"retry-after": retry_after}) options = FinalRequestOptions(method="get", url="/foo", max_retries=3) calculated = client._calculate_retry_timeout(remaining_retries, options, headers) @@ -721,7 +743,7 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter, clien destination="41.349302,2.136480", origin="41.349302,2.136480" ).__enter__() - assert _get_open_connections(self.client) == 0 + assert _get_open_connections(client) == 0 @mock.patch("nextbillionai._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) @@ -732,7 +754,7 @@ def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter, client client.directions.with_streaming_response.compute_route( destination="41.349302,2.136480", origin="41.349302,2.136480" ).__enter__() - assert _get_open_connections(self.client) == 0 + assert _get_open_connections(client) == 0 @pytest.mark.parametrize("failures_before_success", [0, 2, 4]) @mock.patch("nextbillionai._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @@ -844,83 +866,77 @@ def test_default_client_creation(self) -> None: ) @pytest.mark.respx(base_url=base_url) - def test_follow_redirects(self, respx_mock: MockRouter) -> None: + def test_follow_redirects(self, respx_mock: MockRouter, client: NextbillionSDK) -> None: # Test that the default follow_redirects=True allows following redirects respx_mock.post("/redirect").mock( return_value=httpx.Response(302, headers={"Location": f"{base_url}/redirected"}) ) respx_mock.get("/redirected").mock(return_value=httpx.Response(200, json={"status": "ok"})) - response = self.client.post("/redirect", body={"key": "value"}, cast_to=httpx.Response) + response = client.post("/redirect", body={"key": "value"}, cast_to=httpx.Response) assert response.status_code == 200 assert response.json() == {"status": "ok"} @pytest.mark.respx(base_url=base_url) - def test_follow_redirects_disabled(self, respx_mock: MockRouter) -> None: + def test_follow_redirects_disabled(self, respx_mock: MockRouter, client: NextbillionSDK) -> None: # Test that follow_redirects=False prevents following redirects respx_mock.post("/redirect").mock( return_value=httpx.Response(302, headers={"Location": f"{base_url}/redirected"}) ) with pytest.raises(APIStatusError) as exc_info: - self.client.post( - "/redirect", body={"key": "value"}, options={"follow_redirects": False}, cast_to=httpx.Response - ) + client.post("/redirect", body={"key": "value"}, options={"follow_redirects": False}, cast_to=httpx.Response) assert exc_info.value.response.status_code == 302 assert exc_info.value.response.headers["Location"] == f"{base_url}/redirected" class TestAsyncNextbillionSDK: - client = AsyncNextbillionSDK(base_url=base_url, api_key=api_key, _strict_response_validation=True) - @pytest.mark.respx(base_url=base_url) - @pytest.mark.asyncio - async def test_raw_response(self, respx_mock: MockRouter) -> None: + async def test_raw_response(self, respx_mock: MockRouter, async_client: AsyncNextbillionSDK) -> None: respx_mock.post("/foo").mock(return_value=httpx.Response(200, json={"foo": "bar"})) - response = await self.client.post("/foo", cast_to=httpx.Response) + response = await async_client.post("/foo", cast_to=httpx.Response) assert response.status_code == 200 assert isinstance(response, httpx.Response) assert response.json() == {"foo": "bar"} @pytest.mark.respx(base_url=base_url) - @pytest.mark.asyncio - async def test_raw_response_for_binary(self, respx_mock: MockRouter) -> None: + async def test_raw_response_for_binary(self, respx_mock: MockRouter, async_client: AsyncNextbillionSDK) -> None: respx_mock.post("/foo").mock( return_value=httpx.Response(200, headers={"Content-Type": "application/binary"}, content='{"foo": "bar"}') ) - response = await self.client.post("/foo", cast_to=httpx.Response) + response = await async_client.post("/foo", cast_to=httpx.Response) assert response.status_code == 200 assert isinstance(response, httpx.Response) assert response.json() == {"foo": "bar"} - def test_copy(self) -> None: - copied = self.client.copy() - assert id(copied) != id(self.client) + def test_copy(self, async_client: AsyncNextbillionSDK) -> None: + copied = async_client.copy() + assert id(copied) != id(async_client) - copied = self.client.copy(api_key="another My API Key") + copied = async_client.copy(api_key="another My API Key") assert copied.api_key == "another My API Key" - assert self.client.api_key == "My API Key" + assert async_client.api_key == "My API Key" - def test_copy_default_options(self) -> None: + def test_copy_default_options(self, async_client: AsyncNextbillionSDK) -> None: # options that have a default are overridden correctly - copied = self.client.copy(max_retries=7) + copied = async_client.copy(max_retries=7) assert copied.max_retries == 7 - assert self.client.max_retries == 2 + assert async_client.max_retries == 2 copied2 = copied.copy(max_retries=6) assert copied2.max_retries == 6 assert copied.max_retries == 7 # timeout - assert isinstance(self.client.timeout, httpx.Timeout) - copied = self.client.copy(timeout=None) + assert isinstance(async_client.timeout, httpx.Timeout) + copied = async_client.copy(timeout=None) assert copied.timeout is None - assert isinstance(self.client.timeout, httpx.Timeout) + assert isinstance(async_client.timeout, httpx.Timeout) - def test_copy_default_headers(self) -> None: + async def test_copy_default_headers(self) -> None: client = AsyncNextbillionSDK( base_url=base_url, api_key=api_key, _strict_response_validation=True, default_headers={"X-Foo": "bar"} ) @@ -953,8 +969,9 @@ def test_copy_default_headers(self) -> None: match="`default_headers` and `set_default_headers` arguments are mutually exclusive", ): client.copy(set_default_headers={}, default_headers={"X-Foo": "Bar"}) + await client.close() - def test_copy_default_query(self) -> None: + async def test_copy_default_query(self) -> None: client = AsyncNextbillionSDK( base_url=base_url, api_key=api_key, _strict_response_validation=True, default_query={"foo": "bar"} ) @@ -990,13 +1007,15 @@ def test_copy_default_query(self) -> None: ): client.copy(set_default_query={}, default_query={"foo": "Bar"}) - def test_copy_signature(self) -> None: + await client.close() + + def test_copy_signature(self, async_client: AsyncNextbillionSDK) -> None: # ensure the same parameters that can be passed to the client are defined in the `.copy()` method init_signature = inspect.signature( # mypy doesn't like that we access the `__init__` property. - self.client.__init__, # type: ignore[misc] + async_client.__init__, # type: ignore[misc] ) - copy_signature = inspect.signature(self.client.copy) + copy_signature = inspect.signature(async_client.copy) exclude_params = {"transport", "proxies", "_strict_response_validation"} for name in init_signature.parameters.keys(): @@ -1007,12 +1026,12 @@ def test_copy_signature(self) -> None: assert copy_param is not None, f"copy() signature is missing the {name} param" @pytest.mark.skipif(sys.version_info >= (3, 10), reason="fails because of a memory leak that started from 3.12") - def test_copy_build_request(self) -> None: + def test_copy_build_request(self, async_client: AsyncNextbillionSDK) -> None: options = FinalRequestOptions(method="get", url="/foo") def build_request(options: FinalRequestOptions) -> None: - client = self.client.copy() - client._build_request(options) + client_copy = async_client.copy() + client_copy._build_request(options) # ensure that the machinery is warmed up before tracing starts. build_request(options) @@ -1069,12 +1088,12 @@ def add_leak(leaks: list[tracemalloc.StatisticDiff], diff: tracemalloc.Statistic print(frame) raise AssertionError() - async def test_request_timeout(self) -> None: - request = self.client._build_request(FinalRequestOptions(method="get", url="/foo")) + async def test_request_timeout(self, async_client: AsyncNextbillionSDK) -> None: + request = async_client._build_request(FinalRequestOptions(method="get", url="/foo")) timeout = httpx.Timeout(**request.extensions["timeout"]) # type: ignore assert timeout == DEFAULT_TIMEOUT - request = self.client._build_request( + request = async_client._build_request( FinalRequestOptions(method="get", url="/foo", timeout=httpx.Timeout(100.0)) ) timeout = httpx.Timeout(**request.extensions["timeout"]) # type: ignore @@ -1089,6 +1108,8 @@ async def test_client_timeout_option(self) -> None: timeout = httpx.Timeout(**request.extensions["timeout"]) # type: ignore assert timeout == httpx.Timeout(0) + await client.close() + async def test_http_client_timeout_option(self) -> None: # custom timeout given to the httpx client should be used async with httpx.AsyncClient(timeout=None) as http_client: @@ -1100,6 +1121,8 @@ async def test_http_client_timeout_option(self) -> None: timeout = httpx.Timeout(**request.extensions["timeout"]) # type: ignore assert timeout == httpx.Timeout(None) + await client.close() + # no timeout given to the httpx client should not use the httpx default async with httpx.AsyncClient() as http_client: client = AsyncNextbillionSDK( @@ -1110,6 +1133,8 @@ async def test_http_client_timeout_option(self) -> None: timeout = httpx.Timeout(**request.extensions["timeout"]) # type: ignore assert timeout == DEFAULT_TIMEOUT + await client.close() + # explicitly passing the default timeout currently results in it being ignored async with httpx.AsyncClient(timeout=HTTPX_DEFAULT_TIMEOUT) as http_client: client = AsyncNextbillionSDK( @@ -1120,6 +1145,8 @@ async def test_http_client_timeout_option(self) -> None: timeout = httpx.Timeout(**request.extensions["timeout"]) # type: ignore assert timeout == DEFAULT_TIMEOUT # our default + await client.close() + def test_invalid_http_client(self) -> None: with pytest.raises(TypeError, match="Invalid `http_client` arg"): with httpx.Client() as http_client: @@ -1130,15 +1157,15 @@ def test_invalid_http_client(self) -> None: http_client=cast(Any, http_client), ) - def test_default_headers_option(self) -> None: - client = AsyncNextbillionSDK( + async def test_default_headers_option(self) -> None: + test_client = AsyncNextbillionSDK( base_url=base_url, api_key=api_key, _strict_response_validation=True, default_headers={"X-Foo": "bar"} ) - request = client._build_request(FinalRequestOptions(method="get", url="/foo")) + request = test_client._build_request(FinalRequestOptions(method="get", url="/foo")) assert request.headers.get("x-foo") == "bar" assert request.headers.get("x-stainless-lang") == "python" - client2 = AsyncNextbillionSDK( + test_client2 = AsyncNextbillionSDK( base_url=base_url, api_key=api_key, _strict_response_validation=True, @@ -1147,11 +1174,14 @@ def test_default_headers_option(self) -> None: "X-Stainless-Lang": "my-overriding-header", }, ) - request = client2._build_request(FinalRequestOptions(method="get", url="/foo")) + request = test_client2._build_request(FinalRequestOptions(method="get", url="/foo")) assert request.headers.get("x-foo") == "stainless" assert request.headers.get("x-stainless-lang") == "my-overriding-header" - def test_default_query_option(self) -> None: + await test_client.close() + await test_client2.close() + + async def test_default_query_option(self) -> None: client = AsyncNextbillionSDK( base_url=base_url, api_key=api_key, _strict_response_validation=True, default_query={"query_param": "bar"} ) @@ -1169,8 +1199,10 @@ def test_default_query_option(self) -> None: url = httpx.URL(request.url) assert dict(url.params) == {"foo": "baz", "query_param": "overridden"} - def test_request_extra_json(self) -> None: - request = self.client._build_request( + await client.close() + + def test_request_extra_json(self, client: NextbillionSDK) -> None: + request = client._build_request( FinalRequestOptions( method="post", url="/foo", @@ -1181,7 +1213,7 @@ def test_request_extra_json(self) -> None: data = json.loads(request.content.decode("utf-8")) assert data == {"foo": "bar", "baz": False} - request = self.client._build_request( + request = client._build_request( FinalRequestOptions( method="post", url="/foo", @@ -1192,7 +1224,7 @@ def test_request_extra_json(self) -> None: assert data == {"baz": False} # `extra_json` takes priority over `json_data` when keys clash - request = self.client._build_request( + request = client._build_request( FinalRequestOptions( method="post", url="/foo", @@ -1203,8 +1235,8 @@ def test_request_extra_json(self) -> None: data = json.loads(request.content.decode("utf-8")) assert data == {"foo": "bar", "baz": None} - def test_request_extra_headers(self) -> None: - request = self.client._build_request( + def test_request_extra_headers(self, client: NextbillionSDK) -> None: + request = client._build_request( FinalRequestOptions( method="post", url="/foo", @@ -1214,7 +1246,7 @@ def test_request_extra_headers(self) -> None: assert request.headers.get("X-Foo") == "Foo" # `extra_headers` takes priority over `default_headers` when keys clash - request = self.client.with_options(default_headers={"X-Bar": "true"})._build_request( + request = client.with_options(default_headers={"X-Bar": "true"})._build_request( FinalRequestOptions( method="post", url="/foo", @@ -1225,8 +1257,8 @@ def test_request_extra_headers(self) -> None: ) assert request.headers.get("X-Bar") == "false" - def test_request_extra_query(self) -> None: - request = self.client._build_request( + def test_request_extra_query(self, client: NextbillionSDK) -> None: + request = client._build_request( FinalRequestOptions( method="post", url="/foo", @@ -1239,7 +1271,7 @@ def test_request_extra_query(self) -> None: assert params == {"my_query_param": "Foo"} # if both `query` and `extra_query` are given, they are merged - request = self.client._build_request( + request = client._build_request( FinalRequestOptions( method="post", url="/foo", @@ -1253,7 +1285,7 @@ def test_request_extra_query(self) -> None: assert params == {"bar": "1", "foo": "2"} # `extra_query` takes priority over `query` when keys clash - request = self.client._build_request( + request = client._build_request( FinalRequestOptions( method="post", url="/foo", @@ -1296,7 +1328,7 @@ def test_multipart_repeating_array(self, async_client: AsyncNextbillionSDK) -> N ] @pytest.mark.respx(base_url=base_url) - async def test_basic_union_response(self, respx_mock: MockRouter) -> None: + async def test_basic_union_response(self, respx_mock: MockRouter, async_client: AsyncNextbillionSDK) -> None: class Model1(BaseModel): name: str @@ -1305,12 +1337,14 @@ class Model2(BaseModel): respx_mock.get("/foo").mock(return_value=httpx.Response(200, json={"foo": "bar"})) - response = await self.client.get("/foo", cast_to=cast(Any, Union[Model1, Model2])) + response = await async_client.get("/foo", cast_to=cast(Any, Union[Model1, Model2])) assert isinstance(response, Model2) assert response.foo == "bar" @pytest.mark.respx(base_url=base_url) - async def test_union_response_different_types(self, respx_mock: MockRouter) -> None: + async def test_union_response_different_types( + self, respx_mock: MockRouter, async_client: AsyncNextbillionSDK + ) -> None: """Union of objects with the same field name using a different type""" class Model1(BaseModel): @@ -1321,18 +1355,20 @@ class Model2(BaseModel): respx_mock.get("/foo").mock(return_value=httpx.Response(200, json={"foo": "bar"})) - response = await self.client.get("/foo", cast_to=cast(Any, Union[Model1, Model2])) + response = await async_client.get("/foo", cast_to=cast(Any, Union[Model1, Model2])) assert isinstance(response, Model2) assert response.foo == "bar" respx_mock.get("/foo").mock(return_value=httpx.Response(200, json={"foo": 1})) - response = await self.client.get("/foo", cast_to=cast(Any, Union[Model1, Model2])) + response = await async_client.get("/foo", cast_to=cast(Any, Union[Model1, Model2])) assert isinstance(response, Model1) assert response.foo == 1 @pytest.mark.respx(base_url=base_url) - async def test_non_application_json_content_type_for_json_data(self, respx_mock: MockRouter) -> None: + async def test_non_application_json_content_type_for_json_data( + self, respx_mock: MockRouter, async_client: AsyncNextbillionSDK + ) -> None: """ Response that sets Content-Type to something other than application/json but returns json data """ @@ -1348,11 +1384,11 @@ class Model(BaseModel): ) ) - response = await self.client.get("/foo", cast_to=Model) + response = await async_client.get("/foo", cast_to=Model) assert isinstance(response, Model) assert response.foo == 2 - def test_base_url_setter(self) -> None: + async def test_base_url_setter(self) -> None: client = AsyncNextbillionSDK( base_url="https://example.com/from_init", api_key=api_key, _strict_response_validation=True ) @@ -1362,7 +1398,9 @@ def test_base_url_setter(self) -> None: assert client.base_url == "https://example.com/from_setter/" - def test_base_url_env(self) -> None: + await client.close() + + async def test_base_url_env(self) -> None: with update_env(NEXTBILLION_SDK_BASE_URL="http://localhost:5000/from/env"): client = AsyncNextbillionSDK(api_key=api_key, _strict_response_validation=True) assert client.base_url == "http://localhost:5000/from/env/" @@ -1382,7 +1420,7 @@ def test_base_url_env(self) -> None: ], ids=["standard", "custom http client"], ) - def test_base_url_trailing_slash(self, client: AsyncNextbillionSDK) -> None: + async def test_base_url_trailing_slash(self, client: AsyncNextbillionSDK) -> None: request = client._build_request( FinalRequestOptions( method="post", @@ -1391,6 +1429,7 @@ def test_base_url_trailing_slash(self, client: AsyncNextbillionSDK) -> None: ), ) assert request.url == "http://localhost:5000/custom/path/foo" + await client.close() @pytest.mark.parametrize( "client", @@ -1407,7 +1446,7 @@ def test_base_url_trailing_slash(self, client: AsyncNextbillionSDK) -> None: ], ids=["standard", "custom http client"], ) - def test_base_url_no_trailing_slash(self, client: AsyncNextbillionSDK) -> None: + async def test_base_url_no_trailing_slash(self, client: AsyncNextbillionSDK) -> None: request = client._build_request( FinalRequestOptions( method="post", @@ -1416,6 +1455,7 @@ def test_base_url_no_trailing_slash(self, client: AsyncNextbillionSDK) -> None: ), ) assert request.url == "http://localhost:5000/custom/path/foo" + await client.close() @pytest.mark.parametrize( "client", @@ -1432,7 +1472,7 @@ def test_base_url_no_trailing_slash(self, client: AsyncNextbillionSDK) -> None: ], ids=["standard", "custom http client"], ) - def test_absolute_request_url(self, client: AsyncNextbillionSDK) -> None: + async def test_absolute_request_url(self, client: AsyncNextbillionSDK) -> None: request = client._build_request( FinalRequestOptions( method="post", @@ -1441,37 +1481,39 @@ def test_absolute_request_url(self, client: AsyncNextbillionSDK) -> None: ), ) assert request.url == "https://myapi.com/foo" + await client.close() async def test_copied_client_does_not_close_http(self) -> None: - client = AsyncNextbillionSDK(base_url=base_url, api_key=api_key, _strict_response_validation=True) - assert not client.is_closed() + test_client = AsyncNextbillionSDK(base_url=base_url, api_key=api_key, _strict_response_validation=True) + assert not test_client.is_closed() - copied = client.copy() - assert copied is not client + copied = test_client.copy() + assert copied is not test_client del copied await asyncio.sleep(0.2) - assert not client.is_closed() + assert not test_client.is_closed() async def test_client_context_manager(self) -> None: - client = AsyncNextbillionSDK(base_url=base_url, api_key=api_key, _strict_response_validation=True) - async with client as c2: - assert c2 is client + test_client = AsyncNextbillionSDK(base_url=base_url, api_key=api_key, _strict_response_validation=True) + async with test_client as c2: + assert c2 is test_client assert not c2.is_closed() - assert not client.is_closed() - assert client.is_closed() + assert not test_client.is_closed() + assert test_client.is_closed() @pytest.mark.respx(base_url=base_url) - @pytest.mark.asyncio - async def test_client_response_validation_error(self, respx_mock: MockRouter) -> None: + async def test_client_response_validation_error( + self, respx_mock: MockRouter, async_client: AsyncNextbillionSDK + ) -> None: class Model(BaseModel): foo: str respx_mock.get("/foo").mock(return_value=httpx.Response(200, json={"foo": {"invalid": True}})) with pytest.raises(APIResponseValidationError) as exc: - await self.client.get("/foo", cast_to=Model) + await async_client.get("/foo", cast_to=Model) assert isinstance(exc.value.__cause__, ValidationError) @@ -1482,7 +1524,6 @@ async def test_client_max_retries_validation(self) -> None: ) @pytest.mark.respx(base_url=base_url) - @pytest.mark.asyncio async def test_received_text_for_expected_json(self, respx_mock: MockRouter) -> None: class Model(BaseModel): name: str @@ -1494,11 +1535,14 @@ class Model(BaseModel): with pytest.raises(APIResponseValidationError): await strict_client.get("/foo", cast_to=Model) - client = AsyncNextbillionSDK(base_url=base_url, api_key=api_key, _strict_response_validation=False) + non_strict_client = AsyncNextbillionSDK(base_url=base_url, api_key=api_key, _strict_response_validation=False) - response = await client.get("/foo", cast_to=Model) + response = await non_strict_client.get("/foo", cast_to=Model) assert isinstance(response, str) # type: ignore[unreachable] + await strict_client.close() + await non_strict_client.close() + @pytest.mark.parametrize( "remaining_retries,retry_after,timeout", [ @@ -1521,13 +1565,12 @@ class Model(BaseModel): ], ) @mock.patch("time.time", mock.MagicMock(return_value=1696004797)) - @pytest.mark.asyncio - async def test_parse_retry_after_header(self, remaining_retries: int, retry_after: str, timeout: float) -> None: - client = AsyncNextbillionSDK(base_url=base_url, api_key=api_key, _strict_response_validation=True) - + async def test_parse_retry_after_header( + self, remaining_retries: int, retry_after: str, timeout: float, async_client: AsyncNextbillionSDK + ) -> None: headers = httpx.Headers({"retry-after": retry_after}) options = FinalRequestOptions(method="get", url="/foo", max_retries=3) - calculated = client._calculate_retry_timeout(remaining_retries, options, headers) + calculated = async_client._calculate_retry_timeout(remaining_retries, options, headers) assert calculated == pytest.approx(timeout, 0.5 * 0.875) # pyright: ignore[reportUnknownMemberType] @mock.patch("nextbillionai._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @@ -1542,7 +1585,7 @@ async def test_retrying_timeout_errors_doesnt_leak( destination="41.349302,2.136480", origin="41.349302,2.136480" ).__aenter__() - assert _get_open_connections(self.client) == 0 + assert _get_open_connections(async_client) == 0 @mock.patch("nextbillionai._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) @@ -1555,12 +1598,11 @@ async def test_retrying_status_errors_doesnt_leak( await async_client.directions.with_streaming_response.compute_route( destination="41.349302,2.136480", origin="41.349302,2.136480" ).__aenter__() - assert _get_open_connections(self.client) == 0 + assert _get_open_connections(async_client) == 0 @pytest.mark.parametrize("failures_before_success", [0, 2, 4]) @mock.patch("nextbillionai._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) - @pytest.mark.asyncio @pytest.mark.parametrize("failure_mode", ["status", "exception"]) async def test_retries_taken( self, @@ -1594,7 +1636,6 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: @pytest.mark.parametrize("failures_before_success", [0, 2, 4]) @mock.patch("nextbillionai._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) - @pytest.mark.asyncio async def test_omit_retry_count_header( self, async_client: AsyncNextbillionSDK, failures_before_success: int, respx_mock: MockRouter ) -> None: @@ -1622,7 +1663,6 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: @pytest.mark.parametrize("failures_before_success", [0, 2, 4]) @mock.patch("nextbillionai._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) - @pytest.mark.asyncio async def test_overwrite_retry_count_header( self, async_client: AsyncNextbillionSDK, failures_before_success: int, respx_mock: MockRouter ) -> None: @@ -1674,26 +1714,26 @@ async def test_default_client_creation(self) -> None: ) @pytest.mark.respx(base_url=base_url) - async def test_follow_redirects(self, respx_mock: MockRouter) -> None: + async def test_follow_redirects(self, respx_mock: MockRouter, async_client: AsyncNextbillionSDK) -> None: # Test that the default follow_redirects=True allows following redirects respx_mock.post("/redirect").mock( return_value=httpx.Response(302, headers={"Location": f"{base_url}/redirected"}) ) respx_mock.get("/redirected").mock(return_value=httpx.Response(200, json={"status": "ok"})) - response = await self.client.post("/redirect", body={"key": "value"}, cast_to=httpx.Response) + response = await async_client.post("/redirect", body={"key": "value"}, cast_to=httpx.Response) assert response.status_code == 200 assert response.json() == {"status": "ok"} @pytest.mark.respx(base_url=base_url) - async def test_follow_redirects_disabled(self, respx_mock: MockRouter) -> None: + async def test_follow_redirects_disabled(self, respx_mock: MockRouter, async_client: AsyncNextbillionSDK) -> None: # Test that follow_redirects=False prevents following redirects respx_mock.post("/redirect").mock( return_value=httpx.Response(302, headers={"Location": f"{base_url}/redirected"}) ) with pytest.raises(APIStatusError) as exc_info: - await self.client.post( + await async_client.post( "/redirect", body={"key": "value"}, options={"follow_redirects": False}, cast_to=httpx.Response ) From 2f6c5f3383dd081bb4bf619880e610f54cb13479 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Nov 2025 06:30:46 +0000 Subject: [PATCH 22/35] chore(internal): codegen related update --- src/nextbillionai/_utils/_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nextbillionai/_utils/_utils.py b/src/nextbillionai/_utils/_utils.py index 50d5926..eec7f4a 100644 --- a/src/nextbillionai/_utils/_utils.py +++ b/src/nextbillionai/_utils/_utils.py @@ -133,7 +133,7 @@ def is_given(obj: _T | NotGiven | Omit) -> TypeGuard[_T]: # Type safe methods for narrowing types with TypeVars. # The default narrowing for isinstance(obj, dict) is dict[unknown, unknown], # however this cause Pyright to rightfully report errors. As we know we don't -# care about the contained types we can safely use `object` in it's place. +# care about the contained types we can safely use `object` in its place. # # There are two separate functions defined, `is_*` and `is_*_t` for different use cases. # `is_*` is for when you're dealing with an unknown input From 6a7e464b26e8176db0ba6a62bf101f82f58dc5c5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 11 Nov 2025 06:21:25 +0000 Subject: [PATCH 23/35] chore(internal): codegen related update --- README.md | 4 ++-- pyproject.toml | 5 ++--- src/nextbillionai/_models.py | 11 +++++++--- src/nextbillionai/_utils/_sync.py | 34 +++---------------------------- tests/test_models.py | 8 ++++---- 5 files changed, 19 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index 8868f15..dd0c901 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![PyPI version](https://img.shields.io/pypi/v/nextbillionai.svg?label=pypi%20(stable))](https://pypi.org/project/nextbillionai/) -The Nextbillion SDK Python library provides convenient access to the Nextbillion SDK REST API from any Python 3.8+ +The Nextbillion SDK Python library provides convenient access to the Nextbillion SDK REST API from any Python 3.9+ application. The library includes type definitions for all request params and response fields, and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx). @@ -404,7 +404,7 @@ print(nextbillionai.__version__) ## Requirements -Python 3.8 or higher. +Python 3.9 or higher. ## Contributing diff --git a/pyproject.toml b/pyproject.toml index 8519708..3b9b2f9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,11 +15,10 @@ dependencies = [ "distro>=1.7.0, <2", "sniffio", ] -requires-python = ">= 3.8" +requires-python = ">= 3.9" classifiers = [ "Typing :: Typed", "Intended Audience :: Developers", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -141,7 +140,7 @@ filterwarnings = [ # there are a couple of flags that are still disabled by # default in strict mode as they are experimental and niche. typeCheckingMode = "strict" -pythonVersion = "3.8" +pythonVersion = "3.9" exclude = [ "_dev", diff --git a/src/nextbillionai/_models.py b/src/nextbillionai/_models.py index 6a3cd1d..fcec2cf 100644 --- a/src/nextbillionai/_models.py +++ b/src/nextbillionai/_models.py @@ -2,6 +2,7 @@ import os import inspect +import weakref from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, Optional, cast from datetime import date, datetime from typing_extensions import ( @@ -573,6 +574,9 @@ class CachedDiscriminatorType(Protocol): __discriminator__: DiscriminatorDetails +DISCRIMINATOR_CACHE: weakref.WeakKeyDictionary[type, DiscriminatorDetails] = weakref.WeakKeyDictionary() + + class DiscriminatorDetails: field_name: str """The name of the discriminator field in the variant class, e.g. @@ -615,8 +619,9 @@ def __init__( def _build_discriminated_union_meta(*, union: type, meta_annotations: tuple[Any, ...]) -> DiscriminatorDetails | None: - if isinstance(union, CachedDiscriminatorType): - return union.__discriminator__ + cached = DISCRIMINATOR_CACHE.get(union) + if cached is not None: + return cached discriminator_field_name: str | None = None @@ -669,7 +674,7 @@ def _build_discriminated_union_meta(*, union: type, meta_annotations: tuple[Any, discriminator_field=discriminator_field_name, discriminator_alias=discriminator_alias, ) - cast(CachedDiscriminatorType, union).__discriminator__ = details + DISCRIMINATOR_CACHE.setdefault(union, details) return details diff --git a/src/nextbillionai/_utils/_sync.py b/src/nextbillionai/_utils/_sync.py index ad7ec71..f6027c1 100644 --- a/src/nextbillionai/_utils/_sync.py +++ b/src/nextbillionai/_utils/_sync.py @@ -1,10 +1,8 @@ from __future__ import annotations -import sys import asyncio import functools -import contextvars -from typing import Any, TypeVar, Callable, Awaitable +from typing import TypeVar, Callable, Awaitable from typing_extensions import ParamSpec import anyio @@ -15,34 +13,11 @@ T_ParamSpec = ParamSpec("T_ParamSpec") -if sys.version_info >= (3, 9): - _asyncio_to_thread = asyncio.to_thread -else: - # backport of https://docs.python.org/3/library/asyncio-task.html#asyncio.to_thread - # for Python 3.8 support - async def _asyncio_to_thread( - func: Callable[T_ParamSpec, T_Retval], /, *args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs - ) -> Any: - """Asynchronously run function *func* in a separate thread. - - Any *args and **kwargs supplied for this function are directly passed - to *func*. Also, the current :class:`contextvars.Context` is propagated, - allowing context variables from the main thread to be accessed in the - separate thread. - - Returns a coroutine that can be awaited to get the eventual result of *func*. - """ - loop = asyncio.events.get_running_loop() - ctx = contextvars.copy_context() - func_call = functools.partial(ctx.run, func, *args, **kwargs) - return await loop.run_in_executor(None, func_call) - - async def to_thread( func: Callable[T_ParamSpec, T_Retval], /, *args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs ) -> T_Retval: if sniffio.current_async_library() == "asyncio": - return await _asyncio_to_thread(func, *args, **kwargs) + return await asyncio.to_thread(func, *args, **kwargs) return await anyio.to_thread.run_sync( functools.partial(func, *args, **kwargs), @@ -53,10 +28,7 @@ async def to_thread( def asyncify(function: Callable[T_ParamSpec, T_Retval]) -> Callable[T_ParamSpec, Awaitable[T_Retval]]: """ Take a blocking function and create an async one that receives the same - positional and keyword arguments. For python version 3.9 and above, it uses - asyncio.to_thread to run the function in a separate thread. For python version - 3.8, it uses locally defined copy of the asyncio.to_thread function which was - introduced in python 3.9. + positional and keyword arguments. Usage: diff --git a/tests/test_models.py b/tests/test_models.py index bc7508e..53ba444 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -9,7 +9,7 @@ from nextbillionai._utils import PropertyInfo from nextbillionai._compat import PYDANTIC_V1, parse_obj, model_dump, model_json -from nextbillionai._models import BaseModel, construct_type +from nextbillionai._models import DISCRIMINATOR_CACHE, BaseModel, construct_type class BasicModel(BaseModel): @@ -809,7 +809,7 @@ class B(BaseModel): UnionType = cast(Any, Union[A, B]) - assert not hasattr(UnionType, "__discriminator__") + assert not DISCRIMINATOR_CACHE.get(UnionType) m = construct_type( value={"type": "b", "data": "foo"}, type_=cast(Any, Annotated[UnionType, PropertyInfo(discriminator="type")]) @@ -818,7 +818,7 @@ class B(BaseModel): assert m.type == "b" assert m.data == "foo" # type: ignore[comparison-overlap] - discriminator = UnionType.__discriminator__ + discriminator = DISCRIMINATOR_CACHE.get(UnionType) assert discriminator is not None m = construct_type( @@ -830,7 +830,7 @@ class B(BaseModel): # if the discriminator details object stays the same between invocations then # we hit the cache - assert UnionType.__discriminator__ is discriminator + assert DISCRIMINATOR_CACHE.get(UnionType) is discriminator @pytest.mark.skipif(PYDANTIC_V1, reason="TypeAliasType is not supported in Pydantic v1") From 2a90cac3860464206e1061da69da2cf0086ac037 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Nov 2025 05:54:06 +0000 Subject: [PATCH 24/35] chore(internal): codegen related update --- src/nextbillionai/_models.py | 41 +++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/src/nextbillionai/_models.py b/src/nextbillionai/_models.py index fcec2cf..ca9500b 100644 --- a/src/nextbillionai/_models.py +++ b/src/nextbillionai/_models.py @@ -257,15 +257,16 @@ def model_dump( mode: Literal["json", "python"] | str = "python", include: IncEx | None = None, exclude: IncEx | None = None, + context: Any | None = None, by_alias: bool | None = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, + exclude_computed_fields: bool = False, round_trip: bool = False, warnings: bool | Literal["none", "warn", "error"] = True, - context: dict[str, Any] | None = None, - serialize_as_any: bool = False, fallback: Callable[[Any], Any] | None = None, + serialize_as_any: bool = False, ) -> dict[str, Any]: """Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump @@ -273,16 +274,24 @@ def model_dump( Args: mode: The mode in which `to_python` should run. - If mode is 'json', the dictionary will only contain JSON serializable types. - If mode is 'python', the dictionary may contain any Python objects. - include: A list of fields to include in the output. - exclude: A list of fields to exclude from the output. + If mode is 'json', the output will only contain JSON serializable types. + If mode is 'python', the output may contain non-JSON-serializable Python objects. + include: A set of fields to include in the output. + exclude: A set of fields to exclude from the output. + context: Additional context to pass to the serializer. by_alias: Whether to use the field's alias in the dictionary key if defined. - exclude_unset: Whether to exclude fields that are unset or None from the output. - exclude_defaults: Whether to exclude fields that are set to their default value from the output. - exclude_none: Whether to exclude fields that have a value of `None` from the output. - round_trip: Whether to enable serialization and deserialization round-trip support. - warnings: Whether to log warnings when invalid fields are encountered. + exclude_unset: Whether to exclude fields that have not been explicitly set. + exclude_defaults: Whether to exclude fields that are set to their default value. + exclude_none: Whether to exclude fields that have a value of `None`. + exclude_computed_fields: Whether to exclude computed fields. + While this can be useful for round-tripping, it is usually recommended to use the dedicated + `round_trip` parameter instead. + round_trip: If True, dumped values should be valid as input for non-idempotent types such as Json[T]. + warnings: How to handle serialization errors. False/"none" ignores them, True/"warn" logs errors, + "error" raises a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError]. + fallback: A function to call when an unknown value is encountered. If not provided, + a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError] error is raised. + serialize_as_any: Whether to serialize fields with duck-typing serialization behavior. Returns: A dictionary representation of the model. @@ -299,6 +308,8 @@ def model_dump( raise ValueError("serialize_as_any is only supported in Pydantic v2") if fallback is not None: raise ValueError("fallback is only supported in Pydantic v2") + if exclude_computed_fields != False: + raise ValueError("exclude_computed_fields is only supported in Pydantic v2") dumped = super().dict( # pyright: ignore[reportDeprecated] include=include, exclude=exclude, @@ -315,15 +326,17 @@ def model_dump_json( self, *, indent: int | None = None, + ensure_ascii: bool = False, include: IncEx | None = None, exclude: IncEx | None = None, + context: Any | None = None, by_alias: bool | None = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, + exclude_computed_fields: bool = False, round_trip: bool = False, warnings: bool | Literal["none", "warn", "error"] = True, - context: dict[str, Any] | None = None, fallback: Callable[[Any], Any] | None = None, serialize_as_any: bool = False, ) -> str: @@ -355,6 +368,10 @@ def model_dump_json( raise ValueError("serialize_as_any is only supported in Pydantic v2") if fallback is not None: raise ValueError("fallback is only supported in Pydantic v2") + if ensure_ascii != False: + raise ValueError("ensure_ascii is only supported in Pydantic v2") + if exclude_computed_fields != False: + raise ValueError("exclude_computed_fields is only supported in Pydantic v2") return super().json( # type: ignore[reportDeprecated] indent=indent, include=include, From 921466dcbb63bbd803a43405da40c41b5f993376 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 22 Nov 2025 05:16:37 +0000 Subject: [PATCH 25/35] chore(internal): codegen related update --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 3b9b2f9..3aa8956 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,6 +24,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: MacOS", From 21a1828acd1d5509dbf6b22bfc1f4bb46b70de9b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 28 Nov 2025 03:50:27 +0000 Subject: [PATCH 26/35] chore(internal): codegen related update --- pyproject.toml | 2 +- requirements-dev.lock | 4 +++- requirements.lock | 8 ++++---- src/nextbillionai/_streaming.py | 22 ++++++++++++---------- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3aa8956..b48784b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,7 @@ managed = true # version pins are in requirements-dev.lock dev-dependencies = [ "pyright==1.1.399", - "mypy", + "mypy==1.17", "respx", "pytest", "pytest-asyncio", diff --git a/requirements-dev.lock b/requirements-dev.lock index 477c9c8..8aca364 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -72,7 +72,7 @@ mdurl==0.1.2 multidict==6.4.4 # via aiohttp # via yarl -mypy==1.14.1 +mypy==1.17.0 mypy-extensions==1.0.0 # via mypy nodeenv==1.8.0 @@ -81,6 +81,8 @@ nox==2023.4.22 packaging==23.2 # via nox # via pytest +pathspec==0.12.1 + # via mypy platformdirs==3.11.0 # via virtualenv pluggy==1.5.0 diff --git a/requirements.lock b/requirements.lock index b1a2c3d..fd791ca 100644 --- a/requirements.lock +++ b/requirements.lock @@ -55,21 +55,21 @@ multidict==6.4.4 propcache==0.3.1 # via aiohttp # via yarl -pydantic==2.11.9 +pydantic==2.12.5 # via nextbillionai -pydantic-core==2.33.2 +pydantic-core==2.41.5 # via pydantic sniffio==1.3.0 # via anyio # via nextbillionai -typing-extensions==4.12.2 +typing-extensions==4.15.0 # via anyio # via multidict # via nextbillionai # via pydantic # via pydantic-core # via typing-inspection -typing-inspection==0.4.1 +typing-inspection==0.4.2 # via pydantic yarl==1.20.0 # via aiohttp diff --git a/src/nextbillionai/_streaming.py b/src/nextbillionai/_streaming.py index f3a4ea1..5e4cf18 100644 --- a/src/nextbillionai/_streaming.py +++ b/src/nextbillionai/_streaming.py @@ -54,11 +54,12 @@ def __stream__(self) -> Iterator[_T]: process_data = self._client._process_response_data iterator = self._iter_events() - for sse in iterator: - yield process_data(data=sse.json(), cast_to=cast_to, response=response) - - # As we might not fully consume the response stream, we need to close it explicitly - response.close() + try: + for sse in iterator: + yield process_data(data=sse.json(), cast_to=cast_to, response=response) + finally: + # Ensure the response is closed even if the consumer doesn't read all data + response.close() def __enter__(self) -> Self: return self @@ -117,11 +118,12 @@ async def __stream__(self) -> AsyncIterator[_T]: process_data = self._client._process_response_data iterator = self._iter_events() - async for sse in iterator: - yield process_data(data=sse.json(), cast_to=cast_to, response=response) - - # As we might not fully consume the response stream, we need to close it explicitly - await response.aclose() + try: + async for sse in iterator: + yield process_data(data=sse.json(), cast_to=cast_to, response=response) + finally: + # Ensure the response is closed even if the consumer doesn't read all data + await response.aclose() async def __aenter__(self) -> Self: return self From 324d8ba43323c2c0b89e55223281a5679cde28ba Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 2 Dec 2025 08:27:45 +0000 Subject: [PATCH 27/35] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 4a7461b..61861ee 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 95 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/nextbillion-ai%2Fnextbillion-sdk-1e5aa8d623200cf13b0f55738d28d0f716eb9c6bc21336bafe77c5e1e6f8515f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/nextbillion-ai%2Fnextbillion-sdk-3b1c8d82ae3012f3c367f77f3524f52e1bd00bbdcb8e94b9148a7ad17dfdec86.yml openapi_spec_hash: 6af51daccd4c91b5d04f71c45dbc31d8 config_hash: 297ad5b2a79da3c4bae12d9bce4efcc7 From f30af773d2ccdc6a9bc60bbaf0719fd7343597d4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 3 Dec 2025 08:17:14 +0000 Subject: [PATCH 28/35] chore(internal): codegen related update --- README.md | 3 +- pyproject.toml | 14 +++--- requirements-dev.lock | 108 +++++++++++++++++++++++------------------- requirements.lock | 31 ++++++------ 4 files changed, 85 insertions(+), 71 deletions(-) diff --git a/README.md b/README.md index dd0c901..b962bc0 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,7 @@ pip install nextbillionai[aiohttp] Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`: ```python +import os import asyncio from nextbillionai import DefaultAioHttpClient from nextbillionai import AsyncNextbillionSDK @@ -92,7 +93,7 @@ from nextbillionai import AsyncNextbillionSDK async def main() -> None: async with AsyncNextbillionSDK( - api_key="My API Key", + api_key=os.environ.get("NEXTBILLION_SDK_API_KEY"), # This is the default and can be omitted http_client=DefaultAioHttpClient(), ) as client: response = await client.directions.compute_route( diff --git a/pyproject.toml b/pyproject.toml index b48784b..f4a44de 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,14 +7,16 @@ license = "Apache-2.0" authors = [ { name = "Nextbillion SDK", email = "yun@nextbillion.ai" }, ] + dependencies = [ - "httpx>=0.23.0, <1", - "pydantic>=1.9.0, <3", - "typing-extensions>=4.10, <5", - "anyio>=3.5.0, <5", - "distro>=1.7.0, <2", - "sniffio", + "httpx>=0.23.0, <1", + "pydantic>=1.9.0, <3", + "typing-extensions>=4.10, <5", + "anyio>=3.5.0, <5", + "distro>=1.7.0, <2", + "sniffio", ] + requires-python = ">= 3.9" classifiers = [ "Typing :: Typed", diff --git a/requirements-dev.lock b/requirements-dev.lock index 8aca364..b005a28 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -12,40 +12,45 @@ -e file:. aiohappyeyeballs==2.6.1 # via aiohttp -aiohttp==3.12.8 +aiohttp==3.13.2 # via httpx-aiohttp # via nextbillionai -aiosignal==1.3.2 +aiosignal==1.4.0 # via aiohttp -annotated-types==0.6.0 +annotated-types==0.7.0 # via pydantic -anyio==4.4.0 +anyio==4.12.0 # via httpx # via nextbillionai -argcomplete==3.1.2 +argcomplete==3.6.3 # via nox async-timeout==5.0.1 # via aiohttp -attrs==25.3.0 +attrs==25.4.0 # via aiohttp -certifi==2023.7.22 + # via nox +backports-asyncio-runner==1.2.0 + # via pytest-asyncio +certifi==2025.11.12 # via httpcore # via httpx -colorlog==6.7.0 +colorlog==6.10.1 + # via nox +dependency-groups==1.3.1 # via nox -dirty-equals==0.6.0 -distlib==0.3.7 +dirty-equals==0.11 +distlib==0.4.0 # via virtualenv -distro==1.8.0 +distro==1.9.0 # via nextbillionai -exceptiongroup==1.2.2 +exceptiongroup==1.3.1 # via anyio # via pytest -execnet==2.1.1 +execnet==2.1.2 # via pytest-xdist -filelock==3.12.4 +filelock==3.19.1 # via virtualenv -frozenlist==1.6.2 +frozenlist==1.8.0 # via aiohttp # via aiosignal h11==0.16.0 @@ -58,82 +63,87 @@ httpx==0.28.1 # via respx httpx-aiohttp==0.1.9 # via nextbillionai -idna==3.4 +humanize==4.13.0 + # via nox +idna==3.11 # via anyio # via httpx # via yarl -importlib-metadata==7.0.0 -iniconfig==2.0.0 +importlib-metadata==8.7.0 +iniconfig==2.1.0 # via pytest markdown-it-py==3.0.0 # via rich mdurl==0.1.2 # via markdown-it-py -multidict==6.4.4 +multidict==6.7.0 # via aiohttp # via yarl mypy==1.17.0 -mypy-extensions==1.0.0 +mypy-extensions==1.1.0 # via mypy -nodeenv==1.8.0 +nodeenv==1.9.1 # via pyright -nox==2023.4.22 -packaging==23.2 +nox==2025.11.12 +packaging==25.0 + # via dependency-groups # via nox # via pytest pathspec==0.12.1 # via mypy -platformdirs==3.11.0 +platformdirs==4.4.0 # via virtualenv -pluggy==1.5.0 +pluggy==1.6.0 # via pytest -propcache==0.3.1 +propcache==0.4.1 # via aiohttp # via yarl -pydantic==2.11.9 +pydantic==2.12.5 # via nextbillionai -pydantic-core==2.33.2 +pydantic-core==2.41.5 # via pydantic -pygments==2.18.0 +pygments==2.19.2 + # via pytest # via rich pyright==1.1.399 -pytest==8.3.3 +pytest==8.4.2 # via pytest-asyncio # via pytest-xdist -pytest-asyncio==0.24.0 -pytest-xdist==3.7.0 -python-dateutil==2.8.2 +pytest-asyncio==1.2.0 +pytest-xdist==3.8.0 +python-dateutil==2.9.0.post0 # via time-machine -pytz==2023.3.post1 - # via dirty-equals respx==0.22.0 -rich==13.7.1 -ruff==0.9.4 -setuptools==68.2.2 - # via nodeenv -six==1.16.0 +rich==14.2.0 +ruff==0.14.7 +six==1.17.0 # via python-dateutil -sniffio==1.3.0 - # via anyio +sniffio==1.3.1 # via nextbillionai -time-machine==2.9.0 -tomli==2.0.2 +time-machine==2.19.0 +tomli==2.3.0 + # via dependency-groups # via mypy + # via nox # via pytest -typing-extensions==4.12.2 +typing-extensions==4.15.0 + # via aiosignal # via anyio + # via exceptiongroup # via multidict # via mypy # via nextbillionai # via pydantic # via pydantic-core # via pyright + # via pytest-asyncio # via typing-inspection -typing-inspection==0.4.1 + # via virtualenv +typing-inspection==0.4.2 # via pydantic -virtualenv==20.24.5 +virtualenv==20.35.4 # via nox -yarl==1.20.0 +yarl==1.22.0 # via aiohttp -zipp==3.17.0 +zipp==3.23.0 # via importlib-metadata diff --git a/requirements.lock b/requirements.lock index fd791ca..da45b39 100644 --- a/requirements.lock +++ b/requirements.lock @@ -12,28 +12,28 @@ -e file:. aiohappyeyeballs==2.6.1 # via aiohttp -aiohttp==3.12.8 +aiohttp==3.13.2 # via httpx-aiohttp # via nextbillionai -aiosignal==1.3.2 +aiosignal==1.4.0 # via aiohttp -annotated-types==0.6.0 +annotated-types==0.7.0 # via pydantic -anyio==4.4.0 +anyio==4.12.0 # via httpx # via nextbillionai async-timeout==5.0.1 # via aiohttp -attrs==25.3.0 +attrs==25.4.0 # via aiohttp -certifi==2023.7.22 +certifi==2025.11.12 # via httpcore # via httpx -distro==1.8.0 +distro==1.9.0 # via nextbillionai -exceptiongroup==1.2.2 +exceptiongroup==1.3.1 # via anyio -frozenlist==1.6.2 +frozenlist==1.8.0 # via aiohttp # via aiosignal h11==0.16.0 @@ -45,25 +45,26 @@ httpx==0.28.1 # via nextbillionai httpx-aiohttp==0.1.9 # via nextbillionai -idna==3.4 +idna==3.11 # via anyio # via httpx # via yarl -multidict==6.4.4 +multidict==6.7.0 # via aiohttp # via yarl -propcache==0.3.1 +propcache==0.4.1 # via aiohttp # via yarl pydantic==2.12.5 # via nextbillionai pydantic-core==2.41.5 # via pydantic -sniffio==1.3.0 - # via anyio +sniffio==1.3.1 # via nextbillionai typing-extensions==4.15.0 + # via aiosignal # via anyio + # via exceptiongroup # via multidict # via nextbillionai # via pydantic @@ -71,5 +72,5 @@ typing-extensions==4.15.0 # via typing-inspection typing-inspection==0.4.2 # via pydantic -yarl==1.20.0 +yarl==1.22.0 # via aiohttp From 4a1a76794f9f1b4b775dc8db3f8184377c84a9f7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 9 Dec 2025 05:53:44 +0000 Subject: [PATCH 29/35] chore(internal): codegen related update --- src/nextbillionai/_types.py | 5 +- src/nextbillionai/types/access.py | 4 ++ src/nextbillionai/types/address.py | 2 + .../types/autocomplete_suggest_response.py | 8 +++ .../types/autosuggest_suggest_response.py | 8 +++ .../types/browse_search_response.py | 8 +++ .../types/direction_compute_route_response.py | 54 ++++++++++++++ .../types/discover_retrieve_response.py | 8 +++ ...document_template_content_request_param.py | 13 ++++ .../document_template_content_response.py | 12 ++++ .../document_template_create_response.py | 2 + .../document_template_list_response.py | 4 ++ .../document_template_retrieve_response.py | 2 + .../document_template_update_response.py | 2 + .../types/fleetify/route_create_params.py | 4 ++ .../types/fleetify/route_create_response.py | 7 ++ .../fleetify/route_redispatch_response.py | 15 ++++ .../routes/route_step_geofence_config.py | 4 ++ .../route_step_geofence_config_param.py | 4 ++ .../routes/route_steps_request_param.py | 4 ++ .../fleetify/routes/route_steps_response.py | 4 ++ .../fleetify/routes/step_create_params.py | 4 ++ .../fleetify/routes/step_update_params.py | 4 ++ .../types/fleetify/routing_response.py | 6 ++ .../types/geocode_batch_create_response.py | 2 + .../types/geocode_retrieve_response.py | 8 +++ .../geocode_structured_retrieve_response.py | 8 +++ .../types/geofence/batch_create_response.py | 2 + .../types/geofence/console_preview_params.py | 26 +++++++ src/nextbillionai/types/geofence/geofence.py | 2 + .../types/geofence/polygon_geojson.py | 5 ++ .../types/geofence_create_params.py | 26 +++++++ .../types/geofence_create_response.py | 2 + .../types/geofence_entity_create_param.py | 26 +++++++ .../types/geofence_update_params.py | 28 ++++++++ .../types/isochrone_compute_response.py | 6 ++ src/nextbillionai/types/map_view.py | 4 ++ .../types/multigeocode/place_create_params.py | 12 ++++ .../types/multigeocode/place_item.py | 10 +++ .../types/multigeocode/place_item_param.py | 10 +++ .../multigeocode/place_retrieve_response.py | 4 ++ .../types/multigeocode/place_update_params.py | 4 ++ .../types/multigeocode_search_params.py | 2 + .../types/multigeocode_search_response.py | 2 + .../navigation_retrieve_route_response.py | 32 +++++++++ .../driver_assignment_assign_params.py | 27 +++++++ .../driver_assignment_assign_response.py | 8 +++ .../types/optimization/job_param.py | 6 ++ .../types/optimization/location.py | 2 + .../types/optimization/location_param.py | 2 + .../types/optimization/shipment_param.py | 10 +++ .../v2_retrieve_result_response.py | 12 ++++ .../types/optimization/v2_submit_params.py | 70 +++++++++++++++++++ .../types/optimization_compute_response.py | 8 +++ .../types/optimization_re_optimize_params.py | 12 ++++ src/nextbillionai/types/position.py | 2 + .../postalcode_retrieve_coordinates_params.py | 6 ++ ...ostalcode_retrieve_coordinates_response.py | 18 +++++ .../types/revgeocode_retrieve_response.py | 8 +++ .../types/route_report_create_response.py | 14 ++++ .../types/skynet/asset/event_list_response.py | 16 +++++ .../asset/location_get_last_response.py | 4 ++ .../skynet/asset/location_list_response.py | 9 +++ .../types/skynet/asset/track_location.py | 7 ++ .../types/skynet/asset_create_response.py | 2 + .../types/skynet/asset_details.py | 6 ++ .../types/skynet/asset_list_response.py | 2 + .../types/skynet/asset_retrieve_response.py | 2 + .../types/skynet/asset_track_params.py | 10 +++ .../types/skynet/config_retrieve_response.py | 2 + src/nextbillionai/types/skynet/monitor.py | 14 ++++ .../types/skynet/monitor_create_params.py | 25 +++++++ .../types/skynet/monitor_create_response.py | 2 + .../types/skynet/monitor_list_response.py | 2 + .../types/skynet/monitor_retrieve_response.py | 2 + .../types/skynet/monitor_update_params.py | 22 ++++++ .../namespaced_apikey_create_response.py | 2 + src/nextbillionai/types/skynet/pagination.py | 5 ++ .../skynet/search/polygon_create_params.py | 19 +++++ .../types/skynet/search_response.py | 6 ++ .../types/skynet/trip_get_summary_response.py | 4 ++ .../types/skynet/trip_retrieve_response.py | 4 ++ .../types/snap_to_road_snap_response.py | 15 ++++ 83 files changed, 794 insertions(+), 2 deletions(-) diff --git a/src/nextbillionai/_types.py b/src/nextbillionai/_types.py index 815f94e..5d44f96 100644 --- a/src/nextbillionai/_types.py +++ b/src/nextbillionai/_types.py @@ -243,6 +243,9 @@ class HttpxSendArgs(TypedDict, total=False): if TYPE_CHECKING: # This works because str.__contains__ does not accept object (either in typeshed or at runtime) # https://github.com/hauntsaninja/useful_types/blob/5e9710f3875107d068e7679fd7fec9cfab0eff3b/useful_types/__init__.py#L285 + # + # Note: index() and count() methods are intentionally omitted to allow pyright to properly + # infer TypedDict types when dict literals are used in lists assigned to SequenceNotStr. class SequenceNotStr(Protocol[_T_co]): @overload def __getitem__(self, index: SupportsIndex, /) -> _T_co: ... @@ -251,8 +254,6 @@ def __getitem__(self, index: slice, /) -> Sequence[_T_co]: ... def __contains__(self, value: object, /) -> bool: ... def __len__(self) -> int: ... def __iter__(self) -> Iterator[_T_co]: ... - def index(self, value: Any, start: int = 0, stop: int = ..., /) -> int: ... - def count(self, value: Any, /) -> int: ... def __reversed__(self) -> Iterator[_T_co]: ... else: # just point this to a normal `Sequence` at runtime to avoid having to special case diff --git a/src/nextbillionai/types/access.py b/src/nextbillionai/types/access.py index cda9194..16007c6 100644 --- a/src/nextbillionai/types/access.py +++ b/src/nextbillionai/types/access.py @@ -8,6 +8,10 @@ class Access(BaseModel): + """ + An array returning the location coordinates of all the access points of the search result. + """ + lat: Optional[float] = None """The latitude of the access point of the search result.""" diff --git a/src/nextbillionai/types/address.py b/src/nextbillionai/types/address.py index da8f060..8f9b658 100644 --- a/src/nextbillionai/types/address.py +++ b/src/nextbillionai/types/address.py @@ -10,6 +10,8 @@ class Address(BaseModel): + """Postal address of the result item.""" + city: Optional[str] = None """The name of the primary locality of the place.""" diff --git a/src/nextbillionai/types/autocomplete_suggest_response.py b/src/nextbillionai/types/autocomplete_suggest_response.py index c55a46f..ee0b141 100644 --- a/src/nextbillionai/types/autocomplete_suggest_response.py +++ b/src/nextbillionai/types/autocomplete_suggest_response.py @@ -24,6 +24,8 @@ class ItemOpeningHoursTimeRangeEndTime(BaseModel): + """Returns the closing time details.""" + date: Optional[str] = None """The date to which the subsequent closing time details belong to.""" @@ -35,6 +37,8 @@ class ItemOpeningHoursTimeRangeEndTime(BaseModel): class ItemOpeningHoursTimeRangeStartTime(BaseModel): + """Returns the open time details.""" + date: Optional[str] = None """The date to which the subsequent open time details belong to.""" @@ -54,6 +58,8 @@ class ItemOpeningHoursTimeRange(BaseModel): class ItemOpeningHours(BaseModel): + """Returns the operating hours of the place, if available.""" + time_ranges: Optional[List[ItemOpeningHoursTimeRange]] = FieldInfo(alias="timeRanges", default=None) """ A collection of attributes with details about the opening and closing hours for @@ -62,6 +68,8 @@ class ItemOpeningHours(BaseModel): class ItemScoring(BaseModel): + """Score of the result. A higher score indicates a closer match.""" + field_score: Optional[object] = FieldInfo(alias="fieldScore", default=None) """ A breakdown of how closely individual field of the result matched with the diff --git a/src/nextbillionai/types/autosuggest_suggest_response.py b/src/nextbillionai/types/autosuggest_suggest_response.py index c4ae7f4..f476210 100644 --- a/src/nextbillionai/types/autosuggest_suggest_response.py +++ b/src/nextbillionai/types/autosuggest_suggest_response.py @@ -24,6 +24,8 @@ class ItemOpeningHoursTimeRangeEndTime(BaseModel): + """Returns the closing time details.""" + date: Optional[str] = None """The date to which the subsequent closing time details belong to.""" @@ -35,6 +37,8 @@ class ItemOpeningHoursTimeRangeEndTime(BaseModel): class ItemOpeningHoursTimeRangeStartTime(BaseModel): + """Returns the open time details.""" + date: Optional[str] = None """The date to which the subsequent open time details belong to.""" @@ -54,6 +58,8 @@ class ItemOpeningHoursTimeRange(BaseModel): class ItemOpeningHours(BaseModel): + """Returns the operating hours of the place, if available.""" + time_ranges: Optional[List[ItemOpeningHoursTimeRange]] = FieldInfo(alias="timeRanges", default=None) """ A collection of attributes with details about the opening and closing hours for @@ -62,6 +68,8 @@ class ItemOpeningHours(BaseModel): class ItemScoring(BaseModel): + """Score of the result. A higher score indicates a closer match.""" + field_score: Optional[object] = FieldInfo(alias="fieldScore", default=None) """ A breakdown of how closely individual field of the result matched with the diff --git a/src/nextbillionai/types/browse_search_response.py b/src/nextbillionai/types/browse_search_response.py index 4a66533..20be96a 100644 --- a/src/nextbillionai/types/browse_search_response.py +++ b/src/nextbillionai/types/browse_search_response.py @@ -24,6 +24,8 @@ class ItemOpeningHoursTimeRangeEndTime(BaseModel): + """Returns the closing time details.""" + date: Optional[str] = None """The date to which the subsequent closing time details belong to.""" @@ -35,6 +37,8 @@ class ItemOpeningHoursTimeRangeEndTime(BaseModel): class ItemOpeningHoursTimeRangeStartTime(BaseModel): + """Returns the open time details.""" + date: Optional[str] = None """The date to which the subsequent open time details belong to.""" @@ -54,6 +58,8 @@ class ItemOpeningHoursTimeRange(BaseModel): class ItemOpeningHours(BaseModel): + """Returns the operating hours of the place, if available.""" + time_ranges: Optional[List[ItemOpeningHoursTimeRange]] = FieldInfo(alias="timeRanges", default=None) """ A collection of attributes with details about the opening and closing hours for @@ -62,6 +68,8 @@ class ItemOpeningHours(BaseModel): class ItemScoring(BaseModel): + """Score of the result. A higher score indicates a closer match.""" + field_score: Optional[object] = FieldInfo(alias="fieldScore", default=None) """ A breakdown of how closely individual field of the result matched with the diff --git a/src/nextbillionai/types/direction_compute_route_response.py b/src/nextbillionai/types/direction_compute_route_response.py index c6783ce..c80cfe4 100644 --- a/src/nextbillionai/types/direction_compute_route_response.py +++ b/src/nextbillionai/types/direction_compute_route_response.py @@ -29,6 +29,11 @@ class RouteEndLocation(BaseModel): + """Location coordinates of the point where the route ends. + + It is the same as the destination in the input request. Returned only when steps is true in the input request. + """ + latitude: Optional[float] = None """latitude of the start_location.""" @@ -37,6 +42,8 @@ class RouteEndLocation(BaseModel): class RouteGeojsonGeometry(BaseModel): + """An object with details of the geoJSON geometry of the route.""" + coordinates: Optional[List[float]] = None """ An array of coordinates in the [longitude, latitude] format, representing the @@ -48,6 +55,11 @@ class RouteGeojsonGeometry(BaseModel): class RouteGeojson(BaseModel): + """An object with geoJSON details of the route. + + This object is returned when the geometry field is set to geojson in the input request, otherwise it is not present in the response. The contents of this object follow the [geoJSON standard](https://datatracker.ietf.org/doc/html/rfc7946). + """ + geometry: Optional[RouteGeojsonGeometry] = None """An object with details of the geoJSON geometry of the route.""" @@ -59,14 +71,23 @@ class RouteGeojson(BaseModel): class RouteLegDistance(BaseModel): + """An object containing leg distance value, in meters.""" + value: Optional[float] = None class RouteLegDuration(BaseModel): + """An object containing leg duration value, in seconds.""" + value: Optional[float] = None class RouteLegEndLocation(BaseModel): + """Location coordinates of the point where the leg ends. + + Returned only when steps is true in the input request. + """ + latitude: Optional[float] = None """Latitude of the end_location of the leg.""" @@ -75,6 +96,11 @@ class RouteLegEndLocation(BaseModel): class RouteLegStartLocation(BaseModel): + """Location coordinates of the point where the leg starts. + + Returned only when steps is true in the input request. + """ + latitude: Optional[float] = None """Latitude of the start_location of the leg.""" @@ -83,14 +109,20 @@ class RouteLegStartLocation(BaseModel): class RouteLegStepDistance(BaseModel): + """An object containing step distance value, in meters.""" + value: Optional[float] = None class RouteLegStepDuration(BaseModel): + """An object containing step duration value, in seconds.""" + value: Optional[float] = None class RouteLegStepEndLocation(BaseModel): + """Location coordinates of the point where the step ends.""" + latitude: Optional[float] = None """Latitude of the end_location of the step.""" @@ -99,6 +131,8 @@ class RouteLegStepEndLocation(BaseModel): class RouteLegStepGeojsonGeometry(BaseModel): + """An object with details of the geoJSON geometry of the step.""" + coordinates: Optional[List[float]] = None """ An array of coordinates in the [longitude, latitude] format, representing the @@ -110,6 +144,10 @@ class RouteLegStepGeojsonGeometry(BaseModel): class RouteLegStepGeojson(BaseModel): + """ + An object with geoJSON details of the step.This object is returned when the geometry field is set to geojson in the input request, otherwise it is not present in the response. The contents of this object follow the [geoJSON standard](https://datatracker.ietf.org/doc/html/rfc7946). + """ + geometry: Optional[RouteLegStepGeojsonGeometry] = None """An object with details of the geoJSON geometry of the step.""" @@ -121,6 +159,8 @@ class RouteLegStepGeojson(BaseModel): class RouteLegStepManeuverCoordinate(BaseModel): + """A coordinate pair describing the location of the maneuver.""" + latitude: Optional[float] = None """Latitude of the maneuver location.""" @@ -129,6 +169,8 @@ class RouteLegStepManeuverCoordinate(BaseModel): class RouteLegStepManeuver(BaseModel): + """An object with maneuver details for the step.""" + bearing_after: Optional[int] = None """ The clockwise angle from true north to the direction of travel immediately after @@ -152,6 +194,8 @@ class RouteLegStepManeuver(BaseModel): class RouteLegStepStartLocation(BaseModel): + """Location coordinates of the point where the step starts.""" + latitude: Optional[float] = None """Latitude of the start_location of the step.""" @@ -215,6 +259,11 @@ class RouteLeg(BaseModel): class RouteStartLocation(BaseModel): + """Location coordinates of the point where the route starts. + + It is the same as the origin in the input request. Returned only when steps is true in the input request. + """ + latitude: Optional[float] = None """Latitude of the start_location.""" @@ -223,6 +272,11 @@ class RouteStartLocation(BaseModel): class Route(BaseModel): + """An object containing details about the returned route. + + Will contain multiple objects if more than one routes are present in the response. + """ + distance: Optional[float] = None """The distance, in meters, for the complete trip.""" diff --git a/src/nextbillionai/types/discover_retrieve_response.py b/src/nextbillionai/types/discover_retrieve_response.py index ae6e326..9094410 100644 --- a/src/nextbillionai/types/discover_retrieve_response.py +++ b/src/nextbillionai/types/discover_retrieve_response.py @@ -24,6 +24,8 @@ class ItemOpeningHoursTimeRangeEndTime(BaseModel): + """Returns the closing time details.""" + date: Optional[str] = None """The date to which the subsequent closing time details belong to.""" @@ -35,6 +37,8 @@ class ItemOpeningHoursTimeRangeEndTime(BaseModel): class ItemOpeningHoursTimeRangeStartTime(BaseModel): + """Returns the open time details.""" + date: Optional[str] = None """The date to which the subsequent open time details belong to.""" @@ -54,6 +58,8 @@ class ItemOpeningHoursTimeRange(BaseModel): class ItemOpeningHours(BaseModel): + """Returns the operating hours of the place, if available.""" + time_ranges: Optional[List[ItemOpeningHoursTimeRange]] = FieldInfo(alias="timeRanges", default=None) """ A collection of attributes with details about the opening and closing hours for @@ -62,6 +68,8 @@ class ItemOpeningHours(BaseModel): class ItemScoring(BaseModel): + """Score of the result. A higher score indicates a closer match.""" + field_score: Optional[object] = FieldInfo(alias="fieldScore", default=None) """ A breakdown of how closely individual field of the result matched with the diff --git a/src/nextbillionai/types/fleetify/document_template_content_request_param.py b/src/nextbillionai/types/fleetify/document_template_content_request_param.py index 6c21603..ce5974c 100644 --- a/src/nextbillionai/types/fleetify/document_template_content_request_param.py +++ b/src/nextbillionai/types/fleetify/document_template_content_request_param.py @@ -20,6 +20,10 @@ class MetaOption(TypedDict, total=False): class Meta(TypedDict, total=False): + """ + An object to define additional information required for single_choice or multi_choices type document items. + """ + options: Required[Iterable[MetaOption]] """ An array of objects to define options for a multi_choices or single_choice type @@ -28,6 +32,11 @@ class Meta(TypedDict, total=False): class Validation(TypedDict, total=False): + """Specify the validation rules for the field. + + This can be used to enforce data quality and integrity checks. For example, if the field is a number type, validation can define constraints like minimum / maximum number values. + """ + max: int """Specifies the maximum allowed value for number type document field. @@ -56,6 +65,10 @@ class Validation(TypedDict, total=False): class DocumentTemplateContentRequestParam(TypedDict, total=False): + """ + An object to collect the details of form fields - data structures, validation rules - for collecting required information after successfully executing a route step. + """ + label: Required[str] """Specify the label or the name of the field. diff --git a/src/nextbillionai/types/fleetify/document_template_content_response.py b/src/nextbillionai/types/fleetify/document_template_content_response.py index 9b27323..12f92b9 100644 --- a/src/nextbillionai/types/fleetify/document_template_content_response.py +++ b/src/nextbillionai/types/fleetify/document_template_content_response.py @@ -19,6 +19,10 @@ class MetaOption(BaseModel): class Meta(BaseModel): + """ + Returns the options configured for single_choice or multi_choices type document items. + """ + options: Optional[List[MetaOption]] = None """ An array of objects returning the options for multi_choices or single_choice @@ -27,6 +31,10 @@ class Meta(BaseModel): class Validation(BaseModel): + """ + Returns the validation rules for number , multi_choices , and photos document field types. + """ + max: Optional[int] = None """ Returns the maximum allowed value for number type document item, as specified at @@ -57,6 +65,10 @@ class Validation(BaseModel): class DocumentTemplateContentResponse(BaseModel): + """ + An array of objects returning the details of data structures and validation rules and other properties of all document fields. Each object represents one document field. + """ + label: Optional[str] = None """Returns the label of the document field.""" diff --git a/src/nextbillionai/types/fleetify/document_template_create_response.py b/src/nextbillionai/types/fleetify/document_template_create_response.py index 82afce8..8e4ce77 100644 --- a/src/nextbillionai/types/fleetify/document_template_create_response.py +++ b/src/nextbillionai/types/fleetify/document_template_create_response.py @@ -9,6 +9,8 @@ class Data(BaseModel): + """An object returning the details of the document template created.""" + id: Optional[str] = None """Returns the unique ID of the document template created.""" diff --git a/src/nextbillionai/types/fleetify/document_template_list_response.py b/src/nextbillionai/types/fleetify/document_template_list_response.py index 47b4dc4..ddf4efe 100644 --- a/src/nextbillionai/types/fleetify/document_template_list_response.py +++ b/src/nextbillionai/types/fleetify/document_template_list_response.py @@ -9,6 +9,10 @@ class Data(BaseModel): + """ + An array of objects returning the details of each document template associated with the specified API key. Each object represents one document template. In case there are no templates associated with the given key, a blank array is returned. + """ + id: Optional[str] = None """Returns the unique ID of the document template.""" diff --git a/src/nextbillionai/types/fleetify/document_template_retrieve_response.py b/src/nextbillionai/types/fleetify/document_template_retrieve_response.py index a5bd8f7..3ae6b7b 100644 --- a/src/nextbillionai/types/fleetify/document_template_retrieve_response.py +++ b/src/nextbillionai/types/fleetify/document_template_retrieve_response.py @@ -9,6 +9,8 @@ class Data(BaseModel): + """An object returning the details of the requested document template.""" + id: Optional[str] = None """Returns the unique identifier of the document template.""" diff --git a/src/nextbillionai/types/fleetify/document_template_update_response.py b/src/nextbillionai/types/fleetify/document_template_update_response.py index 8567019..5f6508b 100644 --- a/src/nextbillionai/types/fleetify/document_template_update_response.py +++ b/src/nextbillionai/types/fleetify/document_template_update_response.py @@ -9,6 +9,8 @@ class Data(BaseModel): + """An object returning the details of the updated document template.""" + id: Optional[str] = None """Returns the unique ID of the document template.""" diff --git a/src/nextbillionai/types/fleetify/route_create_params.py b/src/nextbillionai/types/fleetify/route_create_params.py index 24c521d..47ed156 100644 --- a/src/nextbillionai/types/fleetify/route_create_params.py +++ b/src/nextbillionai/types/fleetify/route_create_params.py @@ -81,6 +81,10 @@ class RouteCreateParams(TypedDict, total=False): class Routing(TypedDict, total=False): + """ + The routing object allows defining the routing characteristics that should be used to generate a route when the Driver uses the in-app navigation. Only car mode is supported currently. + """ + approaches: Literal["unrestricted", "curb"] """ Specify the side of the road from which the route should approach the step diff --git a/src/nextbillionai/types/fleetify/route_create_response.py b/src/nextbillionai/types/fleetify/route_create_response.py index 712f12e..90ffc2b 100644 --- a/src/nextbillionai/types/fleetify/route_create_response.py +++ b/src/nextbillionai/types/fleetify/route_create_response.py @@ -10,6 +10,8 @@ class DataDriver(BaseModel): + """An object returning the details of the driver to whom the route was dispatched.""" + id: Optional[str] = None """ Returns the ID of the driver as specified in the @@ -30,6 +32,11 @@ class DataDriver(BaseModel): class Data(BaseModel): + """An array of objects containing the details of each step in the dispatched route. + + Each object represents a single step. + """ + id: Optional[str] = None """Returns the unique ID of the dispatched route.""" diff --git a/src/nextbillionai/types/fleetify/route_redispatch_response.py b/src/nextbillionai/types/fleetify/route_redispatch_response.py index 856909a..b1a8d1b 100644 --- a/src/nextbillionai/types/fleetify/route_redispatch_response.py +++ b/src/nextbillionai/types/fleetify/route_redispatch_response.py @@ -18,6 +18,8 @@ class DataCompletion(BaseModel): + """Returns the completion status of the route.""" + status: Optional[Literal["scheduled", "completed"]] = None """Returns the status of the route. @@ -26,6 +28,8 @@ class DataCompletion(BaseModel): class DataDriver(BaseModel): + """An object returning the details of the driver to whom the route was dispatched.""" + id: Optional[str] = None """ Returns the ID of the driver as specified in the @@ -46,6 +50,8 @@ class DataDriver(BaseModel): class DataStepsCompletion(BaseModel): + """Returns the completion status of the step.""" + status: Optional[str] = None """Returns the status of the step. @@ -54,6 +60,10 @@ class DataStepsCompletion(BaseModel): class DataStepsMeta(BaseModel): + """ + An object returning custom details about the step that were configured in the input request while configuring the step details. The information returned here will be available for display on the Driver's app under step details. + """ + customer_name: Optional[str] = None """Returns the customer name associated with the step. @@ -147,6 +157,11 @@ class DataSteps(BaseModel): class Data(BaseModel): + """An array of objects containing the details of each step in the dispatched route. + + Each object represents a single step. + """ + id: Optional[str] = None """Returns the unique ID of the route.""" diff --git a/src/nextbillionai/types/fleetify/routes/route_step_geofence_config.py b/src/nextbillionai/types/fleetify/routes/route_step_geofence_config.py index 15f2c97..5c6e3b5 100644 --- a/src/nextbillionai/types/fleetify/routes/route_step_geofence_config.py +++ b/src/nextbillionai/types/fleetify/routes/route_step_geofence_config.py @@ -9,6 +9,10 @@ class RouteStepGeofenceConfig(BaseModel): + """ + Specify the configurations of the geofence which will be used to detect presence of the driver and complete the tasks automatically. Please note that this attribute is required when completion_mode is either "geofence" or "geofence\\__manual\\__fallback". + """ + radius: Optional[float] = None """Specify the radius of the cicular geofence, in meters. diff --git a/src/nextbillionai/types/fleetify/routes/route_step_geofence_config_param.py b/src/nextbillionai/types/fleetify/routes/route_step_geofence_config_param.py index 7e3f8b0..da8421e 100644 --- a/src/nextbillionai/types/fleetify/routes/route_step_geofence_config_param.py +++ b/src/nextbillionai/types/fleetify/routes/route_step_geofence_config_param.py @@ -8,6 +8,10 @@ class RouteStepGeofenceConfigParam(TypedDict, total=False): + """ + Specify the configurations of the geofence which will be used to detect presence of the driver and complete the tasks automatically. Please note that this attribute is required when completion_mode is either "geofence" or "geofence\\__manual\\__fallback". + """ + radius: float """Specify the radius of the cicular geofence, in meters. diff --git a/src/nextbillionai/types/fleetify/routes/route_steps_request_param.py b/src/nextbillionai/types/fleetify/routes/route_steps_request_param.py index 20a1c7d..0db1b21 100644 --- a/src/nextbillionai/types/fleetify/routes/route_steps_request_param.py +++ b/src/nextbillionai/types/fleetify/routes/route_steps_request_param.py @@ -12,6 +12,10 @@ class Meta(TypedDict, total=False): + """ + An object to specify any additional details about the task to be associated with the step in the response. The information provided here will be available on the Driver's app under step details. This attribute can be used to provide context about or instructions to the driver for performing the task + """ + customer_name: str """Specify the name of the customer for which the step has to be performed.""" diff --git a/src/nextbillionai/types/fleetify/routes/route_steps_response.py b/src/nextbillionai/types/fleetify/routes/route_steps_response.py index a427c7e..f27d961 100644 --- a/src/nextbillionai/types/fleetify/routes/route_steps_response.py +++ b/src/nextbillionai/types/fleetify/routes/route_steps_response.py @@ -69,6 +69,10 @@ class Completion(BaseModel): class Meta(BaseModel): + """ + An object returning custom details about the step that were configured in the input request while configuring the step details. The information returned here will be available for display on the Driver's app under step details. + """ + customer_name: Optional[str] = None """Returns the customer name associated with the step. diff --git a/src/nextbillionai/types/fleetify/routes/step_create_params.py b/src/nextbillionai/types/fleetify/routes/step_create_params.py index 4380b9b..e713567 100644 --- a/src/nextbillionai/types/fleetify/routes/step_create_params.py +++ b/src/nextbillionai/types/fleetify/routes/step_create_params.py @@ -101,6 +101,10 @@ class StepCreateParams(TypedDict, total=False): class Meta(TypedDict, total=False): + """ + An object to specify any additional details about the task to be associated with the step in the response. The information provided here will be available on the Driver's app under step details. This attribute can be used to provide context about or instructions to the driver for performing the task + """ + customer_name: str """Specify the name of the customer for which the step has to be performed.""" diff --git a/src/nextbillionai/types/fleetify/routes/step_update_params.py b/src/nextbillionai/types/fleetify/routes/step_update_params.py index 40908c4..32c5577 100644 --- a/src/nextbillionai/types/fleetify/routes/step_update_params.py +++ b/src/nextbillionai/types/fleetify/routes/step_update_params.py @@ -100,6 +100,10 @@ class StepUpdateParams(TypedDict, total=False): class Meta(TypedDict, total=False): + """ + An object to specify any additional details about the task to be associated with the step in the response. The information provided here will be available on the Driver's app under step details. This attribute can be used to provide context about or instructions to the driver for performing the task + """ + customer_name: str """Specify the name of the customer for which the step has to be performed.""" diff --git a/src/nextbillionai/types/fleetify/routing_response.py b/src/nextbillionai/types/fleetify/routing_response.py index f0f0ad0..4871e26 100644 --- a/src/nextbillionai/types/fleetify/routing_response.py +++ b/src/nextbillionai/types/fleetify/routing_response.py @@ -8,6 +8,12 @@ class RoutingResponse(BaseModel): + """ + An object returning the routing characteristics that are used to generate the route and turn-by-turn navigation steps for the dispatched route. The route and navigation steps are available when driver uses the in-app navigation. + + Please note the routing characteristics returned here are the same as those configured in the input request. The fields which were not specified in the input will be returned as blanks. + """ + approaches: Optional[str] = None """ Returns the configuration of approaches for each step, that is used when diff --git a/src/nextbillionai/types/geocode_batch_create_response.py b/src/nextbillionai/types/geocode_batch_create_response.py index 3394b70..5fd36ff 100644 --- a/src/nextbillionai/types/geocode_batch_create_response.py +++ b/src/nextbillionai/types/geocode_batch_create_response.py @@ -16,6 +16,8 @@ class ItemScoring(BaseModel): + """Score of the result. A higher score indicates a closer match.""" + field_score: Optional[object] = FieldInfo(alias="fieldScore", default=None) """ A breakdown of how closely individual field of the result matched with the diff --git a/src/nextbillionai/types/geocode_retrieve_response.py b/src/nextbillionai/types/geocode_retrieve_response.py index 1fa25f4..32e634d 100644 --- a/src/nextbillionai/types/geocode_retrieve_response.py +++ b/src/nextbillionai/types/geocode_retrieve_response.py @@ -24,6 +24,8 @@ class ItemOpeningHoursTimeRangeEndTime(BaseModel): + """Returns the closing time details.""" + date: Optional[str] = None """The date to which the subsequent closing time details belong to.""" @@ -35,6 +37,8 @@ class ItemOpeningHoursTimeRangeEndTime(BaseModel): class ItemOpeningHoursTimeRangeStartTime(BaseModel): + """Returns the open time details.""" + date: Optional[str] = None """The date to which the subsequent open time details belong to.""" @@ -54,6 +58,8 @@ class ItemOpeningHoursTimeRange(BaseModel): class ItemOpeningHours(BaseModel): + """Returns the operating hours of the place, if available.""" + time_ranges: Optional[List[ItemOpeningHoursTimeRange]] = FieldInfo(alias="timeRanges", default=None) """ A collection of attributes with details about the opening and closing hours for @@ -62,6 +68,8 @@ class ItemOpeningHours(BaseModel): class ItemScoring(BaseModel): + """Score of the result. A higher score indicates a closer match.""" + field_score: Optional[object] = FieldInfo(alias="fieldScore", default=None) """ A breakdown of how closely individual field of the result matched with the diff --git a/src/nextbillionai/types/geocode_structured_retrieve_response.py b/src/nextbillionai/types/geocode_structured_retrieve_response.py index 729d885..38b8db0 100644 --- a/src/nextbillionai/types/geocode_structured_retrieve_response.py +++ b/src/nextbillionai/types/geocode_structured_retrieve_response.py @@ -24,6 +24,8 @@ class ItemOpeningHoursTimeRangeEndTime(BaseModel): + """Returns the closing time details.""" + date: Optional[str] = None """The date to which the subsequent closing time details belong to.""" @@ -35,6 +37,8 @@ class ItemOpeningHoursTimeRangeEndTime(BaseModel): class ItemOpeningHoursTimeRangeStartTime(BaseModel): + """Returns the open time details.""" + date: Optional[str] = None """The date to which the subsequent open time details belong to.""" @@ -54,6 +58,8 @@ class ItemOpeningHoursTimeRange(BaseModel): class ItemOpeningHours(BaseModel): + """Returns the operating hours of the place, if available.""" + time_ranges: Optional[List[ItemOpeningHoursTimeRange]] = FieldInfo(alias="timeRanges", default=None) """ A collection of attributes with details about the opening and closing hours for @@ -62,6 +68,8 @@ class ItemOpeningHours(BaseModel): class ItemScoring(BaseModel): + """Score of the result. A higher score indicates a closer match.""" + field_score: Optional[object] = FieldInfo(alias="fieldScore", default=None) """ A breakdown of how closely individual field of the result matched with the diff --git a/src/nextbillionai/types/geofence/batch_create_response.py b/src/nextbillionai/types/geofence/batch_create_response.py index 7d147d9..d4452c1 100644 --- a/src/nextbillionai/types/geofence/batch_create_response.py +++ b/src/nextbillionai/types/geofence/batch_create_response.py @@ -8,6 +8,8 @@ class Data(BaseModel): + """A data object containing the IDs of the geofences created.""" + ids: Optional[List[str]] = None diff --git a/src/nextbillionai/types/geofence/console_preview_params.py b/src/nextbillionai/types/geofence/console_preview_params.py index 6d0e3d6..a1c4a21 100644 --- a/src/nextbillionai/types/geofence/console_preview_params.py +++ b/src/nextbillionai/types/geofence/console_preview_params.py @@ -79,6 +79,8 @@ class ConsolePreviewParams(TypedDict, total=False): class CircleCenter(TypedDict, total=False): + """Coordinate of the location which will act as the center of a circular geofence.""" + lat: Required[float] """Latitude of the center location.""" @@ -87,6 +89,11 @@ class CircleCenter(TypedDict, total=False): class Circle(TypedDict, total=False): + """Provide the details to create a circular geofence. + + Please note that this object is mandatory when type is circle. When the type is not circle, the properties of this object will be ignored while creating the geofence. + """ + center: Required[CircleCenter] """Coordinate of the location which will act as the center of a circular geofence.""" @@ -98,6 +105,11 @@ class Circle(TypedDict, total=False): class Isochrone(TypedDict, total=False): + """Provide the details to create an isochrone based geofence. + + Use this object when type is isochrone. When the type is not isochrone, the properties of this object will be ignored while creating the geofence. + """ + coordinates: Required[str] """ Coordinates of the location, in [latitude,longitude] format, which would act as @@ -158,6 +170,11 @@ class Isochrone(TypedDict, total=False): class PolygonGeojson(TypedDict, total=False): + """An object to collect geoJSON details of the geofence. + + The contents of this object follow the [geoJSON standard](https://datatracker.ietf.org/doc/html/rfc7946). + """ + coordinates: Required[Iterable[Iterable[float]]] """ An array of coordinates in the [longitude, latitude] format, representing the @@ -169,6 +186,15 @@ class PolygonGeojson(TypedDict, total=False): class Polygon(TypedDict, total=False): + """Provide the details to create a custom polygon type of geofence. + + Please note that this object is mandatory when type is polygon. When the type is not polygon, the properties of this object will be ignored while creating the geofence. + + Self-intersecting polygons or polygons containing other polygons are invalid and will be removed while processing the request. + + Area of the polygon should be less than 2000 km2. + """ + geojson: Required[PolygonGeojson] """An object to collect geoJSON details of the geofence. diff --git a/src/nextbillionai/types/geofence/geofence.py b/src/nextbillionai/types/geofence/geofence.py index 89c515e..3dca26d 100644 --- a/src/nextbillionai/types/geofence/geofence.py +++ b/src/nextbillionai/types/geofence/geofence.py @@ -18,6 +18,8 @@ class CircleCenter(BaseModel): class Geofence(BaseModel): + """An object with details of the geofence.""" + id: Optional[str] = None """ID of the geofence provided/generated at the time of creating the geofence.""" diff --git a/src/nextbillionai/types/geofence/polygon_geojson.py b/src/nextbillionai/types/geofence/polygon_geojson.py index 7c549d1..be93825 100644 --- a/src/nextbillionai/types/geofence/polygon_geojson.py +++ b/src/nextbillionai/types/geofence/polygon_geojson.py @@ -8,6 +8,11 @@ class PolygonGeojson(BaseModel): + """An object with geoJSON details of the geofence. + + The contents of this object follow the [geoJSON standard](https://datatracker.ietf.org/doc/html/rfc7946). + """ + coordinates: Optional[List[List[float]]] = None """ An array of coordinates in the [longitude, latitude] format, representing the diff --git a/src/nextbillionai/types/geofence_create_params.py b/src/nextbillionai/types/geofence_create_params.py index 6c5a21f..4d2a1ce 100644 --- a/src/nextbillionai/types/geofence_create_params.py +++ b/src/nextbillionai/types/geofence_create_params.py @@ -85,6 +85,8 @@ class GeofenceCreateParams(TypedDict, total=False): class CircleCenter(TypedDict, total=False): + """Coordinate of the location which will act as the center of a circular geofence.""" + lat: Required[float] """Latitude of the center location.""" @@ -93,6 +95,11 @@ class CircleCenter(TypedDict, total=False): class Circle(TypedDict, total=False): + """Provide the details to create a circular geofence. + + Please note that this object is mandatory when type is circle. When the type is not circle, the properties of this object will be ignored while creating the geofence. + """ + center: Required[CircleCenter] """Coordinate of the location which will act as the center of a circular geofence.""" @@ -104,6 +111,11 @@ class Circle(TypedDict, total=False): class Isochrone(TypedDict, total=False): + """Provide the details to create an isochrone based geofence. + + Use this object when type is isochrone. When the type is not isochrone, the properties of this object will be ignored while creating the geofence. + """ + coordinates: Required[str] """ Coordinates of the location, in [latitude,longitude] format, which would act as @@ -164,6 +176,11 @@ class Isochrone(TypedDict, total=False): class PolygonGeojson(TypedDict, total=False): + """An object to collect geoJSON details of the geofence. + + The contents of this object follow the [geoJSON standard](https://datatracker.ietf.org/doc/html/rfc7946). + """ + coordinates: Required[Iterable[Iterable[float]]] """ An array of coordinates in the [longitude, latitude] format, representing the @@ -175,6 +192,15 @@ class PolygonGeojson(TypedDict, total=False): class Polygon(TypedDict, total=False): + """Provide the details to create a custom polygon type of geofence. + + Please note that this object is mandatory when type is polygon. When the type is not polygon, the properties of this object will be ignored while creating the geofence. + + Self-intersecting polygons or polygons containing other polygons are invalid and will be removed while processing the request. + + Area of the polygon should be less than 2000 km2. + """ + geojson: Required[PolygonGeojson] """An object to collect geoJSON details of the geofence. diff --git a/src/nextbillionai/types/geofence_create_response.py b/src/nextbillionai/types/geofence_create_response.py index 1c5c614..1f21472 100644 --- a/src/nextbillionai/types/geofence_create_response.py +++ b/src/nextbillionai/types/geofence_create_response.py @@ -8,6 +8,8 @@ class Data(BaseModel): + """A data object containing the ID of the geofence created.""" + id: Optional[str] = None """Unique ID of the geofence created. diff --git a/src/nextbillionai/types/geofence_entity_create_param.py b/src/nextbillionai/types/geofence_entity_create_param.py index 250f6d7..4dbc49a 100644 --- a/src/nextbillionai/types/geofence_entity_create_param.py +++ b/src/nextbillionai/types/geofence_entity_create_param.py @@ -11,6 +11,8 @@ class CircleCenter(TypedDict, total=False): + """Coordinate of the location which will act as the center of a circular geofence.""" + lat: Required[float] """Latitude of the center location.""" @@ -19,6 +21,11 @@ class CircleCenter(TypedDict, total=False): class Circle(TypedDict, total=False): + """Provide the details to create a circular geofence. + + Please note that this object is mandatory when type is circle. When the type is not circle, the properties of this object will be ignored while creating the geofence. + """ + center: Required[CircleCenter] """Coordinate of the location which will act as the center of a circular geofence.""" @@ -30,6 +37,11 @@ class Circle(TypedDict, total=False): class Isochrone(TypedDict, total=False): + """Provide the details to create an isochrone based geofence. + + Use this object when type is isochrone. When the type is not isochrone, the properties of this object will be ignored while creating the geofence. + """ + coordinates: Required[str] """ Coordinates of the location, in [latitude,longitude] format, which would act as @@ -90,6 +102,11 @@ class Isochrone(TypedDict, total=False): class PolygonGeojson(TypedDict, total=False): + """An object to collect geoJSON details of the geofence. + + The contents of this object follow the [geoJSON standard](https://datatracker.ietf.org/doc/html/rfc7946). + """ + coordinates: Required[Iterable[Iterable[float]]] """ An array of coordinates in the [longitude, latitude] format, representing the @@ -101,6 +118,15 @@ class PolygonGeojson(TypedDict, total=False): class Polygon(TypedDict, total=False): + """Provide the details to create a custom polygon type of geofence. + + Please note that this object is mandatory when type is polygon. When the type is not polygon, the properties of this object will be ignored while creating the geofence. + + Self-intersecting polygons or polygons containing other polygons are invalid and will be removed while processing the request. + + Area of the polygon should be less than 2000 km2. + """ + geojson: Required[PolygonGeojson] """An object to collect geoJSON details of the geofence. diff --git a/src/nextbillionai/types/geofence_update_params.py b/src/nextbillionai/types/geofence_update_params.py index 5cf4932..54d5c12 100644 --- a/src/nextbillionai/types/geofence_update_params.py +++ b/src/nextbillionai/types/geofence_update_params.py @@ -80,6 +80,10 @@ class GeofenceUpdateParams(TypedDict, total=False): class CircleCenter(TypedDict, total=False): + """ + Use this parameter to update the coordinate of the location which will act as the center of a circular geofence. + """ + lat: float """Latitude of the center location.""" @@ -88,6 +92,11 @@ class CircleCenter(TypedDict, total=False): class Circle(TypedDict, total=False): + """Use this object to update details of a circular geofence. + + Please note that this object is mandatory only when type is circle. When the type is not circle, the properties of this object will be ignored while creating the geofence. + """ + center: Required[CircleCenter] """ Use this parameter to update the coordinate of the location which will act as @@ -102,6 +111,11 @@ class Circle(TypedDict, total=False): class Isochrone(TypedDict, total=False): + """Use this object to update details of an isochrone based geofence. + + Please note that this object is mandatory only when type is isochrone. When the type is not isochrone, the properties of this object will be ignored while creating the geofence. + """ + contours_meter: int """ Use this parameter to update the distance, in meters, for which an isochrone @@ -169,6 +183,11 @@ class Isochrone(TypedDict, total=False): class PolygonGeojson(TypedDict, total=False): + """An object to collect geoJSON details of the polygon geofence. + + The contents of this object follow the [geoJSON standard](https://datatracker.ietf.org/doc/html/rfc7946). + """ + geometry: Iterable[Iterable[float]] """ An array of coordinates in the [longitude, latitude] format, representing the @@ -180,6 +199,15 @@ class PolygonGeojson(TypedDict, total=False): class Polygon(TypedDict, total=False): + """Use this object to update details of a custom polygon geofence. + + Please note that this object is mandatory only when type is polygon. When the type is not polygon, the properties of this object will be ignored while creating the geofence. + + Self-intersecting polygons or polygons containing other polygons are invalid and will be removed while processing the request. + + Area of the polygon should be less than 2000 km2. + """ + geojson: PolygonGeojson """An object to collect geoJSON details of the polygon geofence. diff --git a/src/nextbillionai/types/isochrone_compute_response.py b/src/nextbillionai/types/isochrone_compute_response.py index 1a30497..a3417bb 100644 --- a/src/nextbillionai/types/isochrone_compute_response.py +++ b/src/nextbillionai/types/isochrone_compute_response.py @@ -10,6 +10,10 @@ class FeatureGeometry(BaseModel): + """ + A [GeoJSON geometry](https://datatracker.ietf.org/doc/html/rfc7946#page-7) object with details of the contour line. + """ + coordinates: Optional[List[float]] = None """ An array of coordinate points, in [longitude,latitude] format representing the @@ -21,6 +25,8 @@ class FeatureGeometry(BaseModel): class FeatureProperties(BaseModel): + """An object with details of how the isochrone contour can be drawn on a map.""" + color: Optional[str] = None """The hex code of the color of the isochrone contour line""" diff --git a/src/nextbillionai/types/map_view.py b/src/nextbillionai/types/map_view.py index 85d99f4..79b3461 100644 --- a/src/nextbillionai/types/map_view.py +++ b/src/nextbillionai/types/map_view.py @@ -8,6 +8,10 @@ class MapView(BaseModel): + """ + The bounding box enclosing the geometric shape (area or line) that an individual result covers. place typed results have no mapView. + """ + east: Optional[str] = None """Longitude of the eastern-side of the box.""" diff --git a/src/nextbillionai/types/multigeocode/place_create_params.py b/src/nextbillionai/types/multigeocode/place_create_params.py index 29a2a93..ccc810e 100644 --- a/src/nextbillionai/types/multigeocode/place_create_params.py +++ b/src/nextbillionai/types/multigeocode/place_create_params.py @@ -49,6 +49,11 @@ class PlaceCreateParams(TypedDict, total=False): class PlaceGeopoint(TypedDict, total=False): + """This parameter represents the geographical coordinates of the place. + + It includes the latitude and longitude values. + """ + lat: float """This parameter represents the latitude value of the place.""" @@ -57,6 +62,11 @@ class PlaceGeopoint(TypedDict, total=False): class PlacePoi(TypedDict, total=False): + """This parameter represents a point of interest within the place. + + A Point of Interest (POI) refers to a specific location or area that is of interest to individuals for various reasons. It could be a landmark, tourist attraction, business, or any other location that people might find important or intriguing. + """ + title: str """A title that describes the point of interest.""" @@ -118,6 +128,8 @@ class Place(TypedDict, total=False): class DataSource(TypedDict, total=False): + """It contains information about the dataset that returns the specific result""" + ref_id: Annotated[str, PropertyInfo(alias="refId")] """ This parameter represents the unique reference ID associated with the data diff --git a/src/nextbillionai/types/multigeocode/place_item.py b/src/nextbillionai/types/multigeocode/place_item.py index 74d013d..2ec5aa7 100644 --- a/src/nextbillionai/types/multigeocode/place_item.py +++ b/src/nextbillionai/types/multigeocode/place_item.py @@ -10,6 +10,11 @@ class Geopoint(BaseModel): + """This parameter represents the geographical coordinates of the place. + + It includes the latitude and longitude values. + """ + lat: Optional[float] = None """This parameter represents the latitude value of the place.""" @@ -18,6 +23,11 @@ class Geopoint(BaseModel): class Poi(BaseModel): + """This parameter represents a point of interest within the place. + + A Point of Interest (POI) refers to a specific location or area that is of interest to individuals for various reasons. It could be a landmark, tourist attraction, business, or any other location that people might find important or intriguing. + """ + title: Optional[str] = None """A title that describes the point of interest.""" diff --git a/src/nextbillionai/types/multigeocode/place_item_param.py b/src/nextbillionai/types/multigeocode/place_item_param.py index 3d3f897..00d890e 100644 --- a/src/nextbillionai/types/multigeocode/place_item_param.py +++ b/src/nextbillionai/types/multigeocode/place_item_param.py @@ -10,6 +10,11 @@ class Geopoint(TypedDict, total=False): + """This parameter represents the geographical coordinates of the place. + + It includes the latitude and longitude values. + """ + lat: float """This parameter represents the latitude value of the place.""" @@ -18,6 +23,11 @@ class Geopoint(TypedDict, total=False): class Poi(TypedDict, total=False): + """This parameter represents a point of interest within the place. + + A Point of Interest (POI) refers to a specific location or area that is of interest to individuals for various reasons. It could be a landmark, tourist attraction, business, or any other location that people might find important or intriguing. + """ + title: str """A title that describes the point of interest.""" diff --git a/src/nextbillionai/types/multigeocode/place_retrieve_response.py b/src/nextbillionai/types/multigeocode/place_retrieve_response.py index 4fd2162..d6fa253 100644 --- a/src/nextbillionai/types/multigeocode/place_retrieve_response.py +++ b/src/nextbillionai/types/multigeocode/place_retrieve_response.py @@ -12,6 +12,10 @@ class DataSorce(BaseModel): + """ + It displays the information about the current source and current status of the place. Use the “Update Place” method to change these values, as needed. + """ + ref_id: Optional[str] = FieldInfo(alias="refId", default=None) """ This parameter represents the unique reference ID associated with the data diff --git a/src/nextbillionai/types/multigeocode/place_update_params.py b/src/nextbillionai/types/multigeocode/place_update_params.py index c737c42..e08ebe5 100644 --- a/src/nextbillionai/types/multigeocode/place_update_params.py +++ b/src/nextbillionai/types/multigeocode/place_update_params.py @@ -43,6 +43,10 @@ class PlaceUpdateParams(TypedDict, total=False): class DataSource(TypedDict, total=False): + """ + dataSource values can be updated to enhance or prioritize the search results to better suit specific business use cases. + """ + ref_id: Annotated[str, PropertyInfo(alias="refId")] """ This parameter represents the unique reference ID associated with the data diff --git a/src/nextbillionai/types/multigeocode_search_params.py b/src/nextbillionai/types/multigeocode_search_params.py index 556d0c5..227e25d 100644 --- a/src/nextbillionai/types/multigeocode_search_params.py +++ b/src/nextbillionai/types/multigeocode_search_params.py @@ -62,6 +62,8 @@ class MultigeocodeSearchParams(TypedDict, total=False): class At(TypedDict, total=False): + """Specify the center of the search context expressed as coordinates.""" + lat: Required[float] """Latitude coordinate of the location""" diff --git a/src/nextbillionai/types/multigeocode_search_response.py b/src/nextbillionai/types/multigeocode_search_response.py index 111592d..770dea0 100644 --- a/src/nextbillionai/types/multigeocode_search_response.py +++ b/src/nextbillionai/types/multigeocode_search_response.py @@ -12,6 +12,8 @@ class EntityDataSource(BaseModel): + """It contains information about the dataset that returns the specific result""" + ref_id: Optional[str] = FieldInfo(alias="refId", default=None) """ This parameter represents the unique reference ID associated with the data diff --git a/src/nextbillionai/types/navigation_retrieve_route_response.py b/src/nextbillionai/types/navigation_retrieve_route_response.py index 19db61f..9abf98a 100644 --- a/src/nextbillionai/types/navigation_retrieve_route_response.py +++ b/src/nextbillionai/types/navigation_retrieve_route_response.py @@ -33,6 +33,8 @@ class RouteEndLocation(BaseModel): + """Location coordinates of the point where the route ends.""" + latitude: Optional[float] = None """Latitude of the end_location.""" @@ -41,6 +43,8 @@ class RouteEndLocation(BaseModel): class RouteGeojson(BaseModel): + """The GeoJSON representation of the route.""" + geometry: Optional[str] = None properties: Optional[str] = None @@ -62,14 +66,20 @@ class RouteGeojson(BaseModel): class RouteLegDistance(BaseModel): + """An object containing leg distance value, in meters.""" + value: Optional[int] = None class RouteLegDuration(BaseModel): + """An object containing leg duration value, in seconds.""" + value: Optional[int] = None class RouteLegEndLocation(BaseModel): + """Location coordinates of the point where the leg ends.""" + latitude: Optional[float] = None """Latitude of end_location of the leg.""" @@ -78,6 +88,8 @@ class RouteLegEndLocation(BaseModel): class RouteLegStartLocation(BaseModel): + """Location coordinates of the point where the leg starts.""" + latitude: Optional[float] = None """Latitude of start_location of the leg.""" @@ -86,14 +98,20 @@ class RouteLegStartLocation(BaseModel): class RouteLegStepDistance(BaseModel): + """An object containing step distance value, in meters.""" + value: Optional[int] = None class RouteLegStepDuration(BaseModel): + """An object containing step duration value, in seconds.""" + value: Optional[int] = None class RouteLegStepEndLocation(BaseModel): + """Location coordinates of the point where the step ends.""" + latitude: Optional[float] = None """Latitude of the end_location of the step.""" @@ -102,6 +120,8 @@ class RouteLegStepEndLocation(BaseModel): class RouteLegStepGeojson(BaseModel): + """The GeoJSON representation of the step.""" + geometry: Optional[str] = None type: Optional[str] = None @@ -125,6 +145,8 @@ class RouteLegStepIntersectionLane(BaseModel): class RouteLegStepIntersectionLocation(BaseModel): + """A [longitude, latitude] pair describing the location of the intersection.""" + latitude: Optional[float] = None """The latitude coordinate of the intersection.""" @@ -176,6 +198,8 @@ class RouteLegStepIntersection(BaseModel): class RouteLegStepManeuverCoordinate(BaseModel): + """A coordinate pair describing the location of the maneuver.""" + latitude: Optional[float] = None """The latitude coordinate of the maneuver.""" @@ -197,6 +221,8 @@ class RouteLegStepManeuverVoiceInstruction(BaseModel): class RouteLegStepManeuver(BaseModel): + """An object with maneuver details for the step.""" + bearing_after: Optional[float] = None """ The clockwise angle from true north to the direction of travel immediately after @@ -245,6 +271,8 @@ class RouteLegStepManeuver(BaseModel): class RouteLegStepRoadShieldType(BaseModel): + """An object containing road shield information.""" + image_url: Optional[str] = None """The URL to fetch the road shield image.""" @@ -256,6 +284,8 @@ class RouteLegStepRoadShieldType(BaseModel): class RouteLegStepStartLocation(BaseModel): + """Location coordinates of the point where the step starts.""" + latitude: Optional[float] = None """Latitude of start_location of the step.""" @@ -330,6 +360,8 @@ class RouteLeg(BaseModel): class RouteStartLocation(BaseModel): + """Location coordinates of the point where the route starts.""" + latitude: Optional[float] = None """Latitude of thestart_location.""" diff --git a/src/nextbillionai/types/optimization/driver_assignment_assign_params.py b/src/nextbillionai/types/optimization/driver_assignment_assign_params.py index 8976875..0f1db52 100644 --- a/src/nextbillionai/types/optimization/driver_assignment_assign_params.py +++ b/src/nextbillionai/types/optimization/driver_assignment_assign_params.py @@ -55,6 +55,10 @@ class DriverAssignmentAssignParams(TypedDict, total=False): class Filter(TypedDict, total=False): + """ + Specify the filtering criterion for the vehicles with respect to each order's location. filter is a mandatory input for all requests. + """ + driving_distance: float """Defines a driving_distance filter, in meters. @@ -82,6 +86,11 @@ class Filter(TypedDict, total=False): class OrderPickup(TypedDict, total=False): + """Specify the location coordinates of the pickup location of the order. + + This input is mandatory for each order. + """ + lat: float """Latitude of the pickup location.""" @@ -203,6 +212,22 @@ class OrderVehiclePreferencesRequiredAnyOfAttribute(TypedDict, total=False): class OrderVehiclePreferences(TypedDict, total=False): + """Define custom preferences for task assignment based on vehicle's attributes. + + If multiple criteria are provided, they are evaluated using an AND condition—meaning all specified criteria must be met individually for a vehicle to be considered. + + For example, if required_all_of_attributes, required_any_of_attributes, and exclude_all_of_attributes are all provided, an eligible vehicle must satisfy the following to be considered for assignments: + + 1. Meet all conditions specified in required_all_of_attributes. + + 2. Meet at least one of the conditions listed in required_any_of_attributes. + + 3. Not meet any conditions mentioned in exclude_all_of_attributes. + + + Consequently, a vehicle which does not have any attributes defined can't be assigned to an order which has vehicle_preferences configured. + """ + exclude_all_of_attributes: Iterable[OrderVehiclePreferencesExcludeAllOfAttribute] """An array of objects to add exclusion requirements for the order. @@ -381,6 +406,8 @@ class OptionsVehicleAttributePriorityMapping(TypedDict, total=False): class Options(TypedDict, total=False): + """Configure the assignment constraints and response settings.""" + alternate_assignments: int """ Specify the maximum number of potential, alternate vehicle assignments to be diff --git a/src/nextbillionai/types/optimization/driver_assignment_assign_response.py b/src/nextbillionai/types/optimization/driver_assignment_assign_response.py index f7a8750..5763936 100644 --- a/src/nextbillionai/types/optimization/driver_assignment_assign_response.py +++ b/src/nextbillionai/types/optimization/driver_assignment_assign_response.py @@ -38,6 +38,10 @@ class ResultAlternateAssignment(BaseModel): class ResultTripVehicleSteps(BaseModel): + """ + A collection of objects returning the sequence of steps that the vehicle needs to perform for a trip. + """ + distance: Optional[int] = None """ Returns the driving distance, in meters, to the step's location from previous @@ -76,6 +80,8 @@ class ResultTripVehicleSteps(BaseModel): class ResultTripVehicle(BaseModel): + """Returns the details of the vehicle, assigned order and the trip steps.""" + id: Optional[str] = None """Returns the ID of the vehicle.""" @@ -106,6 +112,8 @@ class ResultUnassignedOrder(BaseModel): class Result(BaseModel): + """An object containing the details of the assignments.""" + alternate_assignments: Optional[List[ResultAlternateAssignment]] = None """ An array of objects containing the details of the potential, alternate vehicle diff --git a/src/nextbillionai/types/optimization/job_param.py b/src/nextbillionai/types/optimization/job_param.py index 3b3efa2..8b0eec3 100644 --- a/src/nextbillionai/types/optimization/job_param.py +++ b/src/nextbillionai/types/optimization/job_param.py @@ -11,6 +11,12 @@ class Volume(TypedDict, total=False): + """ + Specify the dimensions and alignment configurations for the cargo associated with the task. These inputs will be used to arrange the items into the loading compartment of the vehicle to utilize the three-dimensional space. If a job consists of several different items, each with its own dimensions, please specify the final characteristics for the task: total height, total length, total width. + + Please note that vehicles which contain the volume input, will only be considered for arranging such items. + """ + alignment: Literal["strict", "parallel", "fixed_bottom"] """Refers to the orientation of the cargo in the loading compartment. diff --git a/src/nextbillionai/types/optimization/location.py b/src/nextbillionai/types/optimization/location.py index 4d99d2f..9e7f5b5 100644 --- a/src/nextbillionai/types/optimization/location.py +++ b/src/nextbillionai/types/optimization/location.py @@ -6,6 +6,8 @@ class Location(BaseModel): + """Location info.""" + lat: float """Latitude of location.""" diff --git a/src/nextbillionai/types/optimization/location_param.py b/src/nextbillionai/types/optimization/location_param.py index 21e9a05..baa1f0e 100644 --- a/src/nextbillionai/types/optimization/location_param.py +++ b/src/nextbillionai/types/optimization/location_param.py @@ -8,6 +8,8 @@ class LocationParam(TypedDict, total=False): + """Location info.""" + lat: Required[float] """Latitude of location.""" diff --git a/src/nextbillionai/types/optimization/shipment_param.py b/src/nextbillionai/types/optimization/shipment_param.py index 7ba9820..c5571bb 100644 --- a/src/nextbillionai/types/optimization/shipment_param.py +++ b/src/nextbillionai/types/optimization/shipment_param.py @@ -11,6 +11,8 @@ class Delivery(TypedDict, total=False): + """Specify the details of the delivery step of the shipment.""" + id: Required[str] """Indicate the ID of this shipment delivery step. @@ -101,6 +103,8 @@ class Delivery(TypedDict, total=False): class Pickup(TypedDict, total=False): + """Specify the details of the pickup step of the shipment.""" + id: Required[str] """Indicate the ID of this shipment pickup step. @@ -189,6 +193,12 @@ class Pickup(TypedDict, total=False): class Volume(TypedDict, total=False): + """ + Specify the dimensions and alignment configurations for the cargo associated with the shipment. These inputs will be used to arrange the items into the loading compartment of the vehicle to utilize the three-dimensional space. If a shipment consists of several different items, each with its own dimensions, please specify the final characteristics for the task: total height, total depth, total width. + + Please note that vehicles which contain the volume input, will only be considered for arranging such items. + """ + alignment: Literal["strict", "parallel", "fixed_bottom"] """Refers to the orientation of the cargo in the loading compartment. diff --git a/src/nextbillionai/types/optimization/v2_retrieve_result_response.py b/src/nextbillionai/types/optimization/v2_retrieve_result_response.py index b38a308..b850af5 100644 --- a/src/nextbillionai/types/optimization/v2_retrieve_result_response.py +++ b/src/nextbillionai/types/optimization/v2_retrieve_result_response.py @@ -9,6 +9,11 @@ class ResultRouteStep(BaseModel): + """This attribute contains the details of all the steps involved in the route. + + It is an array of objects with each object representing one step. + """ + id: Optional[str] = None """Returns the ID of the task. @@ -257,6 +262,11 @@ class ResultRoute(BaseModel): class ResultSummary(BaseModel): + """An object to describe the summarized result of the optimization request. + + This object can be useful to quickly get an overview of the important result parameters. + """ + cost: Optional[int] = None """Returns the total cost of all the routes returned in the solution. @@ -401,6 +411,8 @@ class ResultUnassigned(BaseModel): class Result(BaseModel): + """An object containing the details of the optimized routes.""" + code: Optional[int] = None """A custom code representing the status of the result. diff --git a/src/nextbillionai/types/optimization/v2_submit_params.py b/src/nextbillionai/types/optimization/v2_submit_params.py index 4a43962..922ea9e 100644 --- a/src/nextbillionai/types/optimization/v2_submit_params.py +++ b/src/nextbillionai/types/optimization/v2_submit_params.py @@ -223,6 +223,10 @@ class V2SubmitParams(TypedDict, total=False): class Locations(TypedDict, total=False): + """ + The locations object is used to define all the locations that will be used during the optimization process. Read more about this attribute in the [Location Object](#location-object) section. + """ + location: Required[SequenceNotStr[str]] """Indicate all the location coordinates that will be used during optimization. @@ -294,6 +298,14 @@ class Depot(TypedDict, total=False): class OptionsConstraint(TypedDict, total=False): + """ + This attribute defines both the soft and hard constraints for an optimization job. + + Soft constraints are constraints that do not necessarily have to be satisfied, but the optimization algorithm will try to satisfy them as much as possible. Whereas the hard constraints are the constraints that will not be violated by the solver. Users can use multiple constraints together. + + Please note that soft constraints are ineffective when using relations attribute in a request. The hard constraint, max_activity_waiting_time, is effective only when relation type is in_same_route and ineffective for all other types. + """ + max_activity_waiting_time: int """ This is a hard constraint which specifies the maximum waiting time, in seconds, @@ -333,6 +345,13 @@ class OptionsConstraint(TypedDict, total=False): class OptionsGroupingOrderGrouping(TypedDict, total=False): + """Specify the criteria for grouping nearby tasks. + + The grouped tasks will be treated as one stop by the optimizer and no cost would be incurred when driver travels to different tasks within a group. Users can use this feature to model use cases like multiple deliveries in a building complex or a condo. + + Please note that when the multiple tasks are grouped together, only one setup time is considered for all such tasks. The durations of this setup time is equal to maximum setup time among all grouped tasks, if provided. On the other hand, the service time is applied to each task individually, as per the input provided when configuring those tasks. + """ + grouping_diameter: float """ Specify the straight line distance, in meters, which will be used to identify @@ -341,6 +360,10 @@ class OptionsGroupingOrderGrouping(TypedDict, total=False): class OptionsGroupingRouteGrouping(TypedDict, total=False): + """ + Specify the criteria for prioritising routes in a zone over routes that are part of another zone. As a result, all the tasks falling in a zone will be fulfilled before any tasks that are part of a different zone. + """ + penalty_factor: float """ Specify a non-negative value which indicates the penalty of crossing zones on @@ -376,6 +399,13 @@ class OptionsGroupingRouteGrouping(TypedDict, total=False): class OptionsGrouping(TypedDict, total=False): + """Set grouping rules for the tasks and routes. + + * Use order_grouping to group nearby tasks + + * Use route_grouping to control route sequencing. + """ + order_grouping: OptionsGroupingOrderGrouping """Specify the criteria for grouping nearby tasks. @@ -422,6 +452,10 @@ class OptionsGrouping(TypedDict, total=False): class OptionsObjectiveCustom(TypedDict, total=False): + """ + The custom parameter is used to define special objectives apart from the simpler travel cost minimization objectives. + """ + type: Required[Literal["min", "min-max"]] """The type parameter accepts two inputs: @@ -459,6 +493,8 @@ class OptionsObjectiveCustom(TypedDict, total=False): class OptionsObjective(TypedDict, total=False): + """This attribute is used to configure the objective of the optimization job.""" + allow_early_arrival: bool """Choose where the optimizer should schedule the driver’s wait time. @@ -536,6 +572,10 @@ class OptionsObjective(TypedDict, total=False): class OptionsRouting(TypedDict, total=False): + """ + This attribute is used to define the routing configurations for the optimization job. + """ + allow: List[Literal["taxi", "hov"]] avoid: List[ @@ -684,6 +724,10 @@ class OptionsRouting(TypedDict, total=False): class Options(TypedDict, total=False): + """ + It represents the set of options that can be used to configure optimization algorithms so that the solver provides a solution that meets the desired business objectives. + """ + constraint: OptionsConstraint """ This attribute defines both the soft and hard constraints for an optimization @@ -809,6 +853,8 @@ class Relation(TypedDict, total=False): class SolutionStep(TypedDict, total=False): + """Describe details about a step of a route""" + id: Required[str] """The ID of the step. @@ -949,6 +995,24 @@ class Solution(TypedDict, total=False): class Unassigned(TypedDict, total=False): + """unassigned attribute is related to the re-optimization feature. + + This attribute should contain the tasks that were not assigned during an earlier optimization process. Please note that the unassigned part in request should be consistent with the unassigned part in the previous optimization result. + + Users can reduce the number of unassigned tasks in the re-optimized solution, by following strategies such as: + + * Extending the time windows for vehicles or tasks to give more flexibility + + * Adding more vehicles to the optimization problem + + * Adjusting the priority of different tasks to balance the workload more evenly + + * Modifying other constraints or parameters to make the problem more solvable + + + Ultimately, the goal is to minimize the number of unassigned tasks while still meeting all the necessary constraints and objectives. + """ + jobs: SequenceNotStr[str] """Specify the unassigned job IDs from the previous optimization result. @@ -974,6 +1038,12 @@ class Unassigned(TypedDict, total=False): class ZoneGeometry(TypedDict, total=False): + """ + It is a [geoJSON object](https://datatracker.ietf.org/doc/html/rfc7946#page-9) with details of the geographic boundaries of the zone. Only “Polygon” and “MultiPolygon” geoJSON types are supported. + + Please note that one of geometry or geofence_id should be provided. + """ + coordinates: Iterable[Iterable[float]] """ An array of coordinates in the \\[[longitude, latitude\\]] format, representing the diff --git a/src/nextbillionai/types/optimization_compute_response.py b/src/nextbillionai/types/optimization_compute_response.py index c74d419..ad048a5 100644 --- a/src/nextbillionai/types/optimization_compute_response.py +++ b/src/nextbillionai/types/optimization_compute_response.py @@ -19,6 +19,8 @@ class Location(BaseModel): + """Contains the latitude and longitude of a location""" + latitude: Optional[float] = None """Latitude coordinate of the location.""" @@ -27,6 +29,8 @@ class Location(BaseModel): class TripGeojson(BaseModel): + """The GeoJSON representation of the route.""" + geometry: Optional[str] = None """The encoded geometry of the geojson in the trip.""" @@ -51,6 +55,8 @@ class TripGeojson(BaseModel): class TripLegStepGeojson(BaseModel): + """The GeoJSON representation of the step.""" + geometry: Optional[str] = None """The encoded geometry of the geojson in the step.""" @@ -119,6 +125,8 @@ class Trip(BaseModel): class WaypointLocation(BaseModel): + """Describes the location of the waypoint.""" + latitude: Optional[float] = None """Latitude coordinate of the waypoint.""" diff --git a/src/nextbillionai/types/optimization_re_optimize_params.py b/src/nextbillionai/types/optimization_re_optimize_params.py index 48c5877..e74ebb6 100644 --- a/src/nextbillionai/types/optimization_re_optimize_params.py +++ b/src/nextbillionai/types/optimization_re_optimize_params.py @@ -73,6 +73,10 @@ class OptimizationReOptimizeParams(TypedDict, total=False): class JobChanges(TypedDict, total=False): + """ + This section gathers information on modifications to the number of jobs or their individual requirements for re-optimization. Any job from the original solution not specified here will be re-planned without alteration during the re-optimization process. + """ + add: Iterable[JobParam] """ An array of objects to collect the details of the new jobs to be added during @@ -96,6 +100,10 @@ class JobChanges(TypedDict, total=False): class ShipmentChanges(TypedDict, total=False): + """ + This section gathers information on modifications to the number of shipments or their individual requirements for re-optimization. Any shipment from the original solution not specified here will be re-planned without alteration during the re-optimization process. + """ + add: Iterable[ShipmentParam] """ An array of objects to collect the details of the new shipments to be added @@ -119,6 +127,10 @@ class ShipmentChanges(TypedDict, total=False): class VehicleChanges(TypedDict, total=False): + """ + This section gathers information on modifications to the number of vehicles or individual vehicle configurations for re-optimizing an existing solution. Any vehicle from the original solution not specified here will be reused without alteration during the re-optimization process. + """ + add: Iterable[VehicleParam] """ An array of objects to collect the details of the new vehicles to be added for diff --git a/src/nextbillionai/types/position.py b/src/nextbillionai/types/position.py index 5180b20..0301f52 100644 --- a/src/nextbillionai/types/position.py +++ b/src/nextbillionai/types/position.py @@ -8,6 +8,8 @@ class Position(BaseModel): + """Returns the location coordinates of the result.""" + lat: Optional[str] = None """The latitude of the searched place.""" diff --git a/src/nextbillionai/types/postalcode_retrieve_coordinates_params.py b/src/nextbillionai/types/postalcode_retrieve_coordinates_params.py index ea34f1e..0c1af7f 100644 --- a/src/nextbillionai/types/postalcode_retrieve_coordinates_params.py +++ b/src/nextbillionai/types/postalcode_retrieve_coordinates_params.py @@ -50,6 +50,12 @@ class PostalcodeRetrieveCoordinatesParams(TypedDict, total=False): class At(TypedDict, total=False): + """Location coordinates that you want to get the postal code of. + + If not providing postalcode in the request, at becomes mandatory. + Please note that only 1 point can be requested. [See this example](#note). + """ + lat: float """Latitude of the location.""" diff --git a/src/nextbillionai/types/postalcode_retrieve_coordinates_response.py b/src/nextbillionai/types/postalcode_retrieve_coordinates_response.py index d467bc6..226adfe 100644 --- a/src/nextbillionai/types/postalcode_retrieve_coordinates_response.py +++ b/src/nextbillionai/types/postalcode_retrieve_coordinates_response.py @@ -19,6 +19,11 @@ class PlacesBoundaryGeometry(BaseModel): + """An object with geoJSON details of the boundary. + + This object is returned when the format field is set to geojson in the input request, otherwise it is not present in the response. The contents of this object follow the [geoJSON standard](https://datatracker.ietf.org/doc/html/rfc7946). + """ + coordinates: Optional[List[List[List[float]]]] = None """ An array of coordinates in the [longitude, latitude] format, representing the @@ -52,6 +57,13 @@ class PlacesBoundaryMultipolygon(BaseModel): class PlacesBoundary(BaseModel): + """An object containing the boundary details of the postal code area. + + This object will not be returned in case the boundary information of the postal code provided is not available (only for selected countries). + + Please note the contents of this object will change based on the format field in the input. When the format field is not present in the input this object would contain multipolygon - polygon - points objects depending on the boundary of the given postal code. When the format field is present in the input, then the contents of this object would match the [geojson format and standard](https://datatracker.ietf.org/doc/html/rfc7946). + """ + geometry: Optional[PlacesBoundaryGeometry] = None """An object with geoJSON details of the boundary. @@ -85,6 +97,10 @@ class PlacesBoundary(BaseModel): class PlacesGeopoint(BaseModel): + """ + Refers to the geographic coordinate denoting the center of the postal code in latitude, longitude format. + """ + lat: Optional[float] = None """Latitude of the location.""" @@ -93,6 +109,8 @@ class PlacesGeopoint(BaseModel): class Places(BaseModel): + """An object that contains details about the place that was provided in the input.""" + address: Optional[str] = None """Returns the address of the postalcode returned.""" diff --git a/src/nextbillionai/types/revgeocode_retrieve_response.py b/src/nextbillionai/types/revgeocode_retrieve_response.py index 94e7bbb..0bc7863 100644 --- a/src/nextbillionai/types/revgeocode_retrieve_response.py +++ b/src/nextbillionai/types/revgeocode_retrieve_response.py @@ -24,6 +24,8 @@ class ItemOpeningHoursTimeRangeEndTime(BaseModel): + """Returns the closing time details.""" + date: Optional[str] = None """The date to which the subsequent closing time details belong to.""" @@ -35,6 +37,8 @@ class ItemOpeningHoursTimeRangeEndTime(BaseModel): class ItemOpeningHoursTimeRangeStartTime(BaseModel): + """Returns the open time details.""" + date: Optional[str] = None """The date to which the subsequent open time details belong to.""" @@ -54,6 +58,8 @@ class ItemOpeningHoursTimeRange(BaseModel): class ItemOpeningHours(BaseModel): + """Returns the operating hours of the place, if available.""" + time_ranges: Optional[List[ItemOpeningHoursTimeRange]] = FieldInfo(alias="timeRanges", default=None) """ A collection of attributes with details about the opening and closing hours for @@ -62,6 +68,8 @@ class ItemOpeningHours(BaseModel): class ItemScoring(BaseModel): + """Score of the result. A higher score indicates a closer match.""" + field_score: Optional[object] = FieldInfo(alias="fieldScore", default=None) """ A breakdown of how closely individual field of the result matched with the diff --git a/src/nextbillionai/types/route_report_create_response.py b/src/nextbillionai/types/route_report_create_response.py index 86b764a..7ad08cb 100644 --- a/src/nextbillionai/types/route_report_create_response.py +++ b/src/nextbillionai/types/route_report_create_response.py @@ -62,6 +62,10 @@ class MileageSegmentState(BaseModel): class MileageSegment(BaseModel): + """ + Returns the details of road segments that the route covers in different states and countries. + """ + country: Optional[List[MileageSegmentCountry]] = None """An array of objects containing country-wise break up of the route segments. @@ -76,6 +80,10 @@ class MileageSegment(BaseModel): class MileageSummary(BaseModel): + """ + Returns a summary of distances that the route covers in different states and countries. + """ + country: Optional[object] = None """ A break up of country-wise distances that the route covers in key:value pair @@ -151,6 +159,8 @@ class RoadSummarySegmentRoadClass(BaseModel): class RoadSummarySegment(BaseModel): + """Returns the segment-wise road class and max speed information of the route.""" + max_speed: Optional[List[RoadSummarySegmentMaxSpeed]] = None """ An array of objects returning the maximum speed of different segments that the @@ -166,6 +176,10 @@ class RoadSummarySegment(BaseModel): class RoadSummarySummary(BaseModel): + """ + Returns an overview of the route with information about trip distance, duration and road class details among others. + """ + distance: Optional[float] = None """Returns the total distance of the route , in meters.""" diff --git a/src/nextbillionai/types/skynet/asset/event_list_response.py b/src/nextbillionai/types/skynet/asset/event_list_response.py index 3ef86dd..641bcc5 100644 --- a/src/nextbillionai/types/skynet/asset/event_list_response.py +++ b/src/nextbillionai/types/skynet/asset/event_list_response.py @@ -18,6 +18,8 @@ class DataListPrevLocationLocation(BaseModel): + """prev_location information of the asset.""" + lat: Optional[float] = None """Latitude of the prev_location tracked for the asset.""" @@ -26,6 +28,10 @@ class DataListPrevLocationLocation(BaseModel): class DataListPrevLocation(BaseModel): + """ + An object with details of the asset at the last tracked location before the event was triggered. + """ + bearing: Optional[float] = None """ If available, this property returns the heading of the asset from true north in @@ -52,6 +58,8 @@ class DataListPrevLocation(BaseModel): class DataListTriggeredLocationLocation(BaseModel): + """An object with information about the location at which the event was triggered.""" + lat: Optional[float] = None """Latitude of the triggered_location of the event.""" @@ -60,6 +68,10 @@ class DataListTriggeredLocationLocation(BaseModel): class DataListTriggeredLocation(BaseModel): + """ + An object with details of the asset at the location where the event was triggered. + """ + bearing: Optional[float] = None """ If available, this property returns the heading of the asset from true north in @@ -153,6 +165,10 @@ class DataList(BaseModel): class Data(BaseModel): + """ + An object containing the information about the event history for the requested asset. + """ + list: Optional[List[DataList]] = None """An array of objects with each object on the list representing one event.""" diff --git a/src/nextbillionai/types/skynet/asset/location_get_last_response.py b/src/nextbillionai/types/skynet/asset/location_get_last_response.py index 35eb78b..99cf216 100644 --- a/src/nextbillionai/types/skynet/asset/location_get_last_response.py +++ b/src/nextbillionai/types/skynet/asset/location_get_last_response.py @@ -9,6 +9,10 @@ class Data(BaseModel): + """ + An object containing the information about the last tracked location of the requested asset. + """ + location: Optional[TrackLocation] = None """An object with details of the tracked location. diff --git a/src/nextbillionai/types/skynet/asset/location_list_response.py b/src/nextbillionai/types/skynet/asset/location_list_response.py index 111d57e..caa340c 100644 --- a/src/nextbillionai/types/skynet/asset/location_list_response.py +++ b/src/nextbillionai/types/skynet/asset/location_list_response.py @@ -19,6 +19,8 @@ class DataGeojsonGeometry(BaseModel): + """An object with details of the geoJSON geometry of the route.""" + coordinates: Optional[List[float]] = None """ An array of coordinates in the [longitude, latitude] format, representing the @@ -30,6 +32,11 @@ class DataGeojsonGeometry(BaseModel): class DataGeojson(BaseModel): + """An object with geoJSON details of the route. + + It is returned only when the mapmatch property of the correction parameter is set to 1 and geometry_type is geojson, otherwise it is not present in the response. The contents of this object follow the [geoJSON standard](https://datatracker.ietf.org/doc/html/rfc7946). + """ + geometry: Optional[DataGeojsonGeometry] = None """An object with details of the geoJSON geometry of the route.""" @@ -38,6 +45,8 @@ class DataGeojson(BaseModel): class DataSnappedPointLocation(BaseModel): + """The latitude and longitude coordinates of the snapped point.""" + lat: Optional[float] = None """Latitude of the snapped point.""" diff --git a/src/nextbillionai/types/skynet/asset/track_location.py b/src/nextbillionai/types/skynet/asset/track_location.py index 1dfe257..8ddb9d5 100644 --- a/src/nextbillionai/types/skynet/asset/track_location.py +++ b/src/nextbillionai/types/skynet/asset/track_location.py @@ -8,6 +8,8 @@ class Location(BaseModel): + """An object with the coordinates of the last tracked location.""" + lat: Optional[float] = None """Latitude of the tracked location of the asset.""" @@ -16,6 +18,11 @@ class Location(BaseModel): class TrackLocation(BaseModel): + """An object with details of the tracked location. + + Please note that if there are no tracking records for an asset, no location data will be returned. + """ + accuracy: Optional[float] = None """ If available, this property returns the accuracy of the GPS information received diff --git a/src/nextbillionai/types/skynet/asset_create_response.py b/src/nextbillionai/types/skynet/asset_create_response.py index 3359f8a..bb47da1 100644 --- a/src/nextbillionai/types/skynet/asset_create_response.py +++ b/src/nextbillionai/types/skynet/asset_create_response.py @@ -8,6 +8,8 @@ class Data(BaseModel): + """An object containing the ID of the asset created.""" + id: Optional[str] = None """Unique ID of the asset created. diff --git a/src/nextbillionai/types/skynet/asset_details.py b/src/nextbillionai/types/skynet/asset_details.py index 35c0ee3..7d981a1 100644 --- a/src/nextbillionai/types/skynet/asset_details.py +++ b/src/nextbillionai/types/skynet/asset_details.py @@ -8,6 +8,8 @@ class LatestLocationLocation(BaseModel): + """An object with the coordinates of the last tracked location.""" + lat: Optional[float] = None """Latitude of the tracked location of the asset.""" @@ -16,6 +18,8 @@ class LatestLocationLocation(BaseModel): class LatestLocation(BaseModel): + """An object with details of the last tracked location of the asset.""" + accuracy: Optional[float] = None """ If available, this property returns the accuracy of the GPS information received @@ -57,6 +61,8 @@ class LatestLocation(BaseModel): class AssetDetails(BaseModel): + """An object with details of the asset properties.""" + id: Optional[str] = None """ID of the asset. diff --git a/src/nextbillionai/types/skynet/asset_list_response.py b/src/nextbillionai/types/skynet/asset_list_response.py index d069a2a..11431f3 100644 --- a/src/nextbillionai/types/skynet/asset_list_response.py +++ b/src/nextbillionai/types/skynet/asset_list_response.py @@ -10,6 +10,8 @@ class Data(BaseModel): + """A data object containing the list of assets.""" + list: Optional[List[AssetDetails]] = None """An array of objects, with each object representing one asset.""" diff --git a/src/nextbillionai/types/skynet/asset_retrieve_response.py b/src/nextbillionai/types/skynet/asset_retrieve_response.py index 67c5d1d..29d83ee 100644 --- a/src/nextbillionai/types/skynet/asset_retrieve_response.py +++ b/src/nextbillionai/types/skynet/asset_retrieve_response.py @@ -9,6 +9,8 @@ class Data(BaseModel): + """An object containing the information about the asset returned.""" + asset: Optional[AssetDetails] = None """An object with details of the asset properties.""" diff --git a/src/nextbillionai/types/skynet/asset_track_params.py b/src/nextbillionai/types/skynet/asset_track_params.py index 12d2ee8..78f80a9 100644 --- a/src/nextbillionai/types/skynet/asset_track_params.py +++ b/src/nextbillionai/types/skynet/asset_track_params.py @@ -32,6 +32,11 @@ class AssetTrackParams(TypedDict, total=False): class LocationsLocation(TypedDict, total=False): + """An object to collect the coordinate details of the tracked location. + + Please note this field is mandatory when uploading locations for an asset. + """ + lat: Required[float] """Latitude of the tracked location of the asset.""" @@ -40,6 +45,11 @@ class LocationsLocation(TypedDict, total=False): class Locations(TypedDict, total=False): + """An array of objects to collect the location tracking information for an asset. + + Each object must correspond to details of only one location. + """ + location: Required[LocationsLocation] """An object to collect the coordinate details of the tracked location. diff --git a/src/nextbillionai/types/skynet/config_retrieve_response.py b/src/nextbillionai/types/skynet/config_retrieve_response.py index 33df945..c7fe739 100644 --- a/src/nextbillionai/types/skynet/config_retrieve_response.py +++ b/src/nextbillionai/types/skynet/config_retrieve_response.py @@ -17,6 +17,8 @@ class DataConfig(BaseModel): class Data(BaseModel): + """A data object containing the config response.""" + config: Optional[DataConfig] = None diff --git a/src/nextbillionai/types/skynet/monitor.py b/src/nextbillionai/types/skynet/monitor.py index b617986..5ef5402 100644 --- a/src/nextbillionai/types/skynet/monitor.py +++ b/src/nextbillionai/types/skynet/monitor.py @@ -9,6 +9,10 @@ class GeofenceConfig(BaseModel): + """ + An object returning the details of the geofence that are associated with the monitor for an enter, exit or enter_and_exit type of monitor. + """ + geofence_ids: Optional[List[str]] = None """An array of geofence IDs that are linked to the monitor. @@ -18,6 +22,10 @@ class GeofenceConfig(BaseModel): class IdleConfig(BaseModel): + """ + An object returning the details of the idle activity constraints for a idle type of monitor. + """ + distance_tolerance: Optional[float] = None """ This parameter returns the distance threshold that was used to determine if the @@ -35,6 +43,8 @@ class IdleConfig(BaseModel): class MatchFilter(BaseModel): + """Use this object to update the attributes of the monitor.""" + include_all_of_attributes: Optional[object] = None """ A string type dictionary object to specify the attributes which will be used to @@ -68,6 +78,10 @@ class MatchFilter(BaseModel): class SpeedingConfig(BaseModel): + """ + An object returning the details of the over-speeding constraints for a speeding type of monitor. + """ + customer_speed_limit: Optional[int] = None """ This property returns the actual speed limit that the monitor uses as a diff --git a/src/nextbillionai/types/skynet/monitor_create_params.py b/src/nextbillionai/types/skynet/monitor_create_params.py index fe50055..ad7e6ff 100644 --- a/src/nextbillionai/types/skynet/monitor_create_params.py +++ b/src/nextbillionai/types/skynet/monitor_create_params.py @@ -131,6 +131,13 @@ class MonitorCreateParams(TypedDict, total=False): class GeofenceConfig(TypedDict, total=False): + """Geofences are geographic boundaries surrounding an area of interest. + + geofence_config is used to specify the geofences for creating enter or exit type of events based on the asset's location. When an asset associated with the monitor enters the given geofence, an enter type event is created, whereas when the asset moves out of the geofence an exit type event is created. + + Please note that this object is mandatory when the monitor type belongs to one of enter, exit or enter_and_exit. + """ + geofence_ids: Required[SequenceNotStr[str]] """ An array of strings to collect the geofence IDs that should be linked to the @@ -140,6 +147,13 @@ class GeofenceConfig(TypedDict, total=False): class IdleConfig(TypedDict, total=False): + """idle_config is used to set up constraints for creating idle events. + + When an asset associated with the monitor has not moved a given distance within a given time, the Live Tracking API can create events to denote such instances. Please note that this object is mandatory when the monitor type is idle. + + Let's look at the properties of this object. + """ + distance_tolerance: Required[float] """ Use this parameter to configure a distance threshold that will be used to @@ -177,6 +191,10 @@ class IdleConfig(TypedDict, total=False): class MatchFilter(TypedDict, total=False): + """ + This object is used to identify the asset(s) on which the monitor would be applied. + """ + include_all_of_attributes: object """A string type dictionary object to specify the attributes. @@ -207,6 +225,13 @@ class MatchFilter(TypedDict, total=False): class SpeedingConfig(TypedDict, total=False): + """speeding_config is used to set up constraints for creating over-speed events. + + When an asset associated with a monitor is traveling at a speed above the given limits, the Live Tracking API can create events to denote such instances. There is also an option to set up a tolerance before creating an event. Please note that this object is mandatory when type=speeding. + + Let's look at the properties of this object. + """ + customer_speed_limit: int """ Use this parameter to establish the speed limit that will allow the monitor to diff --git a/src/nextbillionai/types/skynet/monitor_create_response.py b/src/nextbillionai/types/skynet/monitor_create_response.py index bb621ee..2b055ed 100644 --- a/src/nextbillionai/types/skynet/monitor_create_response.py +++ b/src/nextbillionai/types/skynet/monitor_create_response.py @@ -8,6 +8,8 @@ class Data(BaseModel): + """A data object containing the ID of the monitor created.""" + id: Optional[str] = None """Unique ID of the monitor created. Please note this ID cannot be updated.""" diff --git a/src/nextbillionai/types/skynet/monitor_list_response.py b/src/nextbillionai/types/skynet/monitor_list_response.py index ecaed28..af7628f 100644 --- a/src/nextbillionai/types/skynet/monitor_list_response.py +++ b/src/nextbillionai/types/skynet/monitor_list_response.py @@ -10,6 +10,8 @@ class Data(BaseModel): + """A data object containing the result.""" + list: Optional[List[Monitor]] = None """An array of objects listing all the monitors. diff --git a/src/nextbillionai/types/skynet/monitor_retrieve_response.py b/src/nextbillionai/types/skynet/monitor_retrieve_response.py index 472c342..8b0b8f0 100644 --- a/src/nextbillionai/types/skynet/monitor_retrieve_response.py +++ b/src/nextbillionai/types/skynet/monitor_retrieve_response.py @@ -9,6 +9,8 @@ class Data(BaseModel): + """A data object containing the details of the monitor.""" + monitor: Optional[Monitor] = None diff --git a/src/nextbillionai/types/skynet/monitor_update_params.py b/src/nextbillionai/types/skynet/monitor_update_params.py index f69b10a..0b95de7 100644 --- a/src/nextbillionai/types/skynet/monitor_update_params.py +++ b/src/nextbillionai/types/skynet/monitor_update_params.py @@ -112,6 +112,10 @@ class MonitorUpdateParams(TypedDict, total=False): class GeofenceConfig(TypedDict, total=False): + """ + geofence_config is used to update the set of geofences linked to the monitor for creating enter or exit type of events based on the asset's location. Please note that this object is mandatory when the monitor type belongs to one of enter, exit or enter_and_exit. + """ + geofence_ids: Required[SequenceNotStr[str]] """Use this array to update the geofence IDs that should be linked to the monitor. @@ -120,6 +124,13 @@ class GeofenceConfig(TypedDict, total=False): class IdleConfig(TypedDict, total=False): + """idle_config is used to update the constraints for creating idle events. + + When an asset associated with the monitor has not moved a given distance within a given time, the Live Tracking API can create events to denote such instances. + + Please note that this object is mandatory when the monitor type is idle. + """ + distance_tolerance: Required[float] """ Use this parameter to update the distance threshold that will be used to @@ -149,6 +160,11 @@ class IdleConfig(TypedDict, total=False): class MatchFilter(TypedDict, total=False): + """Use this object to update the attributes of the monitor. + + Please note that using this property will overwrite the existing attributes that the monitor might be using currently to match any asset(s). + """ + include_all_of_attributes: object """A string type dictionary object to specify the attributes. @@ -179,6 +195,12 @@ class MatchFilter(TypedDict, total=False): class SpeedingConfig(TypedDict, total=False): + """ + speeding_config is used to update the tolerance values for creating over-speed events. When an asset associated with a monitor is traveling at a speed above the given limits, Live Tracking API creates events to indicate such instances. + + Please note that this object is mandatory when the monitor type is speeding. + """ + customer_speed_limit: str """ Use this parameter to update the speed limit value that the monitor will use to diff --git a/src/nextbillionai/types/skynet/namespaced_apikey_create_response.py b/src/nextbillionai/types/skynet/namespaced_apikey_create_response.py index a3a7970..be9a94f 100644 --- a/src/nextbillionai/types/skynet/namespaced_apikey_create_response.py +++ b/src/nextbillionai/types/skynet/namespaced_apikey_create_response.py @@ -8,6 +8,8 @@ class Result(BaseModel): + """An object to return the details about the namespace key created.""" + apikey: Optional[str] = None """Returns the unique key created for the specified namespace.""" diff --git a/src/nextbillionai/types/skynet/pagination.py b/src/nextbillionai/types/skynet/pagination.py index 0d029b7..ee0fa7b 100644 --- a/src/nextbillionai/types/skynet/pagination.py +++ b/src/nextbillionai/types/skynet/pagination.py @@ -8,6 +8,11 @@ class Pagination(BaseModel): + """An object with pagination details of the search results. + + Use this object to implement pagination in your application. + """ + hasmore: Optional[bool] = None """ A boolean value indicating whether there are more items available beyond the diff --git a/src/nextbillionai/types/skynet/search/polygon_create_params.py b/src/nextbillionai/types/skynet/search/polygon_create_params.py index 8ae2144..8751d68 100644 --- a/src/nextbillionai/types/skynet/search/polygon_create_params.py +++ b/src/nextbillionai/types/skynet/search/polygon_create_params.py @@ -73,6 +73,17 @@ class PolygonCreateParams(TypedDict, total=False): class Polygon(TypedDict, total=False): + """An object to collect geoJSON details of a custom polygon. Please ensure that: + + - the polygon provided is enclosed. This can be achieved by making the last location coordinate in the list equal to the first location coordinate of the list. + + - the 'polygon' provided does not contain multiple rings. + + The contents of this object follow the [geoJSON standard](https://datatracker.ietf.org/doc/html/rfc7946). + + Please note that the maximum area of the search polygon allowed is 3000 km2. + """ + coordinates: Required[Iterable[float]] """ An array of coordinates in the [longitude, latitude] format, representing the @@ -84,6 +95,10 @@ class Polygon(TypedDict, total=False): class MatchFilter(TypedDict, total=False): + """ + An object to define the attributes which will be used to filter the assets found within the polygon. + """ + include_all_of_attributes: str """ Use this parameter to filter the assets found inside the specified area by their @@ -108,6 +123,10 @@ class MatchFilter(TypedDict, total=False): class SortSortDestination(TypedDict, total=False): + """ + Specifies the location coordinates of the point which acts as destination for sorting the assets in the search results. The service will sort each asset based on the driving distance or travel time to this destination, from its current location. Use the sort_by parameter to configure the metric that should be used for sorting the assets. Please note that sort_destination is required when sort_by is provided. + """ + lat: Required[float] """Latitude of the destination location""" diff --git a/src/nextbillionai/types/skynet/search_response.py b/src/nextbillionai/types/skynet/search_response.py index e3c2a94..dee2ef9 100644 --- a/src/nextbillionai/types/skynet/search_response.py +++ b/src/nextbillionai/types/skynet/search_response.py @@ -10,6 +10,10 @@ class DataAssetRankingInfo(BaseModel): + """ + An object returning the sorting details of the asset as per the configuration specified in the input. + """ + distance: Optional[float] = None """Driving distance between the asset and the sort_destination.""" @@ -93,6 +97,8 @@ class DataAsset(BaseModel): class Data(BaseModel): + """A data object containing the search result.""" + assets: Optional[List[DataAsset]] = None """An array of objects with details of the asset(s) returned in the search result. diff --git a/src/nextbillionai/types/skynet/trip_get_summary_response.py b/src/nextbillionai/types/skynet/trip_get_summary_response.py index 182b27d..4fbecfa 100644 --- a/src/nextbillionai/types/skynet/trip_get_summary_response.py +++ b/src/nextbillionai/types/skynet/trip_get_summary_response.py @@ -11,6 +11,8 @@ class DataTrip(BaseModel): + """An object containing the returned trip summary.""" + id: Optional[str] = None """Returns the unique identifier of the trip.""" @@ -117,6 +119,8 @@ class DataTrip(BaseModel): class Data(BaseModel): + """An container for the trip returned by the service.""" + trip: Optional[DataTrip] = None """An object containing the returned trip summary.""" diff --git a/src/nextbillionai/types/skynet/trip_retrieve_response.py b/src/nextbillionai/types/skynet/trip_retrieve_response.py index bd8b0cd..83af13b 100644 --- a/src/nextbillionai/types/skynet/trip_retrieve_response.py +++ b/src/nextbillionai/types/skynet/trip_retrieve_response.py @@ -10,6 +10,8 @@ class DataTrip(BaseModel): + """An object containing the returned trip details.""" + id: Optional[str] = None """Returns the unique identifier of the trip.""" @@ -92,6 +94,8 @@ class DataTrip(BaseModel): class Data(BaseModel): + """An container for the trip returned by the service.""" + trip: Optional[DataTrip] = None """An object containing the returned trip details.""" diff --git a/src/nextbillionai/types/snap_to_road_snap_response.py b/src/nextbillionai/types/snap_to_road_snap_response.py index d9e5ab9..f97159e 100644 --- a/src/nextbillionai/types/snap_to_road_snap_response.py +++ b/src/nextbillionai/types/snap_to_road_snap_response.py @@ -18,6 +18,8 @@ class GeojsonGeometry(BaseModel): + """An object with details of the geoJSON geometry of the snapped path.""" + coordinates: Optional[List[float]] = None """ An array of coordinates in the [longitude, latitude] format, representing the @@ -29,6 +31,11 @@ class GeojsonGeometry(BaseModel): class Geojson(BaseModel): + """A GeoJSON object with details of the snapped path. + + This object is returned when the geometry field is set to geojson in the input request, otherwise it is not present in the response. The contents of this object follow the [geoJSON standard](https://datatracker.ietf.org/doc/html/rfc7946). + """ + geometry: Optional[GeojsonGeometry] = None """An object with details of the geoJSON geometry of the snapped path.""" @@ -63,6 +70,10 @@ class RoadInfoMaxSpeed(BaseModel): class RoadInfo(BaseModel): + """ + An object containing the maximum speed information for each road segment present in the route. + """ + max_speed: Optional[List[RoadInfoMaxSpeed]] = None """ An array of objects containing maximum speed, in kilometers per hour, for each @@ -71,6 +82,8 @@ class RoadInfo(BaseModel): class SnappedPointLocation(BaseModel): + """The latitude and longitude coordinates of the snapped point.""" + latitude: float """Latitude of the snapped point.""" @@ -104,6 +117,8 @@ class SnappedPoint(BaseModel): class SnapToRoadSnapResponse(BaseModel): + """Response Body""" + distance: Optional[int] = None """The total distance of the snapped path in meters.""" From a456de96ce398e197294b9c2b6a6ee0e0c4d0a67 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 16 Dec 2025 05:27:31 +0000 Subject: [PATCH 30/35] chore(internal): codegen related update --- src/nextbillionai/_base_client.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/nextbillionai/_base_client.py b/src/nextbillionai/_base_client.py index fdbd123..aab30d3 100644 --- a/src/nextbillionai/_base_client.py +++ b/src/nextbillionai/_base_client.py @@ -1247,9 +1247,12 @@ def patch( *, cast_to: Type[ResponseT], body: Body | None = None, + files: RequestFiles | None = None, options: RequestOptions = {}, ) -> ResponseT: - opts = FinalRequestOptions.construct(method="patch", url=path, json_data=body, **options) + opts = FinalRequestOptions.construct( + method="patch", url=path, json_data=body, files=to_httpx_files(files), **options + ) return self.request(cast_to, opts) def put( @@ -1767,9 +1770,12 @@ async def patch( *, cast_to: Type[ResponseT], body: Body | None = None, + files: RequestFiles | None = None, options: RequestOptions = {}, ) -> ResponseT: - opts = FinalRequestOptions.construct(method="patch", url=path, json_data=body, **options) + opts = FinalRequestOptions.construct( + method="patch", url=path, json_data=body, files=to_httpx_files(files), **options + ) return await self.request(cast_to, opts) async def put( From fcd6dff8d60e3cdc989727e6a0502e4c7bfd5371 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 17 Dec 2025 08:38:25 +0000 Subject: [PATCH 31/35] chore(internal): codegen related update --- src/nextbillionai/_client.py | 1226 +++++++++++++++++++++++++++------- 1 file changed, 982 insertions(+), 244 deletions(-) diff --git a/src/nextbillionai/_client.py b/src/nextbillionai/_client.py index 7ad0066..d45242b 100644 --- a/src/nextbillionai/_client.py +++ b/src/nextbillionai/_client.py @@ -3,7 +3,7 @@ from __future__ import annotations import os -from typing import Any, Mapping +from typing import TYPE_CHECKING, Any, Mapping from typing_extensions import Self, override import httpx @@ -20,28 +20,8 @@ not_given, ) from ._utils import is_given, get_async_library +from ._compat import cached_property from ._version import __version__ -from .resources import ( - map, - mdm, - areas, - batch, - browse, - lookup, - geocode, - discover, - isochrone, - directions, - navigation, - postalcode, - revgeocode, - autosuggest, - autocomplete, - restrictions, - route_report, - snap_to_roads, - restrictions_items, -) from ._streaming import Stream as Stream, AsyncStream as AsyncStream from ._exceptions import APIStatusError, NextbillionSDKError from ._base_client import ( @@ -49,12 +29,60 @@ SyncAPIClient, AsyncAPIClient, ) -from .resources.skynet import skynet -from .resources.fleetify import fleetify -from .resources.geofence import geofence -from .resources.multigeocode import multigeocode -from .resources.optimization import optimization -from .resources.distance_matrix import distance_matrix + +if TYPE_CHECKING: + from .resources import ( + map, + mdm, + areas, + batch, + browse, + lookup, + skynet, + geocode, + discover, + fleetify, + geofence, + isochrone, + directions, + navigation, + postalcode, + revgeocode, + autosuggest, + autocomplete, + multigeocode, + optimization, + restrictions, + route_report, + snap_to_roads, + distance_matrix, + restrictions_items, + ) + from .resources.map import MapResource, AsyncMapResource + from .resources.mdm import MdmResource, AsyncMdmResource + from .resources.areas import AreasResource, AsyncAreasResource + from .resources.batch import BatchResource, AsyncBatchResource + from .resources.browse import BrowseResource, AsyncBrowseResource + from .resources.lookup import LookupResource, AsyncLookupResource + from .resources.geocode import GeocodeResource, AsyncGeocodeResource + from .resources.discover import DiscoverResource, AsyncDiscoverResource + from .resources.isochrone import IsochroneResource, AsyncIsochroneResource + from .resources.directions import DirectionsResource, AsyncDirectionsResource + from .resources.navigation import NavigationResource, AsyncNavigationResource + from .resources.postalcode import PostalcodeResource, AsyncPostalcodeResource + from .resources.revgeocode import RevgeocodeResource, AsyncRevgeocodeResource + from .resources.autosuggest import AutosuggestResource, AsyncAutosuggestResource + from .resources.autocomplete import AutocompleteResource, AsyncAutocompleteResource + from .resources.restrictions import RestrictionsResource, AsyncRestrictionsResource + from .resources.route_report import RouteReportResource, AsyncRouteReportResource + from .resources.skynet.skynet import SkynetResource, AsyncSkynetResource + from .resources.snap_to_roads import SnapToRoadsResource, AsyncSnapToRoadsResource + from .resources.fleetify.fleetify import FleetifyResource, AsyncFleetifyResource + from .resources.geofence.geofence import GeofenceResource, AsyncGeofenceResource + from .resources.restrictions_items import RestrictionsItemsResource, AsyncRestrictionsItemsResource + from .resources.multigeocode.multigeocode import MultigeocodeResource, AsyncMultigeocodeResource + from .resources.optimization.optimization import OptimizationResource, AsyncOptimizationResource + from .resources.distance_matrix.distance_matrix import DistanceMatrixResource, AsyncDistanceMatrixResource __all__ = [ "Timeout", @@ -69,34 +97,6 @@ class NextbillionSDK(SyncAPIClient): - fleetify: fleetify.FleetifyResource - skynet: skynet.SkynetResource - geocode: geocode.GeocodeResource - optimization: optimization.OptimizationResource - geofence: geofence.GeofenceResource - discover: discover.DiscoverResource - browse: browse.BrowseResource - mdm: mdm.MdmResource - isochrone: isochrone.IsochroneResource - restrictions: restrictions.RestrictionsResource - restrictions_items: restrictions_items.RestrictionsItemsResource - distance_matrix: distance_matrix.DistanceMatrixResource - autocomplete: autocomplete.AutocompleteResource - navigation: navigation.NavigationResource - map: map.MapResource - autosuggest: autosuggest.AutosuggestResource - directions: directions.DirectionsResource - batch: batch.BatchResource - multigeocode: multigeocode.MultigeocodeResource - revgeocode: revgeocode.RevgeocodeResource - route_report: route_report.RouteReportResource - snap_to_roads: snap_to_roads.SnapToRoadsResource - postalcode: postalcode.PostalcodeResource - lookup: lookup.LookupResource - areas: areas.AreasResource - with_raw_response: NextbillionSDKWithRawResponse - with_streaming_response: NextbillionSDKWithStreamedResponse - # client options api_key: str @@ -151,33 +151,163 @@ def __init__( _strict_response_validation=_strict_response_validation, ) - self.fleetify = fleetify.FleetifyResource(self) - self.skynet = skynet.SkynetResource(self) - self.geocode = geocode.GeocodeResource(self) - self.optimization = optimization.OptimizationResource(self) - self.geofence = geofence.GeofenceResource(self) - self.discover = discover.DiscoverResource(self) - self.browse = browse.BrowseResource(self) - self.mdm = mdm.MdmResource(self) - self.isochrone = isochrone.IsochroneResource(self) - self.restrictions = restrictions.RestrictionsResource(self) - self.restrictions_items = restrictions_items.RestrictionsItemsResource(self) - self.distance_matrix = distance_matrix.DistanceMatrixResource(self) - self.autocomplete = autocomplete.AutocompleteResource(self) - self.navigation = navigation.NavigationResource(self) - self.map = map.MapResource(self) - self.autosuggest = autosuggest.AutosuggestResource(self) - self.directions = directions.DirectionsResource(self) - self.batch = batch.BatchResource(self) - self.multigeocode = multigeocode.MultigeocodeResource(self) - self.revgeocode = revgeocode.RevgeocodeResource(self) - self.route_report = route_report.RouteReportResource(self) - self.snap_to_roads = snap_to_roads.SnapToRoadsResource(self) - self.postalcode = postalcode.PostalcodeResource(self) - self.lookup = lookup.LookupResource(self) - self.areas = areas.AreasResource(self) - self.with_raw_response = NextbillionSDKWithRawResponse(self) - self.with_streaming_response = NextbillionSDKWithStreamedResponse(self) + @cached_property + def fleetify(self) -> FleetifyResource: + from .resources.fleetify import FleetifyResource + + return FleetifyResource(self) + + @cached_property + def skynet(self) -> SkynetResource: + from .resources.skynet import SkynetResource + + return SkynetResource(self) + + @cached_property + def geocode(self) -> GeocodeResource: + from .resources.geocode import GeocodeResource + + return GeocodeResource(self) + + @cached_property + def optimization(self) -> OptimizationResource: + from .resources.optimization import OptimizationResource + + return OptimizationResource(self) + + @cached_property + def geofence(self) -> GeofenceResource: + from .resources.geofence import GeofenceResource + + return GeofenceResource(self) + + @cached_property + def discover(self) -> DiscoverResource: + from .resources.discover import DiscoverResource + + return DiscoverResource(self) + + @cached_property + def browse(self) -> BrowseResource: + from .resources.browse import BrowseResource + + return BrowseResource(self) + + @cached_property + def mdm(self) -> MdmResource: + from .resources.mdm import MdmResource + + return MdmResource(self) + + @cached_property + def isochrone(self) -> IsochroneResource: + from .resources.isochrone import IsochroneResource + + return IsochroneResource(self) + + @cached_property + def restrictions(self) -> RestrictionsResource: + from .resources.restrictions import RestrictionsResource + + return RestrictionsResource(self) + + @cached_property + def restrictions_items(self) -> RestrictionsItemsResource: + from .resources.restrictions_items import RestrictionsItemsResource + + return RestrictionsItemsResource(self) + + @cached_property + def distance_matrix(self) -> DistanceMatrixResource: + from .resources.distance_matrix import DistanceMatrixResource + + return DistanceMatrixResource(self) + + @cached_property + def autocomplete(self) -> AutocompleteResource: + from .resources.autocomplete import AutocompleteResource + + return AutocompleteResource(self) + + @cached_property + def navigation(self) -> NavigationResource: + from .resources.navigation import NavigationResource + + return NavigationResource(self) + + @cached_property + def map(self) -> MapResource: + from .resources.map import MapResource + + return MapResource(self) + + @cached_property + def autosuggest(self) -> AutosuggestResource: + from .resources.autosuggest import AutosuggestResource + + return AutosuggestResource(self) + + @cached_property + def directions(self) -> DirectionsResource: + from .resources.directions import DirectionsResource + + return DirectionsResource(self) + + @cached_property + def batch(self) -> BatchResource: + from .resources.batch import BatchResource + + return BatchResource(self) + + @cached_property + def multigeocode(self) -> MultigeocodeResource: + from .resources.multigeocode import MultigeocodeResource + + return MultigeocodeResource(self) + + @cached_property + def revgeocode(self) -> RevgeocodeResource: + from .resources.revgeocode import RevgeocodeResource + + return RevgeocodeResource(self) + + @cached_property + def route_report(self) -> RouteReportResource: + from .resources.route_report import RouteReportResource + + return RouteReportResource(self) + + @cached_property + def snap_to_roads(self) -> SnapToRoadsResource: + from .resources.snap_to_roads import SnapToRoadsResource + + return SnapToRoadsResource(self) + + @cached_property + def postalcode(self) -> PostalcodeResource: + from .resources.postalcode import PostalcodeResource + + return PostalcodeResource(self) + + @cached_property + def lookup(self) -> LookupResource: + from .resources.lookup import LookupResource + + return LookupResource(self) + + @cached_property + def areas(self) -> AreasResource: + from .resources.areas import AreasResource + + return AreasResource(self) + + @cached_property + def with_raw_response(self) -> NextbillionSDKWithRawResponse: + return NextbillionSDKWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> NextbillionSDKWithStreamedResponse: + return NextbillionSDKWithStreamedResponse(self) @property @override @@ -288,34 +418,6 @@ def _make_status_error( class AsyncNextbillionSDK(AsyncAPIClient): - fleetify: fleetify.AsyncFleetifyResource - skynet: skynet.AsyncSkynetResource - geocode: geocode.AsyncGeocodeResource - optimization: optimization.AsyncOptimizationResource - geofence: geofence.AsyncGeofenceResource - discover: discover.AsyncDiscoverResource - browse: browse.AsyncBrowseResource - mdm: mdm.AsyncMdmResource - isochrone: isochrone.AsyncIsochroneResource - restrictions: restrictions.AsyncRestrictionsResource - restrictions_items: restrictions_items.AsyncRestrictionsItemsResource - distance_matrix: distance_matrix.AsyncDistanceMatrixResource - autocomplete: autocomplete.AsyncAutocompleteResource - navigation: navigation.AsyncNavigationResource - map: map.AsyncMapResource - autosuggest: autosuggest.AsyncAutosuggestResource - directions: directions.AsyncDirectionsResource - batch: batch.AsyncBatchResource - multigeocode: multigeocode.AsyncMultigeocodeResource - revgeocode: revgeocode.AsyncRevgeocodeResource - route_report: route_report.AsyncRouteReportResource - snap_to_roads: snap_to_roads.AsyncSnapToRoadsResource - postalcode: postalcode.AsyncPostalcodeResource - lookup: lookup.AsyncLookupResource - areas: areas.AsyncAreasResource - with_raw_response: AsyncNextbillionSDKWithRawResponse - with_streaming_response: AsyncNextbillionSDKWithStreamedResponse - # client options api_key: str @@ -370,33 +472,163 @@ def __init__( _strict_response_validation=_strict_response_validation, ) - self.fleetify = fleetify.AsyncFleetifyResource(self) - self.skynet = skynet.AsyncSkynetResource(self) - self.geocode = geocode.AsyncGeocodeResource(self) - self.optimization = optimization.AsyncOptimizationResource(self) - self.geofence = geofence.AsyncGeofenceResource(self) - self.discover = discover.AsyncDiscoverResource(self) - self.browse = browse.AsyncBrowseResource(self) - self.mdm = mdm.AsyncMdmResource(self) - self.isochrone = isochrone.AsyncIsochroneResource(self) - self.restrictions = restrictions.AsyncRestrictionsResource(self) - self.restrictions_items = restrictions_items.AsyncRestrictionsItemsResource(self) - self.distance_matrix = distance_matrix.AsyncDistanceMatrixResource(self) - self.autocomplete = autocomplete.AsyncAutocompleteResource(self) - self.navigation = navigation.AsyncNavigationResource(self) - self.map = map.AsyncMapResource(self) - self.autosuggest = autosuggest.AsyncAutosuggestResource(self) - self.directions = directions.AsyncDirectionsResource(self) - self.batch = batch.AsyncBatchResource(self) - self.multigeocode = multigeocode.AsyncMultigeocodeResource(self) - self.revgeocode = revgeocode.AsyncRevgeocodeResource(self) - self.route_report = route_report.AsyncRouteReportResource(self) - self.snap_to_roads = snap_to_roads.AsyncSnapToRoadsResource(self) - self.postalcode = postalcode.AsyncPostalcodeResource(self) - self.lookup = lookup.AsyncLookupResource(self) - self.areas = areas.AsyncAreasResource(self) - self.with_raw_response = AsyncNextbillionSDKWithRawResponse(self) - self.with_streaming_response = AsyncNextbillionSDKWithStreamedResponse(self) + @cached_property + def fleetify(self) -> AsyncFleetifyResource: + from .resources.fleetify import AsyncFleetifyResource + + return AsyncFleetifyResource(self) + + @cached_property + def skynet(self) -> AsyncSkynetResource: + from .resources.skynet import AsyncSkynetResource + + return AsyncSkynetResource(self) + + @cached_property + def geocode(self) -> AsyncGeocodeResource: + from .resources.geocode import AsyncGeocodeResource + + return AsyncGeocodeResource(self) + + @cached_property + def optimization(self) -> AsyncOptimizationResource: + from .resources.optimization import AsyncOptimizationResource + + return AsyncOptimizationResource(self) + + @cached_property + def geofence(self) -> AsyncGeofenceResource: + from .resources.geofence import AsyncGeofenceResource + + return AsyncGeofenceResource(self) + + @cached_property + def discover(self) -> AsyncDiscoverResource: + from .resources.discover import AsyncDiscoverResource + + return AsyncDiscoverResource(self) + + @cached_property + def browse(self) -> AsyncBrowseResource: + from .resources.browse import AsyncBrowseResource + + return AsyncBrowseResource(self) + + @cached_property + def mdm(self) -> AsyncMdmResource: + from .resources.mdm import AsyncMdmResource + + return AsyncMdmResource(self) + + @cached_property + def isochrone(self) -> AsyncIsochroneResource: + from .resources.isochrone import AsyncIsochroneResource + + return AsyncIsochroneResource(self) + + @cached_property + def restrictions(self) -> AsyncRestrictionsResource: + from .resources.restrictions import AsyncRestrictionsResource + + return AsyncRestrictionsResource(self) + + @cached_property + def restrictions_items(self) -> AsyncRestrictionsItemsResource: + from .resources.restrictions_items import AsyncRestrictionsItemsResource + + return AsyncRestrictionsItemsResource(self) + + @cached_property + def distance_matrix(self) -> AsyncDistanceMatrixResource: + from .resources.distance_matrix import AsyncDistanceMatrixResource + + return AsyncDistanceMatrixResource(self) + + @cached_property + def autocomplete(self) -> AsyncAutocompleteResource: + from .resources.autocomplete import AsyncAutocompleteResource + + return AsyncAutocompleteResource(self) + + @cached_property + def navigation(self) -> AsyncNavigationResource: + from .resources.navigation import AsyncNavigationResource + + return AsyncNavigationResource(self) + + @cached_property + def map(self) -> AsyncMapResource: + from .resources.map import AsyncMapResource + + return AsyncMapResource(self) + + @cached_property + def autosuggest(self) -> AsyncAutosuggestResource: + from .resources.autosuggest import AsyncAutosuggestResource + + return AsyncAutosuggestResource(self) + + @cached_property + def directions(self) -> AsyncDirectionsResource: + from .resources.directions import AsyncDirectionsResource + + return AsyncDirectionsResource(self) + + @cached_property + def batch(self) -> AsyncBatchResource: + from .resources.batch import AsyncBatchResource + + return AsyncBatchResource(self) + + @cached_property + def multigeocode(self) -> AsyncMultigeocodeResource: + from .resources.multigeocode import AsyncMultigeocodeResource + + return AsyncMultigeocodeResource(self) + + @cached_property + def revgeocode(self) -> AsyncRevgeocodeResource: + from .resources.revgeocode import AsyncRevgeocodeResource + + return AsyncRevgeocodeResource(self) + + @cached_property + def route_report(self) -> AsyncRouteReportResource: + from .resources.route_report import AsyncRouteReportResource + + return AsyncRouteReportResource(self) + + @cached_property + def snap_to_roads(self) -> AsyncSnapToRoadsResource: + from .resources.snap_to_roads import AsyncSnapToRoadsResource + + return AsyncSnapToRoadsResource(self) + + @cached_property + def postalcode(self) -> AsyncPostalcodeResource: + from .resources.postalcode import AsyncPostalcodeResource + + return AsyncPostalcodeResource(self) + + @cached_property + def lookup(self) -> AsyncLookupResource: + from .resources.lookup import AsyncLookupResource + + return AsyncLookupResource(self) + + @cached_property + def areas(self) -> AsyncAreasResource: + from .resources.areas import AsyncAreasResource + + return AsyncAreasResource(self) + + @cached_property + def with_raw_response(self) -> AsyncNextbillionSDKWithRawResponse: + return AsyncNextbillionSDKWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncNextbillionSDKWithStreamedResponse: + return AsyncNextbillionSDKWithStreamedResponse(self) @property @override @@ -507,125 +739,631 @@ def _make_status_error( class NextbillionSDKWithRawResponse: + _client: NextbillionSDK + def __init__(self, client: NextbillionSDK) -> None: - self.fleetify = fleetify.FleetifyResourceWithRawResponse(client.fleetify) - self.skynet = skynet.SkynetResourceWithRawResponse(client.skynet) - self.geocode = geocode.GeocodeResourceWithRawResponse(client.geocode) - self.optimization = optimization.OptimizationResourceWithRawResponse(client.optimization) - self.geofence = geofence.GeofenceResourceWithRawResponse(client.geofence) - self.discover = discover.DiscoverResourceWithRawResponse(client.discover) - self.browse = browse.BrowseResourceWithRawResponse(client.browse) - self.mdm = mdm.MdmResourceWithRawResponse(client.mdm) - self.isochrone = isochrone.IsochroneResourceWithRawResponse(client.isochrone) - self.restrictions = restrictions.RestrictionsResourceWithRawResponse(client.restrictions) - self.restrictions_items = restrictions_items.RestrictionsItemsResourceWithRawResponse(client.restrictions_items) - self.distance_matrix = distance_matrix.DistanceMatrixResourceWithRawResponse(client.distance_matrix) - self.autocomplete = autocomplete.AutocompleteResourceWithRawResponse(client.autocomplete) - self.navigation = navigation.NavigationResourceWithRawResponse(client.navigation) - self.map = map.MapResourceWithRawResponse(client.map) - self.autosuggest = autosuggest.AutosuggestResourceWithRawResponse(client.autosuggest) - self.directions = directions.DirectionsResourceWithRawResponse(client.directions) - self.batch = batch.BatchResourceWithRawResponse(client.batch) - self.multigeocode = multigeocode.MultigeocodeResourceWithRawResponse(client.multigeocode) - self.revgeocode = revgeocode.RevgeocodeResourceWithRawResponse(client.revgeocode) - self.route_report = route_report.RouteReportResourceWithRawResponse(client.route_report) - self.snap_to_roads = snap_to_roads.SnapToRoadsResourceWithRawResponse(client.snap_to_roads) - self.postalcode = postalcode.PostalcodeResourceWithRawResponse(client.postalcode) - self.lookup = lookup.LookupResourceWithRawResponse(client.lookup) - self.areas = areas.AreasResourceWithRawResponse(client.areas) + self._client = client + + @cached_property + def fleetify(self) -> fleetify.FleetifyResourceWithRawResponse: + from .resources.fleetify import FleetifyResourceWithRawResponse + + return FleetifyResourceWithRawResponse(self._client.fleetify) + + @cached_property + def skynet(self) -> skynet.SkynetResourceWithRawResponse: + from .resources.skynet import SkynetResourceWithRawResponse + + return SkynetResourceWithRawResponse(self._client.skynet) + + @cached_property + def geocode(self) -> geocode.GeocodeResourceWithRawResponse: + from .resources.geocode import GeocodeResourceWithRawResponse + + return GeocodeResourceWithRawResponse(self._client.geocode) + + @cached_property + def optimization(self) -> optimization.OptimizationResourceWithRawResponse: + from .resources.optimization import OptimizationResourceWithRawResponse + + return OptimizationResourceWithRawResponse(self._client.optimization) + + @cached_property + def geofence(self) -> geofence.GeofenceResourceWithRawResponse: + from .resources.geofence import GeofenceResourceWithRawResponse + + return GeofenceResourceWithRawResponse(self._client.geofence) + + @cached_property + def discover(self) -> discover.DiscoverResourceWithRawResponse: + from .resources.discover import DiscoverResourceWithRawResponse + + return DiscoverResourceWithRawResponse(self._client.discover) + + @cached_property + def browse(self) -> browse.BrowseResourceWithRawResponse: + from .resources.browse import BrowseResourceWithRawResponse + + return BrowseResourceWithRawResponse(self._client.browse) + + @cached_property + def mdm(self) -> mdm.MdmResourceWithRawResponse: + from .resources.mdm import MdmResourceWithRawResponse + + return MdmResourceWithRawResponse(self._client.mdm) + + @cached_property + def isochrone(self) -> isochrone.IsochroneResourceWithRawResponse: + from .resources.isochrone import IsochroneResourceWithRawResponse + + return IsochroneResourceWithRawResponse(self._client.isochrone) + + @cached_property + def restrictions(self) -> restrictions.RestrictionsResourceWithRawResponse: + from .resources.restrictions import RestrictionsResourceWithRawResponse + + return RestrictionsResourceWithRawResponse(self._client.restrictions) + + @cached_property + def restrictions_items(self) -> restrictions_items.RestrictionsItemsResourceWithRawResponse: + from .resources.restrictions_items import RestrictionsItemsResourceWithRawResponse + + return RestrictionsItemsResourceWithRawResponse(self._client.restrictions_items) + + @cached_property + def distance_matrix(self) -> distance_matrix.DistanceMatrixResourceWithRawResponse: + from .resources.distance_matrix import DistanceMatrixResourceWithRawResponse + + return DistanceMatrixResourceWithRawResponse(self._client.distance_matrix) + + @cached_property + def autocomplete(self) -> autocomplete.AutocompleteResourceWithRawResponse: + from .resources.autocomplete import AutocompleteResourceWithRawResponse + + return AutocompleteResourceWithRawResponse(self._client.autocomplete) + + @cached_property + def navigation(self) -> navigation.NavigationResourceWithRawResponse: + from .resources.navigation import NavigationResourceWithRawResponse + + return NavigationResourceWithRawResponse(self._client.navigation) + + @cached_property + def map(self) -> map.MapResourceWithRawResponse: + from .resources.map import MapResourceWithRawResponse + + return MapResourceWithRawResponse(self._client.map) + + @cached_property + def autosuggest(self) -> autosuggest.AutosuggestResourceWithRawResponse: + from .resources.autosuggest import AutosuggestResourceWithRawResponse + + return AutosuggestResourceWithRawResponse(self._client.autosuggest) + + @cached_property + def directions(self) -> directions.DirectionsResourceWithRawResponse: + from .resources.directions import DirectionsResourceWithRawResponse + + return DirectionsResourceWithRawResponse(self._client.directions) + + @cached_property + def batch(self) -> batch.BatchResourceWithRawResponse: + from .resources.batch import BatchResourceWithRawResponse + + return BatchResourceWithRawResponse(self._client.batch) + + @cached_property + def multigeocode(self) -> multigeocode.MultigeocodeResourceWithRawResponse: + from .resources.multigeocode import MultigeocodeResourceWithRawResponse + + return MultigeocodeResourceWithRawResponse(self._client.multigeocode) + + @cached_property + def revgeocode(self) -> revgeocode.RevgeocodeResourceWithRawResponse: + from .resources.revgeocode import RevgeocodeResourceWithRawResponse + + return RevgeocodeResourceWithRawResponse(self._client.revgeocode) + + @cached_property + def route_report(self) -> route_report.RouteReportResourceWithRawResponse: + from .resources.route_report import RouteReportResourceWithRawResponse + + return RouteReportResourceWithRawResponse(self._client.route_report) + + @cached_property + def snap_to_roads(self) -> snap_to_roads.SnapToRoadsResourceWithRawResponse: + from .resources.snap_to_roads import SnapToRoadsResourceWithRawResponse + + return SnapToRoadsResourceWithRawResponse(self._client.snap_to_roads) + + @cached_property + def postalcode(self) -> postalcode.PostalcodeResourceWithRawResponse: + from .resources.postalcode import PostalcodeResourceWithRawResponse + + return PostalcodeResourceWithRawResponse(self._client.postalcode) + + @cached_property + def lookup(self) -> lookup.LookupResourceWithRawResponse: + from .resources.lookup import LookupResourceWithRawResponse + + return LookupResourceWithRawResponse(self._client.lookup) + + @cached_property + def areas(self) -> areas.AreasResourceWithRawResponse: + from .resources.areas import AreasResourceWithRawResponse + + return AreasResourceWithRawResponse(self._client.areas) class AsyncNextbillionSDKWithRawResponse: + _client: AsyncNextbillionSDK + def __init__(self, client: AsyncNextbillionSDK) -> None: - self.fleetify = fleetify.AsyncFleetifyResourceWithRawResponse(client.fleetify) - self.skynet = skynet.AsyncSkynetResourceWithRawResponse(client.skynet) - self.geocode = geocode.AsyncGeocodeResourceWithRawResponse(client.geocode) - self.optimization = optimization.AsyncOptimizationResourceWithRawResponse(client.optimization) - self.geofence = geofence.AsyncGeofenceResourceWithRawResponse(client.geofence) - self.discover = discover.AsyncDiscoverResourceWithRawResponse(client.discover) - self.browse = browse.AsyncBrowseResourceWithRawResponse(client.browse) - self.mdm = mdm.AsyncMdmResourceWithRawResponse(client.mdm) - self.isochrone = isochrone.AsyncIsochroneResourceWithRawResponse(client.isochrone) - self.restrictions = restrictions.AsyncRestrictionsResourceWithRawResponse(client.restrictions) - self.restrictions_items = restrictions_items.AsyncRestrictionsItemsResourceWithRawResponse( - client.restrictions_items - ) - self.distance_matrix = distance_matrix.AsyncDistanceMatrixResourceWithRawResponse(client.distance_matrix) - self.autocomplete = autocomplete.AsyncAutocompleteResourceWithRawResponse(client.autocomplete) - self.navigation = navigation.AsyncNavigationResourceWithRawResponse(client.navigation) - self.map = map.AsyncMapResourceWithRawResponse(client.map) - self.autosuggest = autosuggest.AsyncAutosuggestResourceWithRawResponse(client.autosuggest) - self.directions = directions.AsyncDirectionsResourceWithRawResponse(client.directions) - self.batch = batch.AsyncBatchResourceWithRawResponse(client.batch) - self.multigeocode = multigeocode.AsyncMultigeocodeResourceWithRawResponse(client.multigeocode) - self.revgeocode = revgeocode.AsyncRevgeocodeResourceWithRawResponse(client.revgeocode) - self.route_report = route_report.AsyncRouteReportResourceWithRawResponse(client.route_report) - self.snap_to_roads = snap_to_roads.AsyncSnapToRoadsResourceWithRawResponse(client.snap_to_roads) - self.postalcode = postalcode.AsyncPostalcodeResourceWithRawResponse(client.postalcode) - self.lookup = lookup.AsyncLookupResourceWithRawResponse(client.lookup) - self.areas = areas.AsyncAreasResourceWithRawResponse(client.areas) + self._client = client + + @cached_property + def fleetify(self) -> fleetify.AsyncFleetifyResourceWithRawResponse: + from .resources.fleetify import AsyncFleetifyResourceWithRawResponse + + return AsyncFleetifyResourceWithRawResponse(self._client.fleetify) + + @cached_property + def skynet(self) -> skynet.AsyncSkynetResourceWithRawResponse: + from .resources.skynet import AsyncSkynetResourceWithRawResponse + + return AsyncSkynetResourceWithRawResponse(self._client.skynet) + + @cached_property + def geocode(self) -> geocode.AsyncGeocodeResourceWithRawResponse: + from .resources.geocode import AsyncGeocodeResourceWithRawResponse + + return AsyncGeocodeResourceWithRawResponse(self._client.geocode) + + @cached_property + def optimization(self) -> optimization.AsyncOptimizationResourceWithRawResponse: + from .resources.optimization import AsyncOptimizationResourceWithRawResponse + + return AsyncOptimizationResourceWithRawResponse(self._client.optimization) + + @cached_property + def geofence(self) -> geofence.AsyncGeofenceResourceWithRawResponse: + from .resources.geofence import AsyncGeofenceResourceWithRawResponse + + return AsyncGeofenceResourceWithRawResponse(self._client.geofence) + + @cached_property + def discover(self) -> discover.AsyncDiscoverResourceWithRawResponse: + from .resources.discover import AsyncDiscoverResourceWithRawResponse + + return AsyncDiscoverResourceWithRawResponse(self._client.discover) + + @cached_property + def browse(self) -> browse.AsyncBrowseResourceWithRawResponse: + from .resources.browse import AsyncBrowseResourceWithRawResponse + + return AsyncBrowseResourceWithRawResponse(self._client.browse) + + @cached_property + def mdm(self) -> mdm.AsyncMdmResourceWithRawResponse: + from .resources.mdm import AsyncMdmResourceWithRawResponse + + return AsyncMdmResourceWithRawResponse(self._client.mdm) + + @cached_property + def isochrone(self) -> isochrone.AsyncIsochroneResourceWithRawResponse: + from .resources.isochrone import AsyncIsochroneResourceWithRawResponse + + return AsyncIsochroneResourceWithRawResponse(self._client.isochrone) + + @cached_property + def restrictions(self) -> restrictions.AsyncRestrictionsResourceWithRawResponse: + from .resources.restrictions import AsyncRestrictionsResourceWithRawResponse + + return AsyncRestrictionsResourceWithRawResponse(self._client.restrictions) + + @cached_property + def restrictions_items(self) -> restrictions_items.AsyncRestrictionsItemsResourceWithRawResponse: + from .resources.restrictions_items import AsyncRestrictionsItemsResourceWithRawResponse + + return AsyncRestrictionsItemsResourceWithRawResponse(self._client.restrictions_items) + + @cached_property + def distance_matrix(self) -> distance_matrix.AsyncDistanceMatrixResourceWithRawResponse: + from .resources.distance_matrix import AsyncDistanceMatrixResourceWithRawResponse + + return AsyncDistanceMatrixResourceWithRawResponse(self._client.distance_matrix) + + @cached_property + def autocomplete(self) -> autocomplete.AsyncAutocompleteResourceWithRawResponse: + from .resources.autocomplete import AsyncAutocompleteResourceWithRawResponse + + return AsyncAutocompleteResourceWithRawResponse(self._client.autocomplete) + + @cached_property + def navigation(self) -> navigation.AsyncNavigationResourceWithRawResponse: + from .resources.navigation import AsyncNavigationResourceWithRawResponse + + return AsyncNavigationResourceWithRawResponse(self._client.navigation) + + @cached_property + def map(self) -> map.AsyncMapResourceWithRawResponse: + from .resources.map import AsyncMapResourceWithRawResponse + + return AsyncMapResourceWithRawResponse(self._client.map) + + @cached_property + def autosuggest(self) -> autosuggest.AsyncAutosuggestResourceWithRawResponse: + from .resources.autosuggest import AsyncAutosuggestResourceWithRawResponse + + return AsyncAutosuggestResourceWithRawResponse(self._client.autosuggest) + + @cached_property + def directions(self) -> directions.AsyncDirectionsResourceWithRawResponse: + from .resources.directions import AsyncDirectionsResourceWithRawResponse + + return AsyncDirectionsResourceWithRawResponse(self._client.directions) + + @cached_property + def batch(self) -> batch.AsyncBatchResourceWithRawResponse: + from .resources.batch import AsyncBatchResourceWithRawResponse + + return AsyncBatchResourceWithRawResponse(self._client.batch) + + @cached_property + def multigeocode(self) -> multigeocode.AsyncMultigeocodeResourceWithRawResponse: + from .resources.multigeocode import AsyncMultigeocodeResourceWithRawResponse + + return AsyncMultigeocodeResourceWithRawResponse(self._client.multigeocode) + + @cached_property + def revgeocode(self) -> revgeocode.AsyncRevgeocodeResourceWithRawResponse: + from .resources.revgeocode import AsyncRevgeocodeResourceWithRawResponse + + return AsyncRevgeocodeResourceWithRawResponse(self._client.revgeocode) + + @cached_property + def route_report(self) -> route_report.AsyncRouteReportResourceWithRawResponse: + from .resources.route_report import AsyncRouteReportResourceWithRawResponse + + return AsyncRouteReportResourceWithRawResponse(self._client.route_report) + + @cached_property + def snap_to_roads(self) -> snap_to_roads.AsyncSnapToRoadsResourceWithRawResponse: + from .resources.snap_to_roads import AsyncSnapToRoadsResourceWithRawResponse + + return AsyncSnapToRoadsResourceWithRawResponse(self._client.snap_to_roads) + + @cached_property + def postalcode(self) -> postalcode.AsyncPostalcodeResourceWithRawResponse: + from .resources.postalcode import AsyncPostalcodeResourceWithRawResponse + + return AsyncPostalcodeResourceWithRawResponse(self._client.postalcode) + + @cached_property + def lookup(self) -> lookup.AsyncLookupResourceWithRawResponse: + from .resources.lookup import AsyncLookupResourceWithRawResponse + + return AsyncLookupResourceWithRawResponse(self._client.lookup) + + @cached_property + def areas(self) -> areas.AsyncAreasResourceWithRawResponse: + from .resources.areas import AsyncAreasResourceWithRawResponse + + return AsyncAreasResourceWithRawResponse(self._client.areas) class NextbillionSDKWithStreamedResponse: + _client: NextbillionSDK + def __init__(self, client: NextbillionSDK) -> None: - self.fleetify = fleetify.FleetifyResourceWithStreamingResponse(client.fleetify) - self.skynet = skynet.SkynetResourceWithStreamingResponse(client.skynet) - self.geocode = geocode.GeocodeResourceWithStreamingResponse(client.geocode) - self.optimization = optimization.OptimizationResourceWithStreamingResponse(client.optimization) - self.geofence = geofence.GeofenceResourceWithStreamingResponse(client.geofence) - self.discover = discover.DiscoverResourceWithStreamingResponse(client.discover) - self.browse = browse.BrowseResourceWithStreamingResponse(client.browse) - self.mdm = mdm.MdmResourceWithStreamingResponse(client.mdm) - self.isochrone = isochrone.IsochroneResourceWithStreamingResponse(client.isochrone) - self.restrictions = restrictions.RestrictionsResourceWithStreamingResponse(client.restrictions) - self.restrictions_items = restrictions_items.RestrictionsItemsResourceWithStreamingResponse( - client.restrictions_items - ) - self.distance_matrix = distance_matrix.DistanceMatrixResourceWithStreamingResponse(client.distance_matrix) - self.autocomplete = autocomplete.AutocompleteResourceWithStreamingResponse(client.autocomplete) - self.navigation = navigation.NavigationResourceWithStreamingResponse(client.navigation) - self.map = map.MapResourceWithStreamingResponse(client.map) - self.autosuggest = autosuggest.AutosuggestResourceWithStreamingResponse(client.autosuggest) - self.directions = directions.DirectionsResourceWithStreamingResponse(client.directions) - self.batch = batch.BatchResourceWithStreamingResponse(client.batch) - self.multigeocode = multigeocode.MultigeocodeResourceWithStreamingResponse(client.multigeocode) - self.revgeocode = revgeocode.RevgeocodeResourceWithStreamingResponse(client.revgeocode) - self.route_report = route_report.RouteReportResourceWithStreamingResponse(client.route_report) - self.snap_to_roads = snap_to_roads.SnapToRoadsResourceWithStreamingResponse(client.snap_to_roads) - self.postalcode = postalcode.PostalcodeResourceWithStreamingResponse(client.postalcode) - self.lookup = lookup.LookupResourceWithStreamingResponse(client.lookup) - self.areas = areas.AreasResourceWithStreamingResponse(client.areas) + self._client = client + + @cached_property + def fleetify(self) -> fleetify.FleetifyResourceWithStreamingResponse: + from .resources.fleetify import FleetifyResourceWithStreamingResponse + + return FleetifyResourceWithStreamingResponse(self._client.fleetify) + + @cached_property + def skynet(self) -> skynet.SkynetResourceWithStreamingResponse: + from .resources.skynet import SkynetResourceWithStreamingResponse + + return SkynetResourceWithStreamingResponse(self._client.skynet) + + @cached_property + def geocode(self) -> geocode.GeocodeResourceWithStreamingResponse: + from .resources.geocode import GeocodeResourceWithStreamingResponse + + return GeocodeResourceWithStreamingResponse(self._client.geocode) + + @cached_property + def optimization(self) -> optimization.OptimizationResourceWithStreamingResponse: + from .resources.optimization import OptimizationResourceWithStreamingResponse + + return OptimizationResourceWithStreamingResponse(self._client.optimization) + + @cached_property + def geofence(self) -> geofence.GeofenceResourceWithStreamingResponse: + from .resources.geofence import GeofenceResourceWithStreamingResponse + + return GeofenceResourceWithStreamingResponse(self._client.geofence) + + @cached_property + def discover(self) -> discover.DiscoverResourceWithStreamingResponse: + from .resources.discover import DiscoverResourceWithStreamingResponse + + return DiscoverResourceWithStreamingResponse(self._client.discover) + + @cached_property + def browse(self) -> browse.BrowseResourceWithStreamingResponse: + from .resources.browse import BrowseResourceWithStreamingResponse + + return BrowseResourceWithStreamingResponse(self._client.browse) + + @cached_property + def mdm(self) -> mdm.MdmResourceWithStreamingResponse: + from .resources.mdm import MdmResourceWithStreamingResponse + + return MdmResourceWithStreamingResponse(self._client.mdm) + + @cached_property + def isochrone(self) -> isochrone.IsochroneResourceWithStreamingResponse: + from .resources.isochrone import IsochroneResourceWithStreamingResponse + + return IsochroneResourceWithStreamingResponse(self._client.isochrone) + + @cached_property + def restrictions(self) -> restrictions.RestrictionsResourceWithStreamingResponse: + from .resources.restrictions import RestrictionsResourceWithStreamingResponse + + return RestrictionsResourceWithStreamingResponse(self._client.restrictions) + + @cached_property + def restrictions_items(self) -> restrictions_items.RestrictionsItemsResourceWithStreamingResponse: + from .resources.restrictions_items import RestrictionsItemsResourceWithStreamingResponse + + return RestrictionsItemsResourceWithStreamingResponse(self._client.restrictions_items) + + @cached_property + def distance_matrix(self) -> distance_matrix.DistanceMatrixResourceWithStreamingResponse: + from .resources.distance_matrix import DistanceMatrixResourceWithStreamingResponse + + return DistanceMatrixResourceWithStreamingResponse(self._client.distance_matrix) + + @cached_property + def autocomplete(self) -> autocomplete.AutocompleteResourceWithStreamingResponse: + from .resources.autocomplete import AutocompleteResourceWithStreamingResponse + + return AutocompleteResourceWithStreamingResponse(self._client.autocomplete) + + @cached_property + def navigation(self) -> navigation.NavigationResourceWithStreamingResponse: + from .resources.navigation import NavigationResourceWithStreamingResponse + + return NavigationResourceWithStreamingResponse(self._client.navigation) + + @cached_property + def map(self) -> map.MapResourceWithStreamingResponse: + from .resources.map import MapResourceWithStreamingResponse + + return MapResourceWithStreamingResponse(self._client.map) + + @cached_property + def autosuggest(self) -> autosuggest.AutosuggestResourceWithStreamingResponse: + from .resources.autosuggest import AutosuggestResourceWithStreamingResponse + + return AutosuggestResourceWithStreamingResponse(self._client.autosuggest) + + @cached_property + def directions(self) -> directions.DirectionsResourceWithStreamingResponse: + from .resources.directions import DirectionsResourceWithStreamingResponse + + return DirectionsResourceWithStreamingResponse(self._client.directions) + + @cached_property + def batch(self) -> batch.BatchResourceWithStreamingResponse: + from .resources.batch import BatchResourceWithStreamingResponse + + return BatchResourceWithStreamingResponse(self._client.batch) + + @cached_property + def multigeocode(self) -> multigeocode.MultigeocodeResourceWithStreamingResponse: + from .resources.multigeocode import MultigeocodeResourceWithStreamingResponse + + return MultigeocodeResourceWithStreamingResponse(self._client.multigeocode) + + @cached_property + def revgeocode(self) -> revgeocode.RevgeocodeResourceWithStreamingResponse: + from .resources.revgeocode import RevgeocodeResourceWithStreamingResponse + + return RevgeocodeResourceWithStreamingResponse(self._client.revgeocode) + + @cached_property + def route_report(self) -> route_report.RouteReportResourceWithStreamingResponse: + from .resources.route_report import RouteReportResourceWithStreamingResponse + + return RouteReportResourceWithStreamingResponse(self._client.route_report) + + @cached_property + def snap_to_roads(self) -> snap_to_roads.SnapToRoadsResourceWithStreamingResponse: + from .resources.snap_to_roads import SnapToRoadsResourceWithStreamingResponse + + return SnapToRoadsResourceWithStreamingResponse(self._client.snap_to_roads) + + @cached_property + def postalcode(self) -> postalcode.PostalcodeResourceWithStreamingResponse: + from .resources.postalcode import PostalcodeResourceWithStreamingResponse + + return PostalcodeResourceWithStreamingResponse(self._client.postalcode) + + @cached_property + def lookup(self) -> lookup.LookupResourceWithStreamingResponse: + from .resources.lookup import LookupResourceWithStreamingResponse + + return LookupResourceWithStreamingResponse(self._client.lookup) + + @cached_property + def areas(self) -> areas.AreasResourceWithStreamingResponse: + from .resources.areas import AreasResourceWithStreamingResponse + + return AreasResourceWithStreamingResponse(self._client.areas) class AsyncNextbillionSDKWithStreamedResponse: + _client: AsyncNextbillionSDK + def __init__(self, client: AsyncNextbillionSDK) -> None: - self.fleetify = fleetify.AsyncFleetifyResourceWithStreamingResponse(client.fleetify) - self.skynet = skynet.AsyncSkynetResourceWithStreamingResponse(client.skynet) - self.geocode = geocode.AsyncGeocodeResourceWithStreamingResponse(client.geocode) - self.optimization = optimization.AsyncOptimizationResourceWithStreamingResponse(client.optimization) - self.geofence = geofence.AsyncGeofenceResourceWithStreamingResponse(client.geofence) - self.discover = discover.AsyncDiscoverResourceWithStreamingResponse(client.discover) - self.browse = browse.AsyncBrowseResourceWithStreamingResponse(client.browse) - self.mdm = mdm.AsyncMdmResourceWithStreamingResponse(client.mdm) - self.isochrone = isochrone.AsyncIsochroneResourceWithStreamingResponse(client.isochrone) - self.restrictions = restrictions.AsyncRestrictionsResourceWithStreamingResponse(client.restrictions) - self.restrictions_items = restrictions_items.AsyncRestrictionsItemsResourceWithStreamingResponse( - client.restrictions_items - ) - self.distance_matrix = distance_matrix.AsyncDistanceMatrixResourceWithStreamingResponse(client.distance_matrix) - self.autocomplete = autocomplete.AsyncAutocompleteResourceWithStreamingResponse(client.autocomplete) - self.navigation = navigation.AsyncNavigationResourceWithStreamingResponse(client.navigation) - self.map = map.AsyncMapResourceWithStreamingResponse(client.map) - self.autosuggest = autosuggest.AsyncAutosuggestResourceWithStreamingResponse(client.autosuggest) - self.directions = directions.AsyncDirectionsResourceWithStreamingResponse(client.directions) - self.batch = batch.AsyncBatchResourceWithStreamingResponse(client.batch) - self.multigeocode = multigeocode.AsyncMultigeocodeResourceWithStreamingResponse(client.multigeocode) - self.revgeocode = revgeocode.AsyncRevgeocodeResourceWithStreamingResponse(client.revgeocode) - self.route_report = route_report.AsyncRouteReportResourceWithStreamingResponse(client.route_report) - self.snap_to_roads = snap_to_roads.AsyncSnapToRoadsResourceWithStreamingResponse(client.snap_to_roads) - self.postalcode = postalcode.AsyncPostalcodeResourceWithStreamingResponse(client.postalcode) - self.lookup = lookup.AsyncLookupResourceWithStreamingResponse(client.lookup) - self.areas = areas.AsyncAreasResourceWithStreamingResponse(client.areas) + self._client = client + + @cached_property + def fleetify(self) -> fleetify.AsyncFleetifyResourceWithStreamingResponse: + from .resources.fleetify import AsyncFleetifyResourceWithStreamingResponse + + return AsyncFleetifyResourceWithStreamingResponse(self._client.fleetify) + + @cached_property + def skynet(self) -> skynet.AsyncSkynetResourceWithStreamingResponse: + from .resources.skynet import AsyncSkynetResourceWithStreamingResponse + + return AsyncSkynetResourceWithStreamingResponse(self._client.skynet) + + @cached_property + def geocode(self) -> geocode.AsyncGeocodeResourceWithStreamingResponse: + from .resources.geocode import AsyncGeocodeResourceWithStreamingResponse + + return AsyncGeocodeResourceWithStreamingResponse(self._client.geocode) + + @cached_property + def optimization(self) -> optimization.AsyncOptimizationResourceWithStreamingResponse: + from .resources.optimization import AsyncOptimizationResourceWithStreamingResponse + + return AsyncOptimizationResourceWithStreamingResponse(self._client.optimization) + + @cached_property + def geofence(self) -> geofence.AsyncGeofenceResourceWithStreamingResponse: + from .resources.geofence import AsyncGeofenceResourceWithStreamingResponse + + return AsyncGeofenceResourceWithStreamingResponse(self._client.geofence) + + @cached_property + def discover(self) -> discover.AsyncDiscoverResourceWithStreamingResponse: + from .resources.discover import AsyncDiscoverResourceWithStreamingResponse + + return AsyncDiscoverResourceWithStreamingResponse(self._client.discover) + + @cached_property + def browse(self) -> browse.AsyncBrowseResourceWithStreamingResponse: + from .resources.browse import AsyncBrowseResourceWithStreamingResponse + + return AsyncBrowseResourceWithStreamingResponse(self._client.browse) + + @cached_property + def mdm(self) -> mdm.AsyncMdmResourceWithStreamingResponse: + from .resources.mdm import AsyncMdmResourceWithStreamingResponse + + return AsyncMdmResourceWithStreamingResponse(self._client.mdm) + + @cached_property + def isochrone(self) -> isochrone.AsyncIsochroneResourceWithStreamingResponse: + from .resources.isochrone import AsyncIsochroneResourceWithStreamingResponse + + return AsyncIsochroneResourceWithStreamingResponse(self._client.isochrone) + + @cached_property + def restrictions(self) -> restrictions.AsyncRestrictionsResourceWithStreamingResponse: + from .resources.restrictions import AsyncRestrictionsResourceWithStreamingResponse + + return AsyncRestrictionsResourceWithStreamingResponse(self._client.restrictions) + + @cached_property + def restrictions_items(self) -> restrictions_items.AsyncRestrictionsItemsResourceWithStreamingResponse: + from .resources.restrictions_items import AsyncRestrictionsItemsResourceWithStreamingResponse + + return AsyncRestrictionsItemsResourceWithStreamingResponse(self._client.restrictions_items) + + @cached_property + def distance_matrix(self) -> distance_matrix.AsyncDistanceMatrixResourceWithStreamingResponse: + from .resources.distance_matrix import AsyncDistanceMatrixResourceWithStreamingResponse + + return AsyncDistanceMatrixResourceWithStreamingResponse(self._client.distance_matrix) + + @cached_property + def autocomplete(self) -> autocomplete.AsyncAutocompleteResourceWithStreamingResponse: + from .resources.autocomplete import AsyncAutocompleteResourceWithStreamingResponse + + return AsyncAutocompleteResourceWithStreamingResponse(self._client.autocomplete) + + @cached_property + def navigation(self) -> navigation.AsyncNavigationResourceWithStreamingResponse: + from .resources.navigation import AsyncNavigationResourceWithStreamingResponse + + return AsyncNavigationResourceWithStreamingResponse(self._client.navigation) + + @cached_property + def map(self) -> map.AsyncMapResourceWithStreamingResponse: + from .resources.map import AsyncMapResourceWithStreamingResponse + + return AsyncMapResourceWithStreamingResponse(self._client.map) + + @cached_property + def autosuggest(self) -> autosuggest.AsyncAutosuggestResourceWithStreamingResponse: + from .resources.autosuggest import AsyncAutosuggestResourceWithStreamingResponse + + return AsyncAutosuggestResourceWithStreamingResponse(self._client.autosuggest) + + @cached_property + def directions(self) -> directions.AsyncDirectionsResourceWithStreamingResponse: + from .resources.directions import AsyncDirectionsResourceWithStreamingResponse + + return AsyncDirectionsResourceWithStreamingResponse(self._client.directions) + + @cached_property + def batch(self) -> batch.AsyncBatchResourceWithStreamingResponse: + from .resources.batch import AsyncBatchResourceWithStreamingResponse + + return AsyncBatchResourceWithStreamingResponse(self._client.batch) + + @cached_property + def multigeocode(self) -> multigeocode.AsyncMultigeocodeResourceWithStreamingResponse: + from .resources.multigeocode import AsyncMultigeocodeResourceWithStreamingResponse + + return AsyncMultigeocodeResourceWithStreamingResponse(self._client.multigeocode) + + @cached_property + def revgeocode(self) -> revgeocode.AsyncRevgeocodeResourceWithStreamingResponse: + from .resources.revgeocode import AsyncRevgeocodeResourceWithStreamingResponse + + return AsyncRevgeocodeResourceWithStreamingResponse(self._client.revgeocode) + + @cached_property + def route_report(self) -> route_report.AsyncRouteReportResourceWithStreamingResponse: + from .resources.route_report import AsyncRouteReportResourceWithStreamingResponse + + return AsyncRouteReportResourceWithStreamingResponse(self._client.route_report) + + @cached_property + def snap_to_roads(self) -> snap_to_roads.AsyncSnapToRoadsResourceWithStreamingResponse: + from .resources.snap_to_roads import AsyncSnapToRoadsResourceWithStreamingResponse + + return AsyncSnapToRoadsResourceWithStreamingResponse(self._client.snap_to_roads) + + @cached_property + def postalcode(self) -> postalcode.AsyncPostalcodeResourceWithStreamingResponse: + from .resources.postalcode import AsyncPostalcodeResourceWithStreamingResponse + + return AsyncPostalcodeResourceWithStreamingResponse(self._client.postalcode) + + @cached_property + def lookup(self) -> lookup.AsyncLookupResourceWithStreamingResponse: + from .resources.lookup import AsyncLookupResourceWithStreamingResponse + + return AsyncLookupResourceWithStreamingResponse(self._client.lookup) + + @cached_property + def areas(self) -> areas.AsyncAreasResourceWithStreamingResponse: + from .resources.areas import AsyncAreasResourceWithStreamingResponse + + return AsyncAreasResourceWithStreamingResponse(self._client.areas) Client = NextbillionSDK From 16d5c8449a6de9f71ac5e726893f6f4485dc1805 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 18 Dec 2025 10:28:56 +0000 Subject: [PATCH 32/35] chore(internal): codegen related update --- src/nextbillionai/_base_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nextbillionai/_base_client.py b/src/nextbillionai/_base_client.py index aab30d3..1356915 100644 --- a/src/nextbillionai/_base_client.py +++ b/src/nextbillionai/_base_client.py @@ -1774,7 +1774,7 @@ async def patch( options: RequestOptions = {}, ) -> ResponseT: opts = FinalRequestOptions.construct( - method="patch", url=path, json_data=body, files=to_httpx_files(files), **options + method="patch", url=path, json_data=body, files=await async_to_httpx_files(files), **options ) return await self.request(cast_to, opts) From a1d208af82a5d77a224cce412016088e1c03e433 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 19 Dec 2025 08:32:18 +0000 Subject: [PATCH 33/35] chore(internal): codegen related update --- scripts/lint | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/lint b/scripts/lint index 18bc940..82d895a 100755 --- a/scripts/lint +++ b/scripts/lint @@ -4,8 +4,13 @@ set -e cd "$(dirname "$0")/.." -echo "==> Running lints" -rye run lint +if [ "$1" = "--fix" ]; then + echo "==> Running lints with --fix" + rye run fix:ruff +else + echo "==> Running lints" + rye run lint +fi echo "==> Making sure it imports" rye run python -c 'import nextbillionai' From 2b9f07b6d35ed7b3da76adbd31d8dcd687fb8416 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 1 Jan 2026 03:01:23 +0000 Subject: [PATCH 34/35] chore(internal): codegen related update --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 9dddff2..1ba55b4 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2025 Nextbillion SDK + Copyright 2026 Nextbillion SDK Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. From 864e7f48d53caea4504ed9bf8cdd48e6ce8ae042 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 1 Jan 2026 03:02:27 +0000 Subject: [PATCH 35/35] release: 0.6.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 47 +++++++++++++++++++++++++++++++++++ pyproject.toml | 2 +- src/nextbillionai/_version.py | 2 +- 4 files changed, 50 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d04f223..4208b5c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.5.1" + ".": "0.6.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 852299d..42df937 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,52 @@ # Changelog +## 0.6.0 (2026-01-01) + +Full Changelog: [v0.5.1...v0.6.0](https://github.com/nextbillion-ai/nextbillion-sdk-python/compare/v0.5.1...v0.6.0) + +### Features + +* improve future compat with pydantic v3 ([8673889](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/86738898fdc5c9a72a4b933398f2dbe013b038d6)) +* **types:** replace List[str] with SequenceNotStr in params ([ac97bcc](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/ac97bcc961a56515cfc8848ada4eb321f0446c63)) + + +### Bug Fixes + +* avoid newer type syntax ([8be2d00](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/8be2d006207d7891b8fdf6a2a8985b5107e66137)) + + +### Chores + +* do not install brew dependencies in ./scripts/bootstrap by default ([a676ec0](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/a676ec08499f24939b3c69b6d398e703a7f51143)) +* **internal:** add Sequence related utils ([59172cd](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/59172cd255e31005a12c28c411d28af93d774a11)) +* **internal:** change ci workflow machines ([0cc1cdf](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/0cc1cdff89de3c7453b781a567d5853ac2d6dbb6)) +* **internal:** codegen related update ([2b9f07b](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/2b9f07b6d35ed7b3da76adbd31d8dcd687fb8416)) +* **internal:** codegen related update ([a1d208a](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/a1d208af82a5d77a224cce412016088e1c03e433)) +* **internal:** codegen related update ([16d5c84](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/16d5c8449a6de9f71ac5e726893f6f4485dc1805)) +* **internal:** codegen related update ([fcd6dff](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/fcd6dff8d60e3cdc989727e6a0502e4c7bfd5371)) +* **internal:** codegen related update ([a456de9](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/a456de96ce398e197294b9c2b6a6ee0e0c4d0a67)) +* **internal:** codegen related update ([4a1a767](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/4a1a76794f9f1b4b775dc8db3f8184377c84a9f7)) +* **internal:** codegen related update ([f30af77](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/f30af773d2ccdc6a9bc60bbaf0719fd7343597d4)) +* **internal:** codegen related update ([21a1828](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/21a1828acd1d5509dbf6b22bfc1f4bb46b70de9b)) +* **internal:** codegen related update ([921466d](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/921466dcbb63bbd803a43405da40c41b5f993376)) +* **internal:** codegen related update ([2a90cac](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/2a90cac3860464206e1061da69da2cf0086ac037)) +* **internal:** codegen related update ([6a7e464](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/6a7e464b26e8176db0ba6a62bf101f82f58dc5c5)) +* **internal:** codegen related update ([2f6c5f3](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/2f6c5f3383dd081bb4bf619880e610f54cb13479)) +* **internal:** codegen related update ([9e5bd44](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/9e5bd4484a2738f20363c0ba5b729ff9e6d1a2c2)) +* **internal:** codegen related update ([9da362b](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/9da362bf226d118fbba85093fe623aca94e4ed73)) +* **internal:** codegen related update ([9917d18](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/9917d185f532fcbf06e56803b4cf7848b84eed7b)) +* **internal:** codegen related update ([f735ee0](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/f735ee00e0765848f9e9346294eaf04e80a3a1fd)) +* **internal:** codegen related update ([c606559](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/c606559c6b779b8ba98f1d60adb981f294fd04e2)) +* **internal:** fix ruff target version ([841f6b8](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/841f6b83607d1fbc81fd7760d01ad48f2c6efb83)) +* **internal:** move mypy configurations to `pyproject.toml` file ([8c3c148](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/8c3c148d136fd0541c4ef1ce1cafd28f39512cf0)) +* **internal:** update comment in script ([affca4a](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/affca4a54c56578021aa4fe0ba4c43cb1d4b3c14)) +* **internal:** update pydantic dependency ([fd7ed5b](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/fd7ed5b1b53ed3502ab1874621719f000398023b)) +* **internal:** update pyright exclude list ([f52b313](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/f52b313f51371fcb984383806a94b09a3e28e988)) +* **tests:** simplify `get_platform` test ([e80b9a7](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/e80b9a7726b0736e33539db461449522179510ab)) +* **types:** change optional parameter type from NotGiven to Omit ([e140d77](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/e140d77f0549af65b3ca81528a6ad2e8d13fe144)) +* update @stainless-api/prism-cli to v5.15.0 ([5be621c](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/5be621cd6a883137ec3c379c1a64e6a12b9be1ea)) +* update github action ([623da5a](https://github.com/nextbillion-ai/nextbillion-sdk-python/commit/623da5a8f4e690185e66bb10060d6ae5c09fa7b2)) + ## 0.5.1 (2025-08-06) Full Changelog: [v0.5.0...v0.5.1](https://github.com/nextbillion-ai/nextbillion-sdk-python/compare/v0.5.0...v0.5.1) diff --git a/pyproject.toml b/pyproject.toml index f4a44de..4f1a7e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "nextbillionai" -version = "0.5.1" +version = "0.6.0" description = "The official Python library for the nextbillion-sdk API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/nextbillionai/_version.py b/src/nextbillionai/_version.py index 23ab975..d9ccf5f 100644 --- a/src/nextbillionai/_version.py +++ b/src/nextbillionai/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "nextbillionai" -__version__ = "0.5.1" # x-release-please-version +__version__ = "0.6.0" # x-release-please-version