udl-sdk 0.1.0a3__py3-none-any.whl → 0.1.0a5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {udl_sdk-0.1.0a3.dist-info → udl_sdk-0.1.0a5.dist-info}/METADATA +1 -1
- {udl_sdk-0.1.0a3.dist-info → udl_sdk-0.1.0a5.dist-info}/RECORD +273 -273
- unifieddatalibrary/_base_client.py +175 -239
- unifieddatalibrary/_client.py +1 -4
- unifieddatalibrary/_models.py +2 -2
- unifieddatalibrary/_utils/_utils.py +9 -1
- unifieddatalibrary/_version.py +1 -1
- unifieddatalibrary/resources/air_events.py +1 -4
- unifieddatalibrary/resources/air_load_plans.py +1 -4
- unifieddatalibrary/resources/air_operations/air_tasking_orders.py +1 -4
- unifieddatalibrary/resources/air_operations/aircraft_sortie.py +1 -4
- unifieddatalibrary/resources/air_operations/aircraft_sorties.py +1 -4
- unifieddatalibrary/resources/air_operations/airspace_control_orders.py +1 -4
- unifieddatalibrary/resources/air_operations/crewpapers.py +1 -4
- unifieddatalibrary/resources/air_operations/diplomatic_clearance.py +1 -4
- unifieddatalibrary/resources/air_tasking_orders.py +1 -4
- unifieddatalibrary/resources/air_transport_missions/air_transport_missions.py +1 -4
- unifieddatalibrary/resources/air_transport_missions/history.py +1 -4
- unifieddatalibrary/resources/aircraft.py +2 -9
- unifieddatalibrary/resources/aircraft_sorties.py +1 -4
- unifieddatalibrary/resources/aircraft_status_remarks.py +1 -4
- unifieddatalibrary/resources/aircraft_statuses/aircraft_statuses.py +2 -9
- unifieddatalibrary/resources/aircraft_statuses/history.py +1 -4
- unifieddatalibrary/resources/aircraftstatusremark.py +1 -4
- unifieddatalibrary/resources/airfield_slots.py +1 -4
- unifieddatalibrary/resources/airfield_status.py +1 -4
- unifieddatalibrary/resources/airfields.py +1 -4
- unifieddatalibrary/resources/airfieldslotconsumptions.py +1 -4
- unifieddatalibrary/resources/airfieldslots.py +1 -4
- unifieddatalibrary/resources/airfieldstatus/airfieldstatus.py +1 -4
- unifieddatalibrary/resources/airfieldstatus/history.py +1 -4
- unifieddatalibrary/resources/airloadplans.py +1 -4
- unifieddatalibrary/resources/airspace_control_orders.py +1 -4
- unifieddatalibrary/resources/ais/ais.py +2 -11
- unifieddatalibrary/resources/ais/history.py +1 -4
- unifieddatalibrary/resources/ais_objects.py +1 -4
- unifieddatalibrary/resources/analytic_imagery.py +1 -6
- unifieddatalibrary/resources/antennas.py +1 -4
- unifieddatalibrary/resources/attitude_data.py +1 -4
- unifieddatalibrary/resources/attitude_sets/attitude_sets.py +1 -4
- unifieddatalibrary/resources/attitude_sets/history.py +1 -4
- unifieddatalibrary/resources/aviationriskmanagement.py +1 -4
- unifieddatalibrary/resources/batteries.py +1 -4
- unifieddatalibrary/resources/batterydetails.py +1 -4
- unifieddatalibrary/resources/beam.py +1 -4
- unifieddatalibrary/resources/beam_contours.py +1 -4
- unifieddatalibrary/resources/buses.py +1 -4
- unifieddatalibrary/resources/channels.py +1 -4
- unifieddatalibrary/resources/collect_requests/collect_requests.py +1 -4
- unifieddatalibrary/resources/collect_requests/history.py +1 -4
- unifieddatalibrary/resources/collect_responses/collect_responses.py +1 -4
- unifieddatalibrary/resources/collect_responses/history/aodr.py +1 -4
- unifieddatalibrary/resources/collect_responses/history/history.py +1 -4
- unifieddatalibrary/resources/collect_responses/tuple.py +1 -4
- unifieddatalibrary/resources/comm.py +1 -4
- unifieddatalibrary/resources/conjunctions/conjunctions.py +1 -4
- unifieddatalibrary/resources/conjunctions/history.py +1 -4
- unifieddatalibrary/resources/cots.py +1 -4
- unifieddatalibrary/resources/countries.py +1 -4
- unifieddatalibrary/resources/crew.py +2 -10
- unifieddatalibrary/resources/diffofarrival/diffofarrival.py +1 -4
- unifieddatalibrary/resources/diffofarrival/history.py +1 -4
- unifieddatalibrary/resources/diplomatic_clearance/country.py +1 -4
- unifieddatalibrary/resources/diplomatic_clearance/diplomatic_clearance.py +1 -4
- unifieddatalibrary/resources/diplomatic_clearance/history.py +1 -4
- unifieddatalibrary/resources/drift_history.py +1 -4
- unifieddatalibrary/resources/dropzone.py +1 -4
- unifieddatalibrary/resources/ecpsdr.py +1 -4
- unifieddatalibrary/resources/effect_requests/effect_requests.py +1 -4
- unifieddatalibrary/resources/effect_requests/history.py +1 -4
- unifieddatalibrary/resources/effect_responses/effect_responses.py +1 -4
- unifieddatalibrary/resources/effect_responses/history.py +1 -4
- unifieddatalibrary/resources/elsets/current.py +1 -4
- unifieddatalibrary/resources/elsets/elsets.py +1 -4
- unifieddatalibrary/resources/elsets/history.py +1 -4
- unifieddatalibrary/resources/emittergeolocation.py +1 -4
- unifieddatalibrary/resources/engine_details.py +1 -4
- unifieddatalibrary/resources/engines.py +1 -4
- unifieddatalibrary/resources/entities.py +1 -4
- unifieddatalibrary/resources/eo_observations/eo_observations.py +1 -4
- unifieddatalibrary/resources/eo_observations/history.py +1 -4
- unifieddatalibrary/resources/eoobservations.py +1 -4
- unifieddatalibrary/resources/eop/eop.py +2 -11
- unifieddatalibrary/resources/eop/history.py +1 -4
- unifieddatalibrary/resources/ephemeris/attitude_data/attitude_data.py +1 -4
- unifieddatalibrary/resources/ephemeris/attitude_data/history.py +1 -4
- unifieddatalibrary/resources/ephemeris/ephemeris.py +1 -4
- unifieddatalibrary/resources/ephemeris/history.py +1 -4
- unifieddatalibrary/resources/ephemeris_sets/ephemeris_sets.py +1 -4
- unifieddatalibrary/resources/ephemeris_sets/history.py +1 -4
- unifieddatalibrary/resources/equipment.py +1 -4
- unifieddatalibrary/resources/equipmentremarks.py +2 -9
- unifieddatalibrary/resources/evac/evac.py +1 -4
- unifieddatalibrary/resources/evac/history.py +1 -4
- unifieddatalibrary/resources/evac/tuple.py +1 -4
- unifieddatalibrary/resources/event_evolution/event_evolution.py +1 -4
- unifieddatalibrary/resources/event_evolution/history.py +1 -4
- unifieddatalibrary/resources/featureassessment/featureassessment.py +1 -4
- unifieddatalibrary/resources/featureassessment/history.py +1 -4
- unifieddatalibrary/resources/flightplan.py +1 -4
- unifieddatalibrary/resources/geostatus.py +1 -4
- unifieddatalibrary/resources/globalatmosphericmodel/globalatmosphericmodel.py +1 -4
- unifieddatalibrary/resources/globalatmosphericmodel/history.py +1 -4
- unifieddatalibrary/resources/gnss_observations/history.py +1 -4
- unifieddatalibrary/resources/gnss_raw_if/history.py +1 -4
- unifieddatalibrary/resources/gnssobservationset.py +1 -4
- unifieddatalibrary/resources/gnssrawif.py +2 -12
- unifieddatalibrary/resources/ground_imagery/ground_imagery.py +1 -6
- unifieddatalibrary/resources/ground_imagery/history.py +1 -4
- unifieddatalibrary/resources/groundimagery.py +1 -4
- unifieddatalibrary/resources/h3geo/h3geo.py +1 -4
- unifieddatalibrary/resources/h3geo/history.py +1 -4
- unifieddatalibrary/resources/h3geohexcell.py +1 -4
- unifieddatalibrary/resources/hazard/hazard.py +1 -4
- unifieddatalibrary/resources/hazard/history.py +1 -4
- unifieddatalibrary/resources/iono_observation/history.py +1 -4
- unifieddatalibrary/resources/ionoobservation.py +1 -4
- unifieddatalibrary/resources/ir.py +1 -4
- unifieddatalibrary/resources/isr_collections/history.py +1 -4
- unifieddatalibrary/resources/isr_collections/isr_collections.py +1 -4
- unifieddatalibrary/resources/item.py +2 -10
- unifieddatalibrary/resources/item_trackings/history.py +1 -4
- unifieddatalibrary/resources/item_trackings/item_trackings.py +1 -4
- unifieddatalibrary/resources/launch_event/history.py +1 -4
- unifieddatalibrary/resources/launch_event/launch_event.py +1 -4
- unifieddatalibrary/resources/launchdetection.py +2 -9
- unifieddatalibrary/resources/launchevent.py +1 -4
- unifieddatalibrary/resources/launchsite.py +1 -4
- unifieddatalibrary/resources/launchsitedetails.py +1 -4
- unifieddatalibrary/resources/launchvehicle.py +1 -4
- unifieddatalibrary/resources/launchvehicledetails.py +1 -4
- unifieddatalibrary/resources/link_status/datalink.py +1 -4
- unifieddatalibrary/resources/link_status/history.py +1 -4
- unifieddatalibrary/resources/link_status/link_status.py +1 -4
- unifieddatalibrary/resources/location.py +1 -4
- unifieddatalibrary/resources/logisticssupport/history.py +1 -4
- unifieddatalibrary/resources/logisticssupport/logisticssupport.py +1 -4
- unifieddatalibrary/resources/maneuvers/history.py +1 -4
- unifieddatalibrary/resources/maneuvers/maneuvers.py +1 -4
- unifieddatalibrary/resources/manifold.py +2 -10
- unifieddatalibrary/resources/manifoldelset.py +1 -4
- unifieddatalibrary/resources/missile_tracks/history.py +1 -4
- unifieddatalibrary/resources/missile_tracks/missile_tracks.py +1 -4
- unifieddatalibrary/resources/missionassignment/history.py +1 -4
- unifieddatalibrary/resources/missionassignment/missionassignment.py +1 -4
- unifieddatalibrary/resources/monoradar.py +2 -10
- unifieddatalibrary/resources/mti.py +1 -4
- unifieddatalibrary/resources/navigation.py +2 -9
- unifieddatalibrary/resources/navigationalobstruction.py +1 -4
- unifieddatalibrary/resources/notification.py +1 -4
- unifieddatalibrary/resources/objectofinterest.py +2 -9
- unifieddatalibrary/resources/observations/ecpsdr.py +1 -4
- unifieddatalibrary/resources/observations/monoradar/history.py +1 -4
- unifieddatalibrary/resources/observations/monoradar/monoradar.py +1 -4
- unifieddatalibrary/resources/observations/radarobservation/history.py +1 -4
- unifieddatalibrary/resources/observations/rfobservation/history.py +1 -4
- unifieddatalibrary/resources/observations/swir.py +1 -4
- unifieddatalibrary/resources/onboardnavigation.py +1 -4
- unifieddatalibrary/resources/onorbit/antenna_details.py +1 -4
- unifieddatalibrary/resources/onorbit/onorbit.py +2 -10
- unifieddatalibrary/resources/onorbitantenna.py +1 -4
- unifieddatalibrary/resources/onorbitbattery.py +1 -4
- unifieddatalibrary/resources/onorbitdetails.py +1 -4
- unifieddatalibrary/resources/onorbitevent.py +1 -4
- unifieddatalibrary/resources/onorbitlist.py +1 -4
- unifieddatalibrary/resources/onorbitsolararray.py +1 -4
- unifieddatalibrary/resources/onorbitthruster.py +1 -4
- unifieddatalibrary/resources/onorbitthrusterstatus/history.py +1 -4
- unifieddatalibrary/resources/onorbitthrusterstatus/onorbitthrusterstatus.py +1 -4
- unifieddatalibrary/resources/operatingunit.py +1 -4
- unifieddatalibrary/resources/operatingunitremark.py +1 -4
- unifieddatalibrary/resources/orbitdetermination/history.py +1 -4
- unifieddatalibrary/resources/orbitdetermination/orbitdetermination.py +1 -4
- unifieddatalibrary/resources/orbittrack/history.py +1 -4
- unifieddatalibrary/resources/orbittrack/orbittrack.py +1 -4
- unifieddatalibrary/resources/organization.py +1 -4
- unifieddatalibrary/resources/organizationdetails.py +1 -4
- unifieddatalibrary/resources/passiveradarobservation/history.py +1 -4
- unifieddatalibrary/resources/passiveradarobservation/passiveradarobservation.py +1 -4
- unifieddatalibrary/resources/personnelrecovery/history.py +1 -4
- unifieddatalibrary/resources/personnelrecovery/personnelrecovery.py +1 -4
- unifieddatalibrary/resources/poi.py +1 -4
- unifieddatalibrary/resources/port.py +1 -4
- unifieddatalibrary/resources/radarobservation.py +1 -4
- unifieddatalibrary/resources/report_and_activity/poi/history.py +1 -4
- unifieddatalibrary/resources/report_and_activity/udl_h3geo.py +1 -4
- unifieddatalibrary/resources/report_and_activity/udl_sigact.py +1 -4
- unifieddatalibrary/resources/rfband.py +1 -4
- unifieddatalibrary/resources/rfbandtype.py +1 -4
- unifieddatalibrary/resources/rfemitter.py +2 -9
- unifieddatalibrary/resources/rfemitterdetails.py +2 -9
- unifieddatalibrary/resources/rfobservation/history.py +1 -4
- unifieddatalibrary/resources/rfobservation/rfobservation.py +1 -4
- unifieddatalibrary/resources/routestats.py +1 -4
- unifieddatalibrary/resources/sarobservation/history.py +1 -4
- unifieddatalibrary/resources/sarobservation/sarobservation.py +1 -4
- unifieddatalibrary/resources/scientific.py +2 -9
- unifieddatalibrary/resources/scs/file.py +1 -4
- unifieddatalibrary/resources/scs/folders.py +1 -4
- unifieddatalibrary/resources/scs/paths.py +1 -4
- unifieddatalibrary/resources/scs/scs.py +1 -4
- unifieddatalibrary/resources/scs/v2.py +1 -4
- unifieddatalibrary/resources/sensor/calibration/calibration.py +1 -4
- unifieddatalibrary/resources/sensor/calibration/history.py +1 -4
- unifieddatalibrary/resources/sensor/sensor.py +1 -4
- unifieddatalibrary/resources/sensormaintenance/history.py +1 -4
- unifieddatalibrary/resources/sensormaintenance/sensormaintenance.py +1 -4
- unifieddatalibrary/resources/sensorplan/history.py +1 -4
- unifieddatalibrary/resources/sensorplan/sensorplan.py +1 -4
- unifieddatalibrary/resources/seradatacommdetails.py +2 -9
- unifieddatalibrary/resources/seradataearlywarning.py +1 -4
- unifieddatalibrary/resources/seradatanavigation.py +2 -9
- unifieddatalibrary/resources/seradataopticalpayload.py +1 -4
- unifieddatalibrary/resources/seradataradarpayload.py +1 -4
- unifieddatalibrary/resources/seradatasigintpayload.py +1 -4
- unifieddatalibrary/resources/seradataspacecraftdetails.py +1 -4
- unifieddatalibrary/resources/sgi/history.py +1 -4
- unifieddatalibrary/resources/sgi/sgi.py +1 -4
- unifieddatalibrary/resources/sigact/history.py +1 -4
- unifieddatalibrary/resources/sigact/sigact.py +1 -6
- unifieddatalibrary/resources/site/operations.py +1 -4
- unifieddatalibrary/resources/site/site.py +1 -4
- unifieddatalibrary/resources/siteremark.py +1 -4
- unifieddatalibrary/resources/sitestatus/history.py +1 -4
- unifieddatalibrary/resources/sitestatus/sitestatus.py +1 -4
- unifieddatalibrary/resources/skyimagery/history.py +1 -4
- unifieddatalibrary/resources/skyimagery/skyimagery.py +1 -6
- unifieddatalibrary/resources/soiobservationset/history.py +1 -4
- unifieddatalibrary/resources/soiobservationset/soiobservationset.py +1 -4
- unifieddatalibrary/resources/solararray.py +1 -4
- unifieddatalibrary/resources/solararraydetails.py +2 -9
- unifieddatalibrary/resources/sortieppr/history.py +1 -4
- unifieddatalibrary/resources/sortieppr/sortieppr.py +1 -4
- unifieddatalibrary/resources/spaceenvobservation/history.py +1 -4
- unifieddatalibrary/resources/spaceenvobservation/spaceenvobservation.py +1 -4
- unifieddatalibrary/resources/stage.py +1 -4
- unifieddatalibrary/resources/starcatalog/history.py +1 -4
- unifieddatalibrary/resources/starcatalog/starcatalog.py +1 -4
- unifieddatalibrary/resources/statevector/current.py +1 -4
- unifieddatalibrary/resources/statevector/history.py +1 -4
- unifieddatalibrary/resources/statevector/statevector.py +1 -4
- unifieddatalibrary/resources/status.py +1 -4
- unifieddatalibrary/resources/substatus.py +1 -4
- unifieddatalibrary/resources/surface.py +1 -4
- unifieddatalibrary/resources/surfaceobstruction.py +1 -4
- unifieddatalibrary/resources/swir/history.py +1 -4
- unifieddatalibrary/resources/swir/swir.py +2 -11
- unifieddatalibrary/resources/taiutc/history.py +1 -4
- unifieddatalibrary/resources/taiutc/taiutc.py +1 -4
- unifieddatalibrary/resources/tdoa_fdoa/diffofarrival/diffofarrival.py +1 -4
- unifieddatalibrary/resources/tdoa_fdoa/diffofarrival/history.py +1 -4
- unifieddatalibrary/resources/track/history.py +1 -4
- unifieddatalibrary/resources/track/track.py +1 -4
- unifieddatalibrary/resources/trackdetails/history.py +1 -4
- unifieddatalibrary/resources/trackdetails/trackdetails.py +1 -4
- unifieddatalibrary/resources/trackroute/history.py +1 -4
- unifieddatalibrary/resources/trackroute/trackroute.py +1 -4
- unifieddatalibrary/resources/transponder.py +1 -4
- unifieddatalibrary/resources/udl/geostatus/history.py +1 -4
- unifieddatalibrary/resources/udl/gnssobservationset/history.py +1 -4
- unifieddatalibrary/resources/udl/mti/history.py +1 -4
- unifieddatalibrary/resources/udl/notification/history.py +1 -4
- unifieddatalibrary/resources/udl/onboardnavigation/history.py +1 -4
- unifieddatalibrary/resources/udl/onorbitthrusterstatus/history.py +1 -4
- unifieddatalibrary/resources/vessel.py +1 -4
- unifieddatalibrary/resources/video/history.py +1 -4
- unifieddatalibrary/resources/video/video.py +1 -4
- unifieddatalibrary/resources/weatherdata/history.py +1 -4
- unifieddatalibrary/resources/weatherdata/weatherdata.py +1 -4
- unifieddatalibrary/resources/weatherreport/history.py +1 -4
- unifieddatalibrary/resources/weatherreport/weatherreport.py +1 -4
- {udl_sdk-0.1.0a3.dist-info → udl_sdk-0.1.0a5.dist-info}/WHEEL +0 -0
- {udl_sdk-0.1.0a3.dist-info → udl_sdk-0.1.0a5.dist-info}/licenses/LICENSE +0 -0
@@ -437,8 +437,7 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|
437
437
|
headers = httpx.Headers(headers_dict)
|
438
438
|
|
439
439
|
idempotency_header = self._idempotency_header
|
440
|
-
if idempotency_header and options.
|
441
|
-
options.idempotency_key = options.idempotency_key or self._idempotency_key()
|
440
|
+
if idempotency_header and options.idempotency_key and idempotency_header not in headers:
|
442
441
|
headers[idempotency_header] = options.idempotency_key
|
443
442
|
|
444
443
|
# Don't set these headers if they were already set or removed by the caller. We check
|
@@ -903,7 +902,6 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
903
902
|
self,
|
904
903
|
cast_to: Type[ResponseT],
|
905
904
|
options: FinalRequestOptions,
|
906
|
-
remaining_retries: Optional[int] = None,
|
907
905
|
*,
|
908
906
|
stream: Literal[True],
|
909
907
|
stream_cls: Type[_StreamT],
|
@@ -914,7 +912,6 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
914
912
|
self,
|
915
913
|
cast_to: Type[ResponseT],
|
916
914
|
options: FinalRequestOptions,
|
917
|
-
remaining_retries: Optional[int] = None,
|
918
915
|
*,
|
919
916
|
stream: Literal[False] = False,
|
920
917
|
) -> ResponseT: ...
|
@@ -924,7 +921,6 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
924
921
|
self,
|
925
922
|
cast_to: Type[ResponseT],
|
926
923
|
options: FinalRequestOptions,
|
927
|
-
remaining_retries: Optional[int] = None,
|
928
924
|
*,
|
929
925
|
stream: bool = False,
|
930
926
|
stream_cls: Type[_StreamT] | None = None,
|
@@ -934,125 +930,109 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
934
930
|
self,
|
935
931
|
cast_to: Type[ResponseT],
|
936
932
|
options: FinalRequestOptions,
|
937
|
-
remaining_retries: Optional[int] = None,
|
938
933
|
*,
|
939
934
|
stream: bool = False,
|
940
935
|
stream_cls: type[_StreamT] | None = None,
|
941
936
|
) -> ResponseT | _StreamT:
|
942
|
-
|
943
|
-
retries_taken = options.get_max_retries(self.max_retries) - remaining_retries
|
944
|
-
else:
|
945
|
-
retries_taken = 0
|
946
|
-
|
947
|
-
return self._request(
|
948
|
-
cast_to=cast_to,
|
949
|
-
options=options,
|
950
|
-
stream=stream,
|
951
|
-
stream_cls=stream_cls,
|
952
|
-
retries_taken=retries_taken,
|
953
|
-
)
|
937
|
+
cast_to = self._maybe_override_cast_to(cast_to, options)
|
954
938
|
|
955
|
-
def _request(
|
956
|
-
self,
|
957
|
-
*,
|
958
|
-
cast_to: Type[ResponseT],
|
959
|
-
options: FinalRequestOptions,
|
960
|
-
retries_taken: int,
|
961
|
-
stream: bool,
|
962
|
-
stream_cls: type[_StreamT] | None,
|
963
|
-
) -> ResponseT | _StreamT:
|
964
939
|
# create a copy of the options we were given so that if the
|
965
940
|
# options are mutated later & we then retry, the retries are
|
966
941
|
# given the original options
|
967
942
|
input_options = model_copy(options)
|
968
|
-
|
969
|
-
cast_to = self._maybe_override_cast_to(cast_to, options)
|
970
|
-
options = self._prepare_options(options)
|
971
|
-
|
972
|
-
remaining_retries = options.get_max_retries(self.max_retries) - retries_taken
|
973
|
-
request = self._build_request(options, retries_taken=retries_taken)
|
974
|
-
self._prepare_request(request)
|
975
|
-
|
976
|
-
if options.idempotency_key:
|
943
|
+
if input_options.idempotency_key is None and input_options.method.lower() != "get":
|
977
944
|
# ensure the idempotency key is reused between requests
|
978
|
-
input_options.idempotency_key =
|
945
|
+
input_options.idempotency_key = self._idempotency_key()
|
979
946
|
|
980
|
-
|
981
|
-
|
982
|
-
kwargs["auth"] = self.custom_auth
|
947
|
+
response: httpx.Response | None = None
|
948
|
+
max_retries = input_options.get_max_retries(self.max_retries)
|
983
949
|
|
984
|
-
|
950
|
+
retries_taken = 0
|
951
|
+
for retries_taken in range(max_retries + 1):
|
952
|
+
options = model_copy(input_options)
|
953
|
+
options = self._prepare_options(options)
|
985
954
|
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
stream=stream or self._should_stream_response_body(request=request),
|
990
|
-
**kwargs,
|
991
|
-
)
|
992
|
-
except httpx.TimeoutException as err:
|
993
|
-
log.debug("Encountered httpx.TimeoutException", exc_info=True)
|
955
|
+
remaining_retries = max_retries - retries_taken
|
956
|
+
request = self._build_request(options, retries_taken=retries_taken)
|
957
|
+
self._prepare_request(request)
|
994
958
|
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
cast_to,
|
999
|
-
retries_taken=retries_taken,
|
1000
|
-
stream=stream,
|
1001
|
-
stream_cls=stream_cls,
|
1002
|
-
response_headers=None,
|
1003
|
-
)
|
959
|
+
kwargs: HttpxSendArgs = {}
|
960
|
+
if self.custom_auth is not None:
|
961
|
+
kwargs["auth"] = self.custom_auth
|
1004
962
|
|
1005
|
-
log.debug("
|
1006
|
-
raise APITimeoutError(request=request) from err
|
1007
|
-
except Exception as err:
|
1008
|
-
log.debug("Encountered Exception", exc_info=True)
|
963
|
+
log.debug("Sending HTTP Request: %s %s", request.method, request.url)
|
1009
964
|
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
stream_cls=stream_cls,
|
1017
|
-
response_headers=None,
|
965
|
+
response = None
|
966
|
+
try:
|
967
|
+
response = self._client.send(
|
968
|
+
request,
|
969
|
+
stream=stream or self._should_stream_response_body(request=request),
|
970
|
+
**kwargs,
|
1018
971
|
)
|
972
|
+
except httpx.TimeoutException as err:
|
973
|
+
log.debug("Encountered httpx.TimeoutException", exc_info=True)
|
974
|
+
|
975
|
+
if remaining_retries > 0:
|
976
|
+
self._sleep_for_retry(
|
977
|
+
retries_taken=retries_taken,
|
978
|
+
max_retries=max_retries,
|
979
|
+
options=input_options,
|
980
|
+
response=None,
|
981
|
+
)
|
982
|
+
continue
|
983
|
+
|
984
|
+
log.debug("Raising timeout error")
|
985
|
+
raise APITimeoutError(request=request) from err
|
986
|
+
except Exception as err:
|
987
|
+
log.debug("Encountered Exception", exc_info=True)
|
988
|
+
|
989
|
+
if remaining_retries > 0:
|
990
|
+
self._sleep_for_retry(
|
991
|
+
retries_taken=retries_taken,
|
992
|
+
max_retries=max_retries,
|
993
|
+
options=input_options,
|
994
|
+
response=None,
|
995
|
+
)
|
996
|
+
continue
|
997
|
+
|
998
|
+
log.debug("Raising connection error")
|
999
|
+
raise APIConnectionError(request=request) from err
|
1000
|
+
|
1001
|
+
log.debug(
|
1002
|
+
'HTTP Response: %s %s "%i %s" %s',
|
1003
|
+
request.method,
|
1004
|
+
request.url,
|
1005
|
+
response.status_code,
|
1006
|
+
response.reason_phrase,
|
1007
|
+
response.headers,
|
1008
|
+
)
|
1019
1009
|
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1010
|
+
try:
|
1011
|
+
response.raise_for_status()
|
1012
|
+
except httpx.HTTPStatusError as err: # thrown on 4xx and 5xx status code
|
1013
|
+
log.debug("Encountered httpx.HTTPStatusError", exc_info=True)
|
1014
|
+
|
1015
|
+
if remaining_retries > 0 and self._should_retry(err.response):
|
1016
|
+
err.response.close()
|
1017
|
+
self._sleep_for_retry(
|
1018
|
+
retries_taken=retries_taken,
|
1019
|
+
max_retries=max_retries,
|
1020
|
+
options=input_options,
|
1021
|
+
response=response,
|
1022
|
+
)
|
1023
|
+
continue
|
1031
1024
|
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
if remaining_retries > 0 and self._should_retry(err.response):
|
1038
|
-
err.response.close()
|
1039
|
-
return self._retry_request(
|
1040
|
-
input_options,
|
1041
|
-
cast_to,
|
1042
|
-
retries_taken=retries_taken,
|
1043
|
-
response_headers=err.response.headers,
|
1044
|
-
stream=stream,
|
1045
|
-
stream_cls=stream_cls,
|
1046
|
-
)
|
1025
|
+
# If the response is streamed then we need to explicitly read the response
|
1026
|
+
# to completion before attempting to access the response text.
|
1027
|
+
if not err.response.is_closed:
|
1028
|
+
err.response.read()
|
1047
1029
|
|
1048
|
-
|
1049
|
-
|
1050
|
-
if not err.response.is_closed:
|
1051
|
-
err.response.read()
|
1030
|
+
log.debug("Re-raising status error")
|
1031
|
+
raise self._make_status_error_from_response(err.response) from None
|
1052
1032
|
|
1053
|
-
|
1054
|
-
raise self._make_status_error_from_response(err.response) from None
|
1033
|
+
break
|
1055
1034
|
|
1035
|
+
assert response is not None, "could not resolve response (should never happen)"
|
1056
1036
|
return self._process_response(
|
1057
1037
|
cast_to=cast_to,
|
1058
1038
|
options=options,
|
@@ -1062,37 +1042,20 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
1062
1042
|
retries_taken=retries_taken,
|
1063
1043
|
)
|
1064
1044
|
|
1065
|
-
def
|
1066
|
-
self,
|
1067
|
-
|
1068
|
-
|
1069
|
-
*,
|
1070
|
-
retries_taken: int,
|
1071
|
-
response_headers: httpx.Headers | None,
|
1072
|
-
stream: bool,
|
1073
|
-
stream_cls: type[_StreamT] | None,
|
1074
|
-
) -> ResponseT | _StreamT:
|
1075
|
-
remaining_retries = options.get_max_retries(self.max_retries) - retries_taken
|
1045
|
+
def _sleep_for_retry(
|
1046
|
+
self, *, retries_taken: int, max_retries: int, options: FinalRequestOptions, response: httpx.Response | None
|
1047
|
+
) -> None:
|
1048
|
+
remaining_retries = max_retries - retries_taken
|
1076
1049
|
if remaining_retries == 1:
|
1077
1050
|
log.debug("1 retry left")
|
1078
1051
|
else:
|
1079
1052
|
log.debug("%i retries left", remaining_retries)
|
1080
1053
|
|
1081
|
-
timeout = self._calculate_retry_timeout(remaining_retries, options,
|
1054
|
+
timeout = self._calculate_retry_timeout(remaining_retries, options, response.headers if response else None)
|
1082
1055
|
log.info("Retrying request to %s in %f seconds", options.url, timeout)
|
1083
1056
|
|
1084
|
-
# In a synchronous context we are blocking the entire thread. Up to the library user to run the client in a
|
1085
|
-
# different thread if necessary.
|
1086
1057
|
time.sleep(timeout)
|
1087
1058
|
|
1088
|
-
return self._request(
|
1089
|
-
options=options,
|
1090
|
-
cast_to=cast_to,
|
1091
|
-
retries_taken=retries_taken + 1,
|
1092
|
-
stream=stream,
|
1093
|
-
stream_cls=stream_cls,
|
1094
|
-
)
|
1095
|
-
|
1096
1059
|
def _process_response(
|
1097
1060
|
self,
|
1098
1061
|
*,
|
@@ -1436,7 +1399,6 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
1436
1399
|
options: FinalRequestOptions,
|
1437
1400
|
*,
|
1438
1401
|
stream: Literal[False] = False,
|
1439
|
-
remaining_retries: Optional[int] = None,
|
1440
1402
|
) -> ResponseT: ...
|
1441
1403
|
|
1442
1404
|
@overload
|
@@ -1447,7 +1409,6 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
1447
1409
|
*,
|
1448
1410
|
stream: Literal[True],
|
1449
1411
|
stream_cls: type[_AsyncStreamT],
|
1450
|
-
remaining_retries: Optional[int] = None,
|
1451
1412
|
) -> _AsyncStreamT: ...
|
1452
1413
|
|
1453
1414
|
@overload
|
@@ -1458,7 +1419,6 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
1458
1419
|
*,
|
1459
1420
|
stream: bool,
|
1460
1421
|
stream_cls: type[_AsyncStreamT] | None = None,
|
1461
|
-
remaining_retries: Optional[int] = None,
|
1462
1422
|
) -> ResponseT | _AsyncStreamT: ...
|
1463
1423
|
|
1464
1424
|
async def request(
|
@@ -1468,120 +1428,111 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
1468
1428
|
*,
|
1469
1429
|
stream: bool = False,
|
1470
1430
|
stream_cls: type[_AsyncStreamT] | None = None,
|
1471
|
-
remaining_retries: Optional[int] = None,
|
1472
|
-
) -> ResponseT | _AsyncStreamT:
|
1473
|
-
if remaining_retries is not None:
|
1474
|
-
retries_taken = options.get_max_retries(self.max_retries) - remaining_retries
|
1475
|
-
else:
|
1476
|
-
retries_taken = 0
|
1477
|
-
|
1478
|
-
return await self._request(
|
1479
|
-
cast_to=cast_to,
|
1480
|
-
options=options,
|
1481
|
-
stream=stream,
|
1482
|
-
stream_cls=stream_cls,
|
1483
|
-
retries_taken=retries_taken,
|
1484
|
-
)
|
1485
|
-
|
1486
|
-
async def _request(
|
1487
|
-
self,
|
1488
|
-
cast_to: Type[ResponseT],
|
1489
|
-
options: FinalRequestOptions,
|
1490
|
-
*,
|
1491
|
-
stream: bool,
|
1492
|
-
stream_cls: type[_AsyncStreamT] | None,
|
1493
|
-
retries_taken: int,
|
1494
1431
|
) -> ResponseT | _AsyncStreamT:
|
1495
1432
|
if self._platform is None:
|
1496
1433
|
# `get_platform` can make blocking IO calls so we
|
1497
1434
|
# execute it earlier while we are in an async context
|
1498
1435
|
self._platform = await asyncify(get_platform)()
|
1499
1436
|
|
1437
|
+
cast_to = self._maybe_override_cast_to(cast_to, options)
|
1438
|
+
|
1500
1439
|
# create a copy of the options we were given so that if the
|
1501
1440
|
# options are mutated later & we then retry, the retries are
|
1502
1441
|
# given the original options
|
1503
1442
|
input_options = model_copy(options)
|
1504
|
-
|
1505
|
-
cast_to = self._maybe_override_cast_to(cast_to, options)
|
1506
|
-
options = await self._prepare_options(options)
|
1507
|
-
|
1508
|
-
remaining_retries = options.get_max_retries(self.max_retries) - retries_taken
|
1509
|
-
request = self._build_request(options, retries_taken=retries_taken)
|
1510
|
-
await self._prepare_request(request)
|
1511
|
-
|
1512
|
-
if options.idempotency_key:
|
1443
|
+
if input_options.idempotency_key is None and input_options.method.lower() != "get":
|
1513
1444
|
# ensure the idempotency key is reused between requests
|
1514
|
-
input_options.idempotency_key =
|
1445
|
+
input_options.idempotency_key = self._idempotency_key()
|
1515
1446
|
|
1516
|
-
|
1517
|
-
|
1518
|
-
kwargs["auth"] = self.custom_auth
|
1447
|
+
response: httpx.Response | None = None
|
1448
|
+
max_retries = input_options.get_max_retries(self.max_retries)
|
1519
1449
|
|
1520
|
-
|
1521
|
-
|
1522
|
-
|
1523
|
-
|
1524
|
-
**kwargs,
|
1525
|
-
)
|
1526
|
-
except httpx.TimeoutException as err:
|
1527
|
-
log.debug("Encountered httpx.TimeoutException", exc_info=True)
|
1450
|
+
retries_taken = 0
|
1451
|
+
for retries_taken in range(max_retries + 1):
|
1452
|
+
options = model_copy(input_options)
|
1453
|
+
options = await self._prepare_options(options)
|
1528
1454
|
|
1529
|
-
|
1530
|
-
|
1531
|
-
|
1532
|
-
cast_to,
|
1533
|
-
retries_taken=retries_taken,
|
1534
|
-
stream=stream,
|
1535
|
-
stream_cls=stream_cls,
|
1536
|
-
response_headers=None,
|
1537
|
-
)
|
1455
|
+
remaining_retries = max_retries - retries_taken
|
1456
|
+
request = self._build_request(options, retries_taken=retries_taken)
|
1457
|
+
await self._prepare_request(request)
|
1538
1458
|
|
1539
|
-
|
1540
|
-
|
1541
|
-
|
1542
|
-
log.debug("Encountered Exception", exc_info=True)
|
1459
|
+
kwargs: HttpxSendArgs = {}
|
1460
|
+
if self.custom_auth is not None:
|
1461
|
+
kwargs["auth"] = self.custom_auth
|
1543
1462
|
|
1544
|
-
|
1545
|
-
return await self._retry_request(
|
1546
|
-
input_options,
|
1547
|
-
cast_to,
|
1548
|
-
retries_taken=retries_taken,
|
1549
|
-
stream=stream,
|
1550
|
-
stream_cls=stream_cls,
|
1551
|
-
response_headers=None,
|
1552
|
-
)
|
1463
|
+
log.debug("Sending HTTP Request: %s %s", request.method, request.url)
|
1553
1464
|
|
1554
|
-
|
1555
|
-
|
1465
|
+
response = None
|
1466
|
+
try:
|
1467
|
+
response = await self._client.send(
|
1468
|
+
request,
|
1469
|
+
stream=stream or self._should_stream_response_body(request=request),
|
1470
|
+
**kwargs,
|
1471
|
+
)
|
1472
|
+
except httpx.TimeoutException as err:
|
1473
|
+
log.debug("Encountered httpx.TimeoutException", exc_info=True)
|
1474
|
+
|
1475
|
+
if remaining_retries > 0:
|
1476
|
+
await self._sleep_for_retry(
|
1477
|
+
retries_taken=retries_taken,
|
1478
|
+
max_retries=max_retries,
|
1479
|
+
options=input_options,
|
1480
|
+
response=None,
|
1481
|
+
)
|
1482
|
+
continue
|
1483
|
+
|
1484
|
+
log.debug("Raising timeout error")
|
1485
|
+
raise APITimeoutError(request=request) from err
|
1486
|
+
except Exception as err:
|
1487
|
+
log.debug("Encountered Exception", exc_info=True)
|
1488
|
+
|
1489
|
+
if remaining_retries > 0:
|
1490
|
+
await self._sleep_for_retry(
|
1491
|
+
retries_taken=retries_taken,
|
1492
|
+
max_retries=max_retries,
|
1493
|
+
options=input_options,
|
1494
|
+
response=None,
|
1495
|
+
)
|
1496
|
+
continue
|
1497
|
+
|
1498
|
+
log.debug("Raising connection error")
|
1499
|
+
raise APIConnectionError(request=request) from err
|
1500
|
+
|
1501
|
+
log.debug(
|
1502
|
+
'HTTP Response: %s %s "%i %s" %s',
|
1503
|
+
request.method,
|
1504
|
+
request.url,
|
1505
|
+
response.status_code,
|
1506
|
+
response.reason_phrase,
|
1507
|
+
response.headers,
|
1508
|
+
)
|
1556
1509
|
|
1557
|
-
|
1558
|
-
|
1559
|
-
|
1510
|
+
try:
|
1511
|
+
response.raise_for_status()
|
1512
|
+
except httpx.HTTPStatusError as err: # thrown on 4xx and 5xx status code
|
1513
|
+
log.debug("Encountered httpx.HTTPStatusError", exc_info=True)
|
1514
|
+
|
1515
|
+
if remaining_retries > 0 and self._should_retry(err.response):
|
1516
|
+
await err.response.aclose()
|
1517
|
+
await self._sleep_for_retry(
|
1518
|
+
retries_taken=retries_taken,
|
1519
|
+
max_retries=max_retries,
|
1520
|
+
options=input_options,
|
1521
|
+
response=response,
|
1522
|
+
)
|
1523
|
+
continue
|
1560
1524
|
|
1561
|
-
|
1562
|
-
|
1563
|
-
|
1564
|
-
|
1565
|
-
|
1566
|
-
if remaining_retries > 0 and self._should_retry(err.response):
|
1567
|
-
await err.response.aclose()
|
1568
|
-
return await self._retry_request(
|
1569
|
-
input_options,
|
1570
|
-
cast_to,
|
1571
|
-
retries_taken=retries_taken,
|
1572
|
-
response_headers=err.response.headers,
|
1573
|
-
stream=stream,
|
1574
|
-
stream_cls=stream_cls,
|
1575
|
-
)
|
1525
|
+
# If the response is streamed then we need to explicitly read the response
|
1526
|
+
# to completion before attempting to access the response text.
|
1527
|
+
if not err.response.is_closed:
|
1528
|
+
await err.response.aread()
|
1576
1529
|
|
1577
|
-
|
1578
|
-
|
1579
|
-
if not err.response.is_closed:
|
1580
|
-
await err.response.aread()
|
1530
|
+
log.debug("Re-raising status error")
|
1531
|
+
raise self._make_status_error_from_response(err.response) from None
|
1581
1532
|
|
1582
|
-
|
1583
|
-
raise self._make_status_error_from_response(err.response) from None
|
1533
|
+
break
|
1584
1534
|
|
1535
|
+
assert response is not None, "could not resolve response (should never happen)"
|
1585
1536
|
return await self._process_response(
|
1586
1537
|
cast_to=cast_to,
|
1587
1538
|
options=options,
|
@@ -1591,35 +1542,20 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
1591
1542
|
retries_taken=retries_taken,
|
1592
1543
|
)
|
1593
1544
|
|
1594
|
-
async def
|
1595
|
-
self,
|
1596
|
-
|
1597
|
-
|
1598
|
-
*,
|
1599
|
-
retries_taken: int,
|
1600
|
-
response_headers: httpx.Headers | None,
|
1601
|
-
stream: bool,
|
1602
|
-
stream_cls: type[_AsyncStreamT] | None,
|
1603
|
-
) -> ResponseT | _AsyncStreamT:
|
1604
|
-
remaining_retries = options.get_max_retries(self.max_retries) - retries_taken
|
1545
|
+
async def _sleep_for_retry(
|
1546
|
+
self, *, retries_taken: int, max_retries: int, options: FinalRequestOptions, response: httpx.Response | None
|
1547
|
+
) -> None:
|
1548
|
+
remaining_retries = max_retries - retries_taken
|
1605
1549
|
if remaining_retries == 1:
|
1606
1550
|
log.debug("1 retry left")
|
1607
1551
|
else:
|
1608
1552
|
log.debug("%i retries left", remaining_retries)
|
1609
1553
|
|
1610
|
-
timeout = self._calculate_retry_timeout(remaining_retries, options,
|
1554
|
+
timeout = self._calculate_retry_timeout(remaining_retries, options, response.headers if response else None)
|
1611
1555
|
log.info("Retrying request to %s in %f seconds", options.url, timeout)
|
1612
1556
|
|
1613
1557
|
await anyio.sleep(timeout)
|
1614
1558
|
|
1615
|
-
return await self._request(
|
1616
|
-
options=options,
|
1617
|
-
cast_to=cast_to,
|
1618
|
-
retries_taken=retries_taken + 1,
|
1619
|
-
stream=stream,
|
1620
|
-
stream_cls=stream_cls,
|
1621
|
-
)
|
1622
|
-
|
1623
1559
|
async def _process_response(
|
1624
1560
|
self,
|
1625
1561
|
*,
|
unifieddatalibrary/_client.py
CHANGED
unifieddatalibrary/_models.py
CHANGED
@@ -626,8 +626,8 @@ def _build_discriminated_union_meta(*, union: type, meta_annotations: tuple[Any,
|
|
626
626
|
# Note: if one variant defines an alias then they all should
|
627
627
|
discriminator_alias = field_info.alias
|
628
628
|
|
629
|
-
if field_info
|
630
|
-
for entry in get_args(
|
629
|
+
if (annotation := getattr(field_info, "annotation", None)) and is_literal_type(annotation):
|
630
|
+
for entry in get_args(annotation):
|
631
631
|
if isinstance(entry, str):
|
632
632
|
mapping[entry] = variant
|
633
633
|
|
@@ -72,8 +72,16 @@ def _extract_items(
|
|
72
72
|
from .._files import assert_is_file_content
|
73
73
|
|
74
74
|
# We have exhausted the path, return the entry we found.
|
75
|
-
assert_is_file_content(obj, key=flattened_key)
|
76
75
|
assert flattened_key is not None
|
76
|
+
|
77
|
+
if is_list(obj):
|
78
|
+
files: list[tuple[str, FileTypes]] = []
|
79
|
+
for entry in obj:
|
80
|
+
assert_is_file_content(entry, key=flattened_key + "[]" if flattened_key else "")
|
81
|
+
files.append((flattened_key + "[]", cast(FileTypes, entry)))
|
82
|
+
return files
|
83
|
+
|
84
|
+
assert_is_file_content(obj, key=flattened_key)
|
77
85
|
return [(flattened_key, cast(FileTypes, obj))]
|
78
86
|
|
79
87
|
index += 1
|
unifieddatalibrary/_version.py
CHANGED
@@ -16,10 +16,7 @@ from ..types import (
|
|
16
16
|
air_event_unvalidated_publish_params,
|
17
17
|
)
|
18
18
|
from .._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
19
|
-
from .._utils import
|
20
|
-
maybe_transform,
|
21
|
-
async_maybe_transform,
|
22
|
-
)
|
19
|
+
from .._utils import maybe_transform, async_maybe_transform
|
23
20
|
from .._compat import cached_property
|
24
21
|
from .._resource import SyncAPIResource, AsyncAPIResource
|
25
22
|
from .._response import (
|
@@ -15,10 +15,7 @@ from ..types import (
|
|
15
15
|
air_load_plan_create_params,
|
16
16
|
)
|
17
17
|
from .._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
18
|
-
from .._utils import
|
19
|
-
maybe_transform,
|
20
|
-
async_maybe_transform,
|
21
|
-
)
|
18
|
+
from .._utils import maybe_transform, async_maybe_transform
|
22
19
|
from .._compat import cached_property
|
23
20
|
from .._resource import SyncAPIResource, AsyncAPIResource
|
24
21
|
from .._response import (
|
@@ -7,10 +7,7 @@ from typing import Iterable
|
|
7
7
|
import httpx
|
8
8
|
|
9
9
|
from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
10
|
-
from ..._utils import
|
11
|
-
maybe_transform,
|
12
|
-
async_maybe_transform,
|
13
|
-
)
|
10
|
+
from ..._utils import maybe_transform, async_maybe_transform
|
14
11
|
from ..._compat import cached_property
|
15
12
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
16
13
|
from ..._response import (
|
@@ -9,10 +9,7 @@ from typing_extensions import Literal
|
|
9
9
|
import httpx
|
10
10
|
|
11
11
|
from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
12
|
-
from ..._utils import
|
13
|
-
maybe_transform,
|
14
|
-
async_maybe_transform,
|
15
|
-
)
|
12
|
+
from ..._utils import maybe_transform, async_maybe_transform
|
16
13
|
from ..._compat import cached_property
|
17
14
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
18
15
|
from ..._response import (
|
@@ -7,10 +7,7 @@ from typing import Iterable
|
|
7
7
|
import httpx
|
8
8
|
|
9
9
|
from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
10
|
-
from ..._utils import
|
11
|
-
maybe_transform,
|
12
|
-
async_maybe_transform,
|
13
|
-
)
|
10
|
+
from ..._utils import maybe_transform, async_maybe_transform
|
14
11
|
from ..._compat import cached_property
|
15
12
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
16
13
|
from ..._response import (
|