udl-sdk 0.1.0a10__py3-none-any.whl → 0.1.0a12__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.0a10.dist-info → udl_sdk-0.1.0a12.dist-info}/METADATA +40 -46
- {udl_sdk-0.1.0a10.dist-info → udl_sdk-0.1.0a12.dist-info}/RECORD +421 -271
- unifieddatalibrary/__init__.py +2 -1
- unifieddatalibrary/_base_client.py +72 -4
- unifieddatalibrary/_client.py +6 -2
- unifieddatalibrary/_models.py +10 -5
- unifieddatalibrary/_types.py +2 -0
- unifieddatalibrary/_utils/_transform.py +2 -2
- unifieddatalibrary/_utils/_utils.py +1 -1
- unifieddatalibrary/_version.py +1 -1
- unifieddatalibrary/lib/common.py +0 -1
- unifieddatalibrary/lib/model_based_query.py +6 -2
- unifieddatalibrary/lib/query_field_names.py +6 -4
- unifieddatalibrary/lib/util.py +2 -1
- unifieddatalibrary/pagination.py +129 -15
- unifieddatalibrary/resources/air_events.py +5 -6
- unifieddatalibrary/resources/air_load_plans.py +5 -6
- unifieddatalibrary/resources/air_operations/air_tasking_orders.py +5 -6
- unifieddatalibrary/resources/air_transport_missions/air_transport_missions.py +5 -6
- unifieddatalibrary/resources/aircraft.py +5 -6
- unifieddatalibrary/resources/aircraft_sorties.py +5 -6
- unifieddatalibrary/resources/aircraft_status_remarks.py +5 -6
- unifieddatalibrary/resources/aircraft_statuses/aircraft_statuses.py +5 -6
- unifieddatalibrary/resources/airfield_slot_consumptions.py +5 -6
- unifieddatalibrary/resources/airfield_slots.py +5 -6
- unifieddatalibrary/resources/airfield_status/airfield_status.py +5 -6
- unifieddatalibrary/resources/airfields.py +5 -6
- unifieddatalibrary/resources/airspace_control_orders.py +5 -6
- unifieddatalibrary/resources/ais/ais.py +5 -6
- unifieddatalibrary/resources/analytic_imagery.py +5 -6
- unifieddatalibrary/resources/antennas.py +5 -6
- unifieddatalibrary/resources/attitude_data.py +6 -7
- unifieddatalibrary/resources/attitude_sets/attitude_sets.py +5 -6
- unifieddatalibrary/resources/aviation_risk_management.py +5 -6
- unifieddatalibrary/resources/batteries.py +5 -6
- unifieddatalibrary/resources/beam.py +5 -6
- unifieddatalibrary/resources/beam_contours.py +5 -6
- unifieddatalibrary/resources/buses.py +5 -6
- unifieddatalibrary/resources/channels.py +5 -6
- unifieddatalibrary/resources/collect_requests/collect_requests.py +5 -6
- unifieddatalibrary/resources/collect_responses/collect_responses.py +5 -6
- unifieddatalibrary/resources/comm.py +5 -6
- unifieddatalibrary/resources/conjunctions/conjunctions.py +5 -6
- unifieddatalibrary/resources/countries.py +5 -6
- unifieddatalibrary/resources/crew.py +5 -6
- unifieddatalibrary/resources/diff_of_arrival/diff_of_arrival.py +5 -6
- unifieddatalibrary/resources/diplomatic_clearance/country.py +21 -22
- unifieddatalibrary/resources/diplomatic_clearance/diplomatic_clearance.py +5 -6
- unifieddatalibrary/resources/drift_history.py +6 -7
- unifieddatalibrary/resources/dropzone.py +5 -6
- unifieddatalibrary/resources/effect_requests/effect_requests.py +5 -6
- unifieddatalibrary/resources/effect_responses/effect_responses.py +5 -6
- unifieddatalibrary/resources/elsets/elsets.py +10 -12
- unifieddatalibrary/resources/emitter_geolocation.py +5 -6
- unifieddatalibrary/resources/engines.py +5 -6
- unifieddatalibrary/resources/entities.py +13 -10
- unifieddatalibrary/resources/eop/eop.py +5 -6
- unifieddatalibrary/resources/ephemeris/ephemeris.py +7 -8
- unifieddatalibrary/resources/ephemeris_sets/ephemeris_sets.py +7 -8
- unifieddatalibrary/resources/equipment.py +5 -6
- unifieddatalibrary/resources/equipment_remarks.py +5 -6
- unifieddatalibrary/resources/evac/evac.py +5 -6
- unifieddatalibrary/resources/event_evolution/event_evolution.py +5 -6
- unifieddatalibrary/resources/feature_assessment/feature_assessment.py +5 -6
- unifieddatalibrary/resources/flightplan.py +5 -6
- unifieddatalibrary/resources/geo_status/geo_status.py +5 -6
- unifieddatalibrary/resources/global_atmospheric_model/global_atmospheric_model.py +7 -8
- unifieddatalibrary/resources/gnss_observationset/gnss_observationset.py +5 -6
- unifieddatalibrary/resources/gnss_rawif.py +5 -6
- unifieddatalibrary/resources/ground_imagery/ground_imagery.py +5 -6
- unifieddatalibrary/resources/h3_geo/h3_geo.py +5 -6
- unifieddatalibrary/resources/h3_geo_hex_cell.py +6 -7
- unifieddatalibrary/resources/hazard/hazard.py +5 -6
- unifieddatalibrary/resources/ion_oobservation.py +5 -6
- unifieddatalibrary/resources/ir.py +5 -6
- unifieddatalibrary/resources/isr_collections/isr_collections.py +5 -6
- unifieddatalibrary/resources/item.py +5 -6
- unifieddatalibrary/resources/item_trackings/item_trackings.py +5 -6
- unifieddatalibrary/resources/launch_detection.py +5 -6
- unifieddatalibrary/resources/launch_event/launch_event.py +5 -6
- unifieddatalibrary/resources/launch_site.py +5 -6
- unifieddatalibrary/resources/launch_vehicle.py +5 -6
- unifieddatalibrary/resources/link_status/datalink.py +5 -6
- unifieddatalibrary/resources/link_status/link_status.py +5 -6
- unifieddatalibrary/resources/location.py +5 -6
- unifieddatalibrary/resources/logistics_support/logistics_support.py +5 -6
- unifieddatalibrary/resources/maneuvers/maneuvers.py +5 -6
- unifieddatalibrary/resources/manifold.py +5 -6
- unifieddatalibrary/resources/manifoldelset.py +5 -6
- unifieddatalibrary/resources/missile_tracks/missile_tracks.py +5 -6
- unifieddatalibrary/resources/mission_assignment/mission_assignment.py +5 -6
- unifieddatalibrary/resources/mti/mti.py +5 -6
- unifieddatalibrary/resources/navigation.py +5 -6
- unifieddatalibrary/resources/navigational_obstruction.py +5 -6
- unifieddatalibrary/resources/notification/notification.py +5 -6
- unifieddatalibrary/resources/object_of_interest.py +5 -6
- unifieddatalibrary/resources/observations/ecpsdr.py +5 -6
- unifieddatalibrary/resources/observations/eo_observations/eo_observations.py +5 -6
- unifieddatalibrary/resources/observations/monoradar/monoradar.py +5 -6
- unifieddatalibrary/resources/observations/passive_radar_observation/passive_radar_observation.py +5 -6
- unifieddatalibrary/resources/observations/radarobservation/radarobservation.py +5 -6
- unifieddatalibrary/resources/observations/rf_observation/rf_observation.py +5 -6
- unifieddatalibrary/resources/onboardnavigation/onboardnavigation.py +5 -6
- unifieddatalibrary/resources/onorbit/onorbit.py +5 -6
- unifieddatalibrary/resources/onorbitevent.py +5 -6
- unifieddatalibrary/resources/onorbitlist.py +5 -6
- unifieddatalibrary/resources/onorbitthrusterstatus/onorbitthrusterstatus.py +5 -6
- unifieddatalibrary/resources/operatingunit.py +5 -6
- unifieddatalibrary/resources/operatingunitremark.py +5 -6
- unifieddatalibrary/resources/orbitdetermination/orbitdetermination.py +5 -6
- unifieddatalibrary/resources/orbittrack/orbittrack.py +5 -6
- unifieddatalibrary/resources/organization.py +5 -6
- unifieddatalibrary/resources/personnelrecovery/personnelrecovery.py +5 -6
- unifieddatalibrary/resources/poi.py +5 -6
- unifieddatalibrary/resources/port.py +5 -6
- unifieddatalibrary/resources/rf_band.py +5 -6
- unifieddatalibrary/resources/rf_band_type.py +5 -6
- unifieddatalibrary/resources/rf_emitter.py +5 -6
- unifieddatalibrary/resources/rf_emitter_details.py +5 -6
- unifieddatalibrary/resources/route_stats.py +5 -6
- unifieddatalibrary/resources/sar_observation/sar_observation.py +5 -6
- unifieddatalibrary/resources/scientific.py +5 -6
- unifieddatalibrary/resources/scs/folders.py +8 -0
- unifieddatalibrary/resources/scs/paths.py +16 -0
- unifieddatalibrary/resources/scs/scs.py +16 -0
- unifieddatalibrary/resources/scs/v2.py +64 -4
- unifieddatalibrary/resources/secure_messaging.py +10 -6
- unifieddatalibrary/resources/sensor/calibration/calibration.py +117 -112
- unifieddatalibrary/resources/sensor/sensor.py +5 -6
- unifieddatalibrary/resources/sensor_maintenance/sensor_maintenance.py +5 -6
- unifieddatalibrary/resources/sensor_observation_type.py +6 -7
- unifieddatalibrary/resources/sensor_plan/sensor_plan.py +5 -6
- unifieddatalibrary/resources/sensor_type.py +6 -7
- unifieddatalibrary/resources/sera_data_comm_details.py +5 -6
- unifieddatalibrary/resources/sera_data_early_warning.py +5 -6
- unifieddatalibrary/resources/sera_data_navigation.py +5 -6
- unifieddatalibrary/resources/seradata_optical_payload.py +5 -6
- unifieddatalibrary/resources/seradata_radar_payload.py +5 -6
- unifieddatalibrary/resources/seradata_sigint_payload.py +5 -6
- unifieddatalibrary/resources/seradata_spacecraft_details.py +5 -6
- unifieddatalibrary/resources/sgi/sgi.py +5 -6
- unifieddatalibrary/resources/sigact/sigact.py +5 -6
- unifieddatalibrary/resources/site/operations.py +5 -6
- unifieddatalibrary/resources/site/site.py +5 -6
- unifieddatalibrary/resources/site_remark.py +5 -6
- unifieddatalibrary/resources/site_status/site_status.py +5 -6
- unifieddatalibrary/resources/sky_imagery/sky_imagery.py +5 -6
- unifieddatalibrary/resources/soi_observation_set/soi_observation_set.py +5 -6
- unifieddatalibrary/resources/solar_array.py +5 -6
- unifieddatalibrary/resources/sortie_ppr/sortie_ppr.py +5 -6
- unifieddatalibrary/resources/space_env_observation/space_env_observation.py +5 -6
- unifieddatalibrary/resources/stage.py +5 -6
- unifieddatalibrary/resources/star_catalog/star_catalog.py +5 -6
- unifieddatalibrary/resources/state_vector/state_vector.py +7 -8
- unifieddatalibrary/resources/status.py +5 -6
- unifieddatalibrary/resources/substatus.py +5 -6
- unifieddatalibrary/resources/supporting_data/query_help.py +6 -7
- unifieddatalibrary/resources/surface.py +5 -6
- unifieddatalibrary/resources/surface_obstruction.py +5 -6
- unifieddatalibrary/resources/swir/swir.py +5 -6
- unifieddatalibrary/resources/tai_utc/tai_utc.py +5 -6
- unifieddatalibrary/resources/track/track.py +5 -6
- unifieddatalibrary/resources/track_details/track_details.py +5 -6
- unifieddatalibrary/resources/track_route/track_route.py +5 -6
- unifieddatalibrary/resources/transponder.py +5 -6
- unifieddatalibrary/resources/vessel.py +5 -6
- unifieddatalibrary/resources/video/video.py +5 -6
- unifieddatalibrary/resources/weather_data/weather_data.py +5 -6
- unifieddatalibrary/resources/weather_report/weather_report.py +5 -6
- unifieddatalibrary/types/__init__.py +200 -0
- unifieddatalibrary/types/ai_queryhelp_response.py +63 -0
- unifieddatalibrary/types/air_event_queryhelp_response.py +63 -0
- unifieddatalibrary/types/air_load_plan_queryhelp_response.py +63 -0
- unifieddatalibrary/types/air_operations/__init__.py +1 -0
- unifieddatalibrary/types/air_operations/air_tasking_order_query_help_response.py +63 -0
- unifieddatalibrary/types/air_operations/diplomatic_clearance_unvalidated_publish_params.py +4 -4
- unifieddatalibrary/types/air_operations/diplomaticclearance_abridged.py +4 -4
- unifieddatalibrary/types/air_operations/diplomaticclearance_full.py +4 -4
- unifieddatalibrary/types/air_transport_mission_queryhelp_response.py +63 -0
- unifieddatalibrary/types/aircraft_queryhelp_response.py +63 -0
- unifieddatalibrary/types/aircraft_sorty_queryhelp_response.py +63 -0
- unifieddatalibrary/types/aircraft_status_queryhelp_response.py +63 -0
- unifieddatalibrary/types/aircraft_status_remark_queryhelp_response.py +63 -0
- unifieddatalibrary/types/airfield_queryhelp_response.py +63 -0
- unifieddatalibrary/types/airfield_slot_consumption_queryhelp_response.py +63 -0
- unifieddatalibrary/types/airfield_slot_queryhelp_response.py +63 -0
- unifieddatalibrary/types/airfield_status_queryhelp_response.py +63 -0
- unifieddatalibrary/types/airspace_control_order_query_help_response.py +63 -0
- unifieddatalibrary/types/analytic_imagery_full.py +272 -1
- unifieddatalibrary/types/analytic_imagery_history_response.py +2 -2
- unifieddatalibrary/types/analytic_imagery_queryhelp_response.py +63 -0
- unifieddatalibrary/types/analytic_imagery_tuple_response.py +2 -2
- unifieddatalibrary/types/antenna_queryhelp_response.py +63 -0
- unifieddatalibrary/types/attitude_data_query_help_response.py +63 -0
- unifieddatalibrary/types/attitude_set_query_help_response.py +63 -0
- unifieddatalibrary/types/aviation_risk_management_query_help_response.py +63 -0
- unifieddatalibrary/types/battery_queryhelp_response.py +63 -0
- unifieddatalibrary/types/beam_contour_query_help_response.py +63 -0
- unifieddatalibrary/types/beam_query_help_response.py +63 -0
- unifieddatalibrary/types/bus_query_help_response.py +63 -0
- unifieddatalibrary/types/channel_queryhelp_response.py +63 -0
- unifieddatalibrary/types/collect_request_abridged.py +3 -1
- unifieddatalibrary/types/collect_request_create_bulk_params.py +3 -1
- unifieddatalibrary/types/collect_request_create_params.py +3 -1
- unifieddatalibrary/types/collect_request_query_help_response.py +63 -0
- unifieddatalibrary/types/collect_request_unvalidated_publish_params.py +3 -1
- unifieddatalibrary/types/collect_response_query_help_response.py +63 -0
- unifieddatalibrary/types/comm_queryhelp_response.py +63 -0
- unifieddatalibrary/types/conjunction_abridged.py +6 -2
- unifieddatalibrary/types/conjunction_create_bulk_params.py +6 -2
- unifieddatalibrary/types/conjunction_create_udl_params.py +6 -2
- unifieddatalibrary/types/conjunction_full.py +6 -2
- unifieddatalibrary/types/conjunction_queryhelp_response.py +63 -0
- unifieddatalibrary/types/conjunction_unvalidated_publish_params.py +6 -2
- unifieddatalibrary/types/country_queryhelp_response.py +63 -0
- unifieddatalibrary/types/crew_queryhelp_response.py +63 -0
- unifieddatalibrary/types/diff_of_arrival_queryhelp_response.py +63 -0
- unifieddatalibrary/types/diplomatic_clearance/__init__.py +1 -0
- unifieddatalibrary/types/diplomatic_clearance/country_create_bulk_params.py +4 -4
- unifieddatalibrary/types/diplomatic_clearance/country_create_params.py +4 -4
- unifieddatalibrary/types/diplomatic_clearance/country_list_response.py +4 -4
- unifieddatalibrary/types/diplomatic_clearance/country_query_help_response.py +63 -0
- unifieddatalibrary/types/diplomatic_clearance/country_retrieve_response.py +4 -4
- unifieddatalibrary/types/diplomatic_clearance/country_tuple_response.py +4 -4
- unifieddatalibrary/types/diplomatic_clearance/country_unvalidated_publish_params.py +4 -4
- unifieddatalibrary/types/diplomatic_clearance/country_update_params.py +4 -4
- unifieddatalibrary/types/diplomatic_clearance_create_bulk_params.py +4 -4
- unifieddatalibrary/types/diplomatic_clearance_create_params.py +4 -4
- unifieddatalibrary/types/diplomatic_clearance_queryhelp_response.py +63 -0
- unifieddatalibrary/types/diplomatic_clearance_update_params.py +4 -4
- unifieddatalibrary/types/drift_history_queryhelp_response.py +63 -0
- unifieddatalibrary/types/dropzone_query_help_response.py +63 -0
- unifieddatalibrary/types/effect_request_query_help_response.py +63 -0
- unifieddatalibrary/types/effect_response_query_help_response.py +63 -0
- unifieddatalibrary/types/elset_query_current_elset_help_response.py +63 -0
- unifieddatalibrary/types/elset_queryhelp_response.py +63 -0
- unifieddatalibrary/types/emitter_geolocation_query_help_response.py +63 -0
- unifieddatalibrary/types/engine_queryhelp_response.py +63 -0
- unifieddatalibrary/types/entity_abridged.py +13 -2
- unifieddatalibrary/types/entity_create_params.py +2 -1
- unifieddatalibrary/types/entity_full.py +13 -2
- unifieddatalibrary/types/entity_get_all_types_response.py +4 -3875
- unifieddatalibrary/types/entity_ingest_param.py +2 -1
- unifieddatalibrary/types/entity_query_help_response.py +63 -0
- unifieddatalibrary/types/entity_update_params.py +2 -1
- unifieddatalibrary/types/eop_queryhelp_response.py +63 -0
- unifieddatalibrary/types/ephemeris_queryhelp_response.py +63 -0
- unifieddatalibrary/types/ephemeris_set.py +3 -1
- unifieddatalibrary/types/ephemeris_set_abridged.py +3 -1
- unifieddatalibrary/types/ephemeris_set_create_params.py +3 -1
- unifieddatalibrary/types/ephemeris_set_queryhelp_response.py +63 -0
- unifieddatalibrary/types/ephemeris_unvalidated_publish_params.py +3 -1
- unifieddatalibrary/types/equipment_query_help_response.py +63 -0
- unifieddatalibrary/types/equipment_remark_query_help_response.py +63 -0
- unifieddatalibrary/types/evac_query_help_response.py +63 -0
- unifieddatalibrary/types/event_evolution_queryhelp_response.py +63 -0
- unifieddatalibrary/types/feature_assessment_query_help_response.py +63 -0
- unifieddatalibrary/types/flightplan_queryhelp_response.py +63 -0
- unifieddatalibrary/types/geo_status_queryhelp_response.py +63 -0
- unifieddatalibrary/types/global_atmospheric_model_query_help_response.py +63 -0
- unifieddatalibrary/types/gnss_observationset_queryhelp_response.py +63 -0
- unifieddatalibrary/types/gnss_rawif_queryhelp_response.py +63 -0
- unifieddatalibrary/types/ground_imagery_queryhelp_response.py +63 -0
- unifieddatalibrary/types/h3_geo_hex_cell_queryhelp_response.py +63 -0
- unifieddatalibrary/types/h3_geo_queryhelp_response.py +63 -0
- unifieddatalibrary/types/hazard_queryhelp_response.py +63 -0
- unifieddatalibrary/types/ion_oobservation_queryhelp_response.py +63 -0
- unifieddatalibrary/types/ir_queryhelp_response.py +63 -0
- unifieddatalibrary/types/isr_collection_queryhelp_response.py +63 -0
- unifieddatalibrary/types/item_queryhelp_response.py +63 -0
- unifieddatalibrary/types/item_tracking_queryhelp_response.py +63 -0
- unifieddatalibrary/types/launch_detection_queryhelp_response.py +63 -0
- unifieddatalibrary/types/launch_event_queryhelp_response.py +63 -0
- unifieddatalibrary/types/launch_site_queryhelp_response.py +63 -0
- unifieddatalibrary/types/launch_vehicle_queryhelp_response.py +63 -0
- unifieddatalibrary/types/link_status/__init__.py +1 -0
- unifieddatalibrary/types/link_status/datalink_queryhelp_response.py +63 -0
- unifieddatalibrary/types/link_status_queryhelp_response.py +63 -0
- unifieddatalibrary/types/location_queryhelp_response.py +63 -0
- unifieddatalibrary/types/logistics_support_queryhelp_response.py +63 -0
- unifieddatalibrary/types/maneuver_create_bulk_params.py +6 -2
- unifieddatalibrary/types/maneuver_create_params.py +6 -2
- unifieddatalibrary/types/maneuver_get_response.py +6 -2
- unifieddatalibrary/types/maneuver_list_response.py +6 -2
- unifieddatalibrary/types/maneuver_queryhelp_response.py +63 -0
- unifieddatalibrary/types/maneuver_tuple_response.py +6 -2
- unifieddatalibrary/types/maneuver_unvalidated_publish_params.py +6 -2
- unifieddatalibrary/types/maneuvers/history_list_response.py +6 -2
- unifieddatalibrary/types/manifold_queryhelp_response.py +63 -0
- unifieddatalibrary/types/manifoldelset_queryhelp_response.py +63 -0
- unifieddatalibrary/types/missile_track_create_bulk_params.py +6 -4
- unifieddatalibrary/types/missile_track_list_response.py +6 -4
- unifieddatalibrary/types/missile_track_queryhelp_response.py +63 -0
- unifieddatalibrary/types/missile_track_tuple_response.py +6 -4
- unifieddatalibrary/types/missile_track_unvalidated_publish_params.py +6 -4
- unifieddatalibrary/types/missile_tracks/history_query_response.py +6 -4
- unifieddatalibrary/types/mission_assignment_queryhelp_response.py +63 -0
- unifieddatalibrary/types/mti_queryhelp_response.py +63 -0
- unifieddatalibrary/types/navigation_queryhelp_response.py +63 -0
- unifieddatalibrary/types/navigational_obstruction_queryhelp_response.py +63 -0
- unifieddatalibrary/types/notification_queryhelp_response.py +63 -0
- unifieddatalibrary/types/object_of_interest_queryhelp_response.py +63 -0
- unifieddatalibrary/types/observations/__init__.py +8 -0
- unifieddatalibrary/types/observations/ecpsdr_query_help_response.py +63 -0
- unifieddatalibrary/types/observations/eo_observation_queryhelp_response.py +63 -0
- unifieddatalibrary/types/observations/monoradar_queryhelp_response.py +63 -0
- unifieddatalibrary/types/observations/passive_radar_observation_queryhelp_response.py +63 -0
- unifieddatalibrary/types/observations/radarobservation_queryhelp_response.py +63 -0
- unifieddatalibrary/types/observations/rf_observation_queryhelp_response.py +63 -0
- unifieddatalibrary/types/onboardnavigation_queryhelp_response.py +63 -0
- unifieddatalibrary/types/onorbit_queryhelp_response.py +63 -0
- unifieddatalibrary/types/onorbitevent_queryhelp_response.py +63 -0
- unifieddatalibrary/types/onorbitlist_queryhelp_response.py +63 -0
- unifieddatalibrary/types/onorbitthrusterstatus_queryhelp_response.py +63 -0
- unifieddatalibrary/types/operatingunit_queryhelp_response.py +63 -0
- unifieddatalibrary/types/operatingunitremark_queryhelp_response.py +63 -0
- unifieddatalibrary/types/orbitdetermination/history_list_response.py +3 -1
- unifieddatalibrary/types/orbitdetermination_create_bulk_params.py +3 -1
- unifieddatalibrary/types/orbitdetermination_create_params.py +3 -1
- unifieddatalibrary/types/orbitdetermination_get_response.py +3 -1
- unifieddatalibrary/types/orbitdetermination_list_response.py +3 -1
- unifieddatalibrary/types/orbitdetermination_queryhelp_response.py +63 -0
- unifieddatalibrary/types/orbitdetermination_tuple_response.py +3 -1
- unifieddatalibrary/types/orbitdetermination_unvalidated_publish_params.py +3 -1
- unifieddatalibrary/types/orbittrack_queryhelp_response.py +63 -0
- unifieddatalibrary/types/organization_queryhelp_response.py +63 -0
- unifieddatalibrary/types/personnelrecovery_queryhelp_response.py +63 -0
- unifieddatalibrary/types/poi_queryhelp_response.py +63 -0
- unifieddatalibrary/types/port_queryhelp_response.py +63 -0
- unifieddatalibrary/types/rf_band_queryhelp_response.py +63 -0
- unifieddatalibrary/types/rf_band_type_queryhelp_response.py +63 -0
- unifieddatalibrary/types/rf_emitter_detail_queryhelp_response.py +63 -0
- unifieddatalibrary/types/rf_emitter_queryhelp_response.py +63 -0
- unifieddatalibrary/types/route_stat_query_help_response.py +63 -0
- unifieddatalibrary/types/sar_observation_queryhelp_response.py +63 -0
- unifieddatalibrary/types/sc_file_upload_params.py +6 -0
- unifieddatalibrary/types/scientific_queryhelp_response.py +63 -0
- unifieddatalibrary/types/scs/folder_create_params.py +3 -0
- unifieddatalibrary/types/scs/folder_update_params.py +2 -0
- unifieddatalibrary/types/scs/path_create_params.py +6 -0
- unifieddatalibrary/types/scs/scs_entity.py +2 -0
- unifieddatalibrary/types/scs/v2_file_upload_params.py +6 -0
- unifieddatalibrary/types/scs/v2_folder_create_params.py +5 -0
- unifieddatalibrary/types/scs/v2_update_params.py +5 -0
- unifieddatalibrary/types/sensor/__init__.py +1 -0
- unifieddatalibrary/types/sensor/calibration/history_query_response.py +64 -53
- unifieddatalibrary/types/sensor/calibration_create_bulk_params.py +64 -53
- unifieddatalibrary/types/sensor/calibration_create_params.py +64 -53
- unifieddatalibrary/types/sensor/calibration_query_help_response.py +63 -0
- unifieddatalibrary/types/sensor/calibration_query_response.py +64 -53
- unifieddatalibrary/types/sensor/calibration_retrieve_response.py +64 -53
- unifieddatalibrary/types/sensor/calibration_tuple_response.py +64 -53
- unifieddatalibrary/types/sensor/calibration_unvalidated_publish_params.py +64 -53
- unifieddatalibrary/types/sensor_create_params.py +349 -4
- unifieddatalibrary/types/sensor_get_response.py +362 -5
- unifieddatalibrary/types/sensor_list_response.py +362 -5
- unifieddatalibrary/types/sensor_maintenance_queryhelp_response.py +63 -0
- unifieddatalibrary/types/sensor_observation_type_queryhelp_response.py +63 -0
- unifieddatalibrary/types/sensor_plan/history_retrieve_response.py +3 -1
- unifieddatalibrary/types/sensor_plan_create_params.py +3 -1
- unifieddatalibrary/types/sensor_plan_get_response.py +3 -1
- unifieddatalibrary/types/sensor_plan_queryhelp_response.py +63 -0
- unifieddatalibrary/types/sensor_plan_tuple_response.py +3 -1
- unifieddatalibrary/types/sensor_plan_unvalidated_publish_params.py +3 -1
- unifieddatalibrary/types/sensor_plan_update_params.py +3 -1
- unifieddatalibrary/types/sensor_queryhelp_response.py +63 -0
- unifieddatalibrary/types/sensor_tuple_response.py +362 -5
- unifieddatalibrary/types/sensor_type_queryhelp_response.py +63 -0
- unifieddatalibrary/types/sensor_update_params.py +349 -4
- unifieddatalibrary/types/sera_data_comm_detail_queryhelp_response.py +63 -0
- unifieddatalibrary/types/sera_data_early_warning_queryhelp_response.py +63 -0
- unifieddatalibrary/types/sera_data_navigation_queryhelp_response.py +63 -0
- unifieddatalibrary/types/seradata_optical_payload_queryhelp_response.py +63 -0
- unifieddatalibrary/types/seradata_radar_payload_queryhelp_response.py +63 -0
- unifieddatalibrary/types/seradata_sigint_payload_queryhelp_response.py +63 -0
- unifieddatalibrary/types/seradata_spacecraft_detail_queryhelp_response.py +63 -0
- unifieddatalibrary/types/sgi_queryhelp_response.py +63 -0
- unifieddatalibrary/types/shared/collect_request_full.py +3 -1
- unifieddatalibrary/types/shared/file_data.py +2 -0
- unifieddatalibrary/types/shared/onorbit_full.py +13 -2
- unifieddatalibrary/types/shared_params/file_data.py +2 -0
- unifieddatalibrary/types/sigact_queryhelp_response.py +63 -0
- unifieddatalibrary/types/site/__init__.py +1 -0
- unifieddatalibrary/types/site/operation_query_help_response.py +63 -0
- unifieddatalibrary/types/site_queryhelp_response.py +63 -0
- unifieddatalibrary/types/site_remark_queryhelp_response.py +63 -0
- unifieddatalibrary/types/site_status_queryhelp_response.py +63 -0
- unifieddatalibrary/types/sky_imagery_queryhelp_response.py +63 -0
- unifieddatalibrary/types/soi_observation_set_queryhelp_response.py +63 -0
- unifieddatalibrary/types/solar_array_queryhelp_response.py +63 -0
- unifieddatalibrary/types/sortie_ppr_queryhelp_response.py +63 -0
- unifieddatalibrary/types/space_env_observation_queryhelp_response.py +63 -0
- unifieddatalibrary/types/stage_queryhelp_response.py +63 -0
- unifieddatalibrary/types/star_catalog_queryhelp_response.py +63 -0
- unifieddatalibrary/types/state_vector_abridged.py +3 -1
- unifieddatalibrary/types/state_vector_create_params.py +3 -1
- unifieddatalibrary/types/state_vector_full.py +3 -1
- unifieddatalibrary/types/state_vector_ingest_param.py +3 -1
- unifieddatalibrary/types/state_vector_queryhelp_response.py +63 -0
- unifieddatalibrary/types/status_queryhelp_response.py +63 -0
- unifieddatalibrary/types/substatus_queryhelp_response.py +63 -0
- unifieddatalibrary/types/supporting_data/__init__.py +1 -0
- unifieddatalibrary/types/supporting_data/query_help_retrieve_response.py +63 -0
- unifieddatalibrary/types/surface_obstruction_queryhelp_response.py +63 -0
- unifieddatalibrary/types/surface_queryhelp_response.py +63 -0
- unifieddatalibrary/types/swir_queryhelp_response.py +63 -0
- unifieddatalibrary/types/tai_utc_queryhelp_response.py +63 -0
- unifieddatalibrary/types/track/track_full.py +26 -0
- unifieddatalibrary/types/track_create_bulk_params.py +26 -0
- unifieddatalibrary/types/track_detail_queryhelp_response.py +63 -0
- unifieddatalibrary/types/track_list_response.py +26 -0
- unifieddatalibrary/types/track_queryhelp_response.py +63 -0
- unifieddatalibrary/types/track_route_queryhelp_response.py +63 -0
- unifieddatalibrary/types/track_unvalidated_publish_params.py +26 -0
- unifieddatalibrary/types/transponder_queryhelp_response.py +63 -0
- unifieddatalibrary/types/vessel_queryhelp_response.py +63 -0
- unifieddatalibrary/types/video_queryhelp_response.py +63 -0
- unifieddatalibrary/types/weather_data_queryhelp_response.py +63 -0
- unifieddatalibrary/types/weather_report_queryhelp_response.py +63 -0
- {udl_sdk-0.1.0a10.dist-info → udl_sdk-0.1.0a12.dist-info}/WHEEL +0 -0
- {udl_sdk-0.1.0a10.dist-info → udl_sdk-0.1.0a12.dist-info}/licenses/LICENSE +0 -0
unifieddatalibrary/__init__.py
CHANGED
@@ -36,7 +36,7 @@ from ._exceptions import (
|
|
36
36
|
UnprocessableEntityError,
|
37
37
|
APIResponseValidationError,
|
38
38
|
)
|
39
|
-
from ._base_client import DefaultHttpxClient, DefaultAsyncHttpxClient
|
39
|
+
from ._base_client import DefaultHttpxClient, DefaultAioHttpClient, DefaultAsyncHttpxClient
|
40
40
|
from ._utils._logs import setup_logging as _setup_logging
|
41
41
|
|
42
42
|
__all__ = [
|
@@ -78,6 +78,7 @@ __all__ = [
|
|
78
78
|
"DEFAULT_CONNECTION_LIMITS",
|
79
79
|
"DefaultHttpxClient",
|
80
80
|
"DefaultAsyncHttpxClient",
|
81
|
+
"DefaultAioHttpClient",
|
81
82
|
]
|
82
83
|
|
83
84
|
if not _t.TYPE_CHECKING:
|
@@ -89,6 +89,7 @@ log: logging.Logger = logging.getLogger(__name__)
|
|
89
89
|
# TODO: make base page type vars covariant
|
90
90
|
SyncPageT = TypeVar("SyncPageT", bound="BaseSyncPage[Any]")
|
91
91
|
AsyncPageT = TypeVar("AsyncPageT", bound="BaseAsyncPage[Any]")
|
92
|
+
_BasePageT = TypeVar("_BasePageT", bound="BasePage[Any]")
|
92
93
|
|
93
94
|
|
94
95
|
_T = TypeVar("_T")
|
@@ -174,6 +175,7 @@ class BasePage(GenericModel, Generic[_T]):
|
|
174
175
|
next_page_info(): Get the necessary information to make a request for the next page
|
175
176
|
"""
|
176
177
|
|
178
|
+
_response: httpx.Response = PrivateAttr()
|
177
179
|
_options: FinalRequestOptions = PrivateAttr()
|
178
180
|
_model: Type[_T] = PrivateAttr()
|
179
181
|
|
@@ -222,6 +224,23 @@ class BasePage(GenericModel, Generic[_T]):
|
|
222
224
|
|
223
225
|
raise ValueError("Unexpected PageInfo state")
|
224
226
|
|
227
|
+
@classmethod
|
228
|
+
def build(cls: Type[_BasePageT], *, response: httpx.Response, data: object) -> _BasePageT: # noqa: ARG003
|
229
|
+
return cls._with_response(
|
230
|
+
cls.construct(
|
231
|
+
None,
|
232
|
+
**{
|
233
|
+
**(cast(Mapping[str, Any], data) if is_mapping(data) else {}),
|
234
|
+
},
|
235
|
+
),
|
236
|
+
response,
|
237
|
+
)
|
238
|
+
|
239
|
+
@classmethod
|
240
|
+
def _with_response(cls, inst: _BasePageT, response: httpx.Response) -> _BasePageT:
|
241
|
+
inst._response = response
|
242
|
+
return inst
|
243
|
+
|
225
244
|
|
226
245
|
class BaseSyncPage(BasePage[_T], Generic[_T]):
|
227
246
|
_client: SyncAPIClient = pydantic.PrivateAttr()
|
@@ -529,6 +548,15 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|
529
548
|
# work around https://github.com/encode/httpx/discussions/2880
|
530
549
|
kwargs["extensions"] = {"sni_hostname": prepared_url.host.replace("_", "-")}
|
531
550
|
|
551
|
+
is_body_allowed = options.method.lower() != "get"
|
552
|
+
|
553
|
+
if is_body_allowed:
|
554
|
+
kwargs["json"] = json_data if is_given(json_data) else None
|
555
|
+
kwargs["files"] = files
|
556
|
+
else:
|
557
|
+
headers.pop("Content-Type", None)
|
558
|
+
kwargs.pop("data", None)
|
559
|
+
|
532
560
|
# TODO: report this error to httpx
|
533
561
|
return self._client.build_request( # pyright: ignore[reportUnknownMemberType]
|
534
562
|
headers=headers,
|
@@ -540,8 +568,6 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|
540
568
|
# so that passing a `TypedDict` doesn't cause an error.
|
541
569
|
# https://github.com/microsoft/pyright/issues/3526#event-6715453066
|
542
570
|
params=self.qs.stringify(cast(Mapping[str, Any], params)) if params else None,
|
543
|
-
json=json_data if is_given(json_data) else None,
|
544
|
-
files=files,
|
545
571
|
**kwargs,
|
546
572
|
)
|
547
573
|
|
@@ -960,6 +986,9 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
960
986
|
if self.custom_auth is not None:
|
961
987
|
kwargs["auth"] = self.custom_auth
|
962
988
|
|
989
|
+
if options.follow_redirects is not None:
|
990
|
+
kwargs["follow_redirects"] = options.follow_redirects
|
991
|
+
|
963
992
|
log.debug("Sending HTTP Request: %s %s", request.method, request.url)
|
964
993
|
|
965
994
|
response = None
|
@@ -1068,7 +1097,14 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
1068
1097
|
) -> ResponseT:
|
1069
1098
|
origin = get_origin(cast_to) or cast_to
|
1070
1099
|
|
1071
|
-
if
|
1100
|
+
if (
|
1101
|
+
inspect.isclass(origin)
|
1102
|
+
and issubclass(origin, BaseAPIResponse)
|
1103
|
+
# we only want to actually return the custom BaseAPIResponse class if we're
|
1104
|
+
# returning the raw response, or if we're not streaming SSE, as if we're streaming
|
1105
|
+
# SSE then `cast_to` doesn't actively reflect the type we need to parse into
|
1106
|
+
and (not stream or bool(response.request.headers.get(RAW_RESPONSE_HEADER)))
|
1107
|
+
):
|
1072
1108
|
if not issubclass(origin, APIResponse):
|
1073
1109
|
raise TypeError(f"API Response types must subclass {APIResponse}; Received {origin}")
|
1074
1110
|
|
@@ -1279,6 +1315,24 @@ class _DefaultAsyncHttpxClient(httpx.AsyncClient):
|
|
1279
1315
|
super().__init__(**kwargs)
|
1280
1316
|
|
1281
1317
|
|
1318
|
+
try:
|
1319
|
+
import httpx_aiohttp
|
1320
|
+
except ImportError:
|
1321
|
+
|
1322
|
+
class _DefaultAioHttpClient(httpx.AsyncClient):
|
1323
|
+
def __init__(self, **_kwargs: Any) -> None:
|
1324
|
+
raise RuntimeError("To use the aiohttp client you must have installed the package with the `aiohttp` extra")
|
1325
|
+
else:
|
1326
|
+
|
1327
|
+
class _DefaultAioHttpClient(httpx_aiohttp.HttpxAiohttpClient): # type: ignore
|
1328
|
+
def __init__(self, **kwargs: Any) -> None:
|
1329
|
+
kwargs.setdefault("timeout", DEFAULT_TIMEOUT)
|
1330
|
+
kwargs.setdefault("limits", DEFAULT_CONNECTION_LIMITS)
|
1331
|
+
kwargs.setdefault("follow_redirects", True)
|
1332
|
+
|
1333
|
+
super().__init__(**kwargs)
|
1334
|
+
|
1335
|
+
|
1282
1336
|
if TYPE_CHECKING:
|
1283
1337
|
DefaultAsyncHttpxClient = httpx.AsyncClient
|
1284
1338
|
"""An alias to `httpx.AsyncClient` that provides the same defaults that this SDK
|
@@ -1287,8 +1341,12 @@ if TYPE_CHECKING:
|
|
1287
1341
|
This is useful because overriding the `http_client` with your own instance of
|
1288
1342
|
`httpx.AsyncClient` will result in httpx's defaults being used, not ours.
|
1289
1343
|
"""
|
1344
|
+
|
1345
|
+
DefaultAioHttpClient = httpx.AsyncClient
|
1346
|
+
"""An alias to `httpx.AsyncClient` that changes the default HTTP transport to `aiohttp`."""
|
1290
1347
|
else:
|
1291
1348
|
DefaultAsyncHttpxClient = _DefaultAsyncHttpxClient
|
1349
|
+
DefaultAioHttpClient = _DefaultAioHttpClient
|
1292
1350
|
|
1293
1351
|
|
1294
1352
|
class AsyncHttpxClientWrapper(DefaultAsyncHttpxClient):
|
@@ -1460,6 +1518,9 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
1460
1518
|
if self.custom_auth is not None:
|
1461
1519
|
kwargs["auth"] = self.custom_auth
|
1462
1520
|
|
1521
|
+
if options.follow_redirects is not None:
|
1522
|
+
kwargs["follow_redirects"] = options.follow_redirects
|
1523
|
+
|
1463
1524
|
log.debug("Sending HTTP Request: %s %s", request.method, request.url)
|
1464
1525
|
|
1465
1526
|
response = None
|
@@ -1568,7 +1629,14 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
1568
1629
|
) -> ResponseT:
|
1569
1630
|
origin = get_origin(cast_to) or cast_to
|
1570
1631
|
|
1571
|
-
if
|
1632
|
+
if (
|
1633
|
+
inspect.isclass(origin)
|
1634
|
+
and issubclass(origin, BaseAPIResponse)
|
1635
|
+
# we only want to actually return the custom BaseAPIResponse class if we're
|
1636
|
+
# returning the raw response, or if we're not streaming SSE, as if we're streaming
|
1637
|
+
# SSE then `cast_to` doesn't actively reflect the type we need to parse into
|
1638
|
+
and (not stream or bool(response.request.headers.get(RAW_RESPONSE_HEADER)))
|
1639
|
+
):
|
1572
1640
|
if not issubclass(origin, AsyncAPIResponse):
|
1573
1641
|
raise TypeError(f"API Response types must subclass {AsyncAPIResponse}; Received {origin}")
|
1574
1642
|
|
unifieddatalibrary/_client.py
CHANGED
@@ -668,7 +668,7 @@ class Unifieddatalibrary(SyncAPIClient):
|
|
668
668
|
params = set_default_query
|
669
669
|
|
670
670
|
http_client = http_client or self._client
|
671
|
-
|
671
|
+
client = self.__class__(
|
672
672
|
password=password or self.password,
|
673
673
|
username=username or self.username,
|
674
674
|
base_url=base_url or self.base_url,
|
@@ -679,6 +679,8 @@ class Unifieddatalibrary(SyncAPIClient):
|
|
679
679
|
default_query=params,
|
680
680
|
**_extra_kwargs,
|
681
681
|
)
|
682
|
+
client._base_url_overridden = self._base_url_overridden or base_url is not None
|
683
|
+
return client
|
682
684
|
|
683
685
|
# Alias for `copy` for nicer inline usage, e.g.
|
684
686
|
# client.with_options(timeout=10).foo.create(...)
|
@@ -1178,7 +1180,7 @@ class AsyncUnifieddatalibrary(AsyncAPIClient):
|
|
1178
1180
|
params = set_default_query
|
1179
1181
|
|
1180
1182
|
http_client = http_client or self._client
|
1181
|
-
|
1183
|
+
client = self.__class__(
|
1182
1184
|
password=password or self.password,
|
1183
1185
|
username=username or self.username,
|
1184
1186
|
base_url=base_url or self.base_url,
|
@@ -1189,6 +1191,8 @@ class AsyncUnifieddatalibrary(AsyncAPIClient):
|
|
1189
1191
|
default_query=params,
|
1190
1192
|
**_extra_kwargs,
|
1191
1193
|
)
|
1194
|
+
client._base_url_overridden = self._base_url_overridden or base_url is not None
|
1195
|
+
return client
|
1192
1196
|
|
1193
1197
|
# Alias for `copy` for nicer inline usage, e.g.
|
1194
1198
|
# client.with_options(timeout=10).foo.create(...)
|
unifieddatalibrary/_models.py
CHANGED
@@ -2,9 +2,10 @@ from __future__ import annotations
|
|
2
2
|
|
3
3
|
import os
|
4
4
|
import inspect
|
5
|
-
from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, cast
|
5
|
+
from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, Optional, cast
|
6
6
|
from datetime import date, datetime
|
7
7
|
from typing_extensions import (
|
8
|
+
List,
|
8
9
|
Unpack,
|
9
10
|
Literal,
|
10
11
|
ClassVar,
|
@@ -366,7 +367,7 @@ def _construct_field(value: object, field: FieldInfo, key: str) -> object:
|
|
366
367
|
if type_ is None:
|
367
368
|
raise RuntimeError(f"Unexpected field type is None for {key}")
|
368
369
|
|
369
|
-
return construct_type(value=value, type_=type_)
|
370
|
+
return construct_type(value=value, type_=type_, metadata=getattr(field, "metadata", None))
|
370
371
|
|
371
372
|
|
372
373
|
def is_basemodel(type_: type) -> bool:
|
@@ -420,7 +421,7 @@ def construct_type_unchecked(*, value: object, type_: type[_T]) -> _T:
|
|
420
421
|
return cast(_T, construct_type(value=value, type_=type_))
|
421
422
|
|
422
423
|
|
423
|
-
def construct_type(*, value: object, type_: object) -> object:
|
424
|
+
def construct_type(*, value: object, type_: object, metadata: Optional[List[Any]] = None) -> object:
|
424
425
|
"""Loose coercion to the expected type with construction of nested values.
|
425
426
|
|
426
427
|
If the given value does not match the expected type then it is returned as-is.
|
@@ -438,8 +439,10 @@ def construct_type(*, value: object, type_: object) -> object:
|
|
438
439
|
type_ = type_.__value__ # type: ignore[unreachable]
|
439
440
|
|
440
441
|
# unwrap `Annotated[T, ...]` -> `T`
|
441
|
-
if
|
442
|
-
meta: tuple[Any, ...] =
|
442
|
+
if metadata is not None:
|
443
|
+
meta: tuple[Any, ...] = tuple(metadata)
|
444
|
+
elif is_annotated_type(type_):
|
445
|
+
meta = get_args(type_)[1:]
|
443
446
|
type_ = extract_type_arg(type_, 0)
|
444
447
|
else:
|
445
448
|
meta = tuple()
|
@@ -737,6 +740,7 @@ class FinalRequestOptionsInput(TypedDict, total=False):
|
|
737
740
|
idempotency_key: str
|
738
741
|
json_data: Body
|
739
742
|
extra_json: AnyMapping
|
743
|
+
follow_redirects: bool
|
740
744
|
|
741
745
|
|
742
746
|
@final
|
@@ -750,6 +754,7 @@ class FinalRequestOptions(pydantic.BaseModel):
|
|
750
754
|
files: Union[HttpxRequestFiles, None] = None
|
751
755
|
idempotency_key: Union[str, None] = None
|
752
756
|
post_parser: Union[Callable[[Any], Any], NotGiven] = NotGiven()
|
757
|
+
follow_redirects: Union[bool, None] = None
|
753
758
|
|
754
759
|
# It should be noted that we cannot use `json` here as that would override
|
755
760
|
# a BaseModel method in an incompatible fashion.
|
unifieddatalibrary/_types.py
CHANGED
@@ -100,6 +100,7 @@ class RequestOptions(TypedDict, total=False):
|
|
100
100
|
params: Query
|
101
101
|
extra_json: AnyMapping
|
102
102
|
idempotency_key: str
|
103
|
+
follow_redirects: bool
|
103
104
|
|
104
105
|
|
105
106
|
# Sentinel class used until PEP 0661 is accepted
|
@@ -215,3 +216,4 @@ class _GenericAlias(Protocol):
|
|
215
216
|
|
216
217
|
class HttpxSendArgs(TypedDict, total=False):
|
217
218
|
auth: httpx.Auth
|
219
|
+
follow_redirects: bool
|
@@ -231,7 +231,7 @@ def _format_data(data: object, format_: PropertyFormat, format_template: str | N
|
|
231
231
|
if isinstance(data, (date, datetime)):
|
232
232
|
if format_ == "iso8601":
|
233
233
|
if isinstance(data, datetime):
|
234
|
-
return data.strftime(
|
234
|
+
return data.strftime("%Y-%m-%dT%H:%M:%S.%fZ")
|
235
235
|
return data.isoformat()
|
236
236
|
|
237
237
|
if format_ == "custom" and format_template is not None:
|
@@ -395,7 +395,7 @@ async def _async_format_data(data: object, format_: PropertyFormat, format_templ
|
|
395
395
|
if isinstance(data, (date, datetime)):
|
396
396
|
if format_ == "iso8601":
|
397
397
|
if isinstance(data, datetime):
|
398
|
-
return data.strftime(
|
398
|
+
return data.strftime("%Y-%m-%dT%H:%M:%S.%fZ")
|
399
399
|
return data.isoformat()
|
400
400
|
|
401
401
|
if format_ == "custom" and format_template is not None:
|
unifieddatalibrary/_version.py
CHANGED
unifieddatalibrary/lib/common.py
CHANGED
@@ -1,10 +1,12 @@
|
|
1
1
|
# Proposed approach 2 for supporting query parameters with dynamic method generation
|
2
2
|
|
3
|
-
from typing import
|
3
|
+
from typing import Any, Dict, Type, Generic, TypeVar, Callable
|
4
|
+
|
4
5
|
from pydantic import BaseModel
|
5
6
|
|
6
7
|
T = TypeVar("T", bound=BaseModel)
|
7
8
|
|
9
|
+
|
8
10
|
class Query(Generic[T]):
|
9
11
|
"""
|
10
12
|
A dynamic query builder that generates field-based filter methods at runtime.
|
@@ -48,7 +50,7 @@ class Query(Generic[T]):
|
|
48
50
|
}
|
49
51
|
|
50
52
|
# Dynamically create query methods for each field/operator combination
|
51
|
-
for field_name,
|
53
|
+
for field_name, _field_info in model.model_fields.items():
|
52
54
|
for suffix, operator in operators.items():
|
53
55
|
method_name = f"{field_name}{suffix}"
|
54
56
|
method = self._make_method(field_name, operator)
|
@@ -65,8 +67,10 @@ class Query(Generic[T]):
|
|
65
67
|
Returns:
|
66
68
|
A callable method that accepts a value and returns the updated Query object.
|
67
69
|
"""
|
70
|
+
|
68
71
|
def method(self: "Query[T]", value: Any) -> "Query[T]":
|
69
72
|
return self._add_filter(field_name, operator, value)
|
73
|
+
|
70
74
|
return method
|
71
75
|
|
72
76
|
def _add_filter(self, field_name: str, operator: str, value: Any) -> "Query[T]":
|
@@ -1,10 +1,11 @@
|
|
1
1
|
# Proposed approach 1 for supporting query parameters in a typed and composable way
|
2
2
|
|
3
|
-
from typing import
|
4
|
-
from pydantic import BaseModel
|
3
|
+
from typing import Any, Dict, Type, Tuple, Union, Generic, TypeVar, Protocol, cast
|
5
4
|
from datetime import datetime
|
6
|
-
from .util import sanitize_datetime
|
7
5
|
|
6
|
+
from pydantic import BaseModel
|
7
|
+
|
8
|
+
from .util import sanitize_datetime
|
8
9
|
|
9
10
|
T = TypeVar("T", bound=BaseModel)
|
10
11
|
|
@@ -16,6 +17,7 @@ class QueryField(Protocol):
|
|
16
17
|
Each method represents a filter operation that returns a modified Query object
|
17
18
|
with the new filter applied.
|
18
19
|
"""
|
20
|
+
|
19
21
|
def eq(self, value: Any) -> "Query[Any]": ...
|
20
22
|
def gte(self, value: Any) -> "Query[Any]": ...
|
21
23
|
def lte(self, value: Any) -> "Query[Any]": ...
|
@@ -91,7 +93,7 @@ class Query(Generic[T]):
|
|
91
93
|
if model_info is None:
|
92
94
|
raise KeyError(f"{self.field_name} does not exist in {self.query.model}")
|
93
95
|
|
94
|
-
key = getattr(model_info,
|
96
|
+
key = getattr(model_info, "alias", None) or self.field_name
|
95
97
|
|
96
98
|
if operator == "between":
|
97
99
|
if not isinstance(value, tuple) or len(value) != 2:
|
unifieddatalibrary/lib/util.py
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
-
|
2
1
|
from datetime import datetime, timezone
|
2
|
+
|
3
3
|
from .common import UDL_DATETIME_FORMAT
|
4
4
|
|
5
|
+
|
5
6
|
def sanitize_datetime(val: datetime) -> str:
|
6
7
|
"""Takes a datetime argument val and returns the same datetime converted to UTC.
|
7
8
|
If tzinfo is not set, assumes local time in conversion."""
|
unifieddatalibrary/pagination.py
CHANGED
@@ -1,17 +1,23 @@
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
2
|
|
3
|
-
from typing import Any, List, Type, Generic, Mapping, TypeVar, Optional, cast
|
3
|
+
from typing import Any, List, Type, Generic, Mapping, TypeVar, Callable, Optional, cast
|
4
4
|
from typing_extensions import override
|
5
5
|
|
6
|
-
from httpx import Response
|
6
|
+
from httpx import URL, Response
|
7
7
|
|
8
8
|
from ._utils import is_mapping
|
9
9
|
from ._models import BaseModel
|
10
10
|
from ._base_client import BasePage, PageInfo, BaseSyncPage, BaseAsyncPage
|
11
11
|
|
12
|
-
__all__ = [
|
12
|
+
__all__ = [
|
13
|
+
"SyncOffsetPage",
|
14
|
+
"AsyncOffsetPage",
|
15
|
+
"SyncKafkaOffsetPage",
|
16
|
+
"AsyncKafkaOffsetPage",
|
17
|
+
]
|
13
18
|
|
14
19
|
_BaseModelT = TypeVar("_BaseModelT", bound=BaseModel)
|
20
|
+
_BasePageT = TypeVar("_BasePageT", bound=BasePage[Any])
|
15
21
|
|
16
22
|
_T = TypeVar("_T")
|
17
23
|
|
@@ -38,12 +44,16 @@ class SyncOffsetPage(BaseSyncPage[_T], BasePage[_T], Generic[_T]):
|
|
38
44
|
return PageInfo(params={"firstResult": current_count})
|
39
45
|
|
40
46
|
@classmethod
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
+
@override
|
48
|
+
def build(cls: Type[_BasePageT], *, response: Response, data: object) -> _BasePageT: # noqa: ARG003
|
49
|
+
return cls._with_response(
|
50
|
+
cls.construct(
|
51
|
+
None,
|
52
|
+
**{
|
53
|
+
**(cast(Mapping[str, Any], data) if is_mapping(data) else {"items": data}),
|
54
|
+
},
|
55
|
+
),
|
56
|
+
response,
|
47
57
|
)
|
48
58
|
|
49
59
|
|
@@ -69,10 +79,114 @@ class AsyncOffsetPage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]):
|
|
69
79
|
return PageInfo(params={"firstResult": current_count})
|
70
80
|
|
71
81
|
@classmethod
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
82
|
+
@override
|
83
|
+
def build(cls: Type[_BasePageT], *, response: Response, data: object) -> _BasePageT: # noqa: ARG003
|
84
|
+
return cls._with_response(
|
85
|
+
cls.construct(
|
86
|
+
None,
|
87
|
+
**{
|
88
|
+
**(cast(Mapping[str, Any], data) if is_mapping(data) else {"items": data}),
|
89
|
+
},
|
90
|
+
),
|
91
|
+
response,
|
92
|
+
)
|
93
|
+
|
94
|
+
|
95
|
+
class SyncKafkaOffsetPage(BaseSyncPage[_T], BasePage[_T], Generic[_T]):
|
96
|
+
"""Pagination for Kafka-style endpoints that return the next offset in a response header."""
|
97
|
+
|
98
|
+
items: List[_T]
|
99
|
+
url_builder: Callable[[int], str]
|
100
|
+
|
101
|
+
@staticmethod
|
102
|
+
def with_url_builder(fn: Callable[[int], str]) -> Type["SyncKafkaOffsetPage[object]"]:
|
103
|
+
"""Create a page class with a URL builder for constructing next page URLs."""
|
104
|
+
|
105
|
+
class PageWithBuilder(SyncKafkaOffsetPage[object]):
|
106
|
+
url_builder = fn
|
107
|
+
|
108
|
+
return PageWithBuilder
|
109
|
+
|
110
|
+
@override
|
111
|
+
def _get_page_items(self) -> List[_T]:
|
112
|
+
items = self.items
|
113
|
+
if not items:
|
114
|
+
return []
|
115
|
+
return items
|
116
|
+
|
117
|
+
@override
|
118
|
+
def next_page_info(self) -> Optional[PageInfo]:
|
119
|
+
next_offset_str = self._response.headers.get("KAFKA_NEXT_OFFSET")
|
120
|
+
if not next_offset_str:
|
121
|
+
return None
|
122
|
+
|
123
|
+
try:
|
124
|
+
next_offset = int(next_offset_str)
|
125
|
+
except ValueError:
|
126
|
+
return None
|
127
|
+
|
128
|
+
new_url = self.url_builder(next_offset)
|
129
|
+
return PageInfo(url=URL(new_url))
|
130
|
+
|
131
|
+
@classmethod
|
132
|
+
@override
|
133
|
+
def build(cls: Type[_BasePageT], *, response: Response, data: object) -> _BasePageT: # noqa: ARG003
|
134
|
+
return cls._with_response(
|
135
|
+
cls.construct(
|
136
|
+
None,
|
137
|
+
**{
|
138
|
+
**(cast(Mapping[str, Any], data) if is_mapping(data) else {"items": data}),
|
139
|
+
},
|
140
|
+
),
|
141
|
+
response,
|
142
|
+
)
|
143
|
+
|
144
|
+
|
145
|
+
class AsyncKafkaOffsetPage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]):
|
146
|
+
"""Async pagination for Kafka-style endpoints that return the next offset in a response header."""
|
147
|
+
|
148
|
+
items: List[_T]
|
149
|
+
url_builder: Callable[[int], str]
|
150
|
+
|
151
|
+
@staticmethod
|
152
|
+
def with_url_builder(fn: Callable[[int], str]) -> Type["AsyncKafkaOffsetPage[object]"]:
|
153
|
+
"""Create a page class with a URL builder for constructing next page URLs."""
|
154
|
+
|
155
|
+
class PageWithBuilder(AsyncKafkaOffsetPage[object]):
|
156
|
+
url_builder = fn
|
157
|
+
|
158
|
+
return PageWithBuilder
|
159
|
+
|
160
|
+
@override
|
161
|
+
def _get_page_items(self) -> List[_T]:
|
162
|
+
items = self.items
|
163
|
+
if not items:
|
164
|
+
return []
|
165
|
+
return items
|
166
|
+
|
167
|
+
@override
|
168
|
+
def next_page_info(self) -> Optional[PageInfo]:
|
169
|
+
next_offset_str = self._response.headers.get("KAFKA_NEXT_OFFSET")
|
170
|
+
if not next_offset_str:
|
171
|
+
return None
|
172
|
+
|
173
|
+
try:
|
174
|
+
next_offset = int(next_offset_str)
|
175
|
+
except ValueError:
|
176
|
+
return None
|
177
|
+
|
178
|
+
new_url = self.url_builder(next_offset)
|
179
|
+
return PageInfo(url=URL(new_url))
|
180
|
+
|
181
|
+
@classmethod
|
182
|
+
@override
|
183
|
+
def build(cls: Type[_BasePageT], *, response: Response, data: object) -> _BasePageT: # noqa: ARG003
|
184
|
+
return cls._with_response(
|
185
|
+
cls.construct(
|
186
|
+
None,
|
187
|
+
**{
|
188
|
+
**(cast(Mapping[str, Any], data) if is_mapping(data) else {"items": data}),
|
189
|
+
},
|
190
|
+
),
|
191
|
+
response,
|
78
192
|
)
|
@@ -33,6 +33,7 @@ from .._base_client import AsyncPaginator, make_request_options
|
|
33
33
|
from ..types.air_event_get_response import AirEventGetResponse
|
34
34
|
from ..types.air_event_list_response import AirEventListResponse
|
35
35
|
from ..types.air_event_tuple_response import AirEventTupleResponse
|
36
|
+
from ..types.air_event_queryhelp_response import AirEventQueryhelpResponse
|
36
37
|
|
37
38
|
__all__ = ["AirEventsResource", "AsyncAirEventsResource"]
|
38
39
|
|
@@ -765,18 +766,17 @@ class AirEventsResource(SyncAPIResource):
|
|
765
766
|
extra_query: Query | None = None,
|
766
767
|
extra_body: Body | None = None,
|
767
768
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
768
|
-
) ->
|
769
|
+
) -> AirEventQueryhelpResponse:
|
769
770
|
"""
|
770
771
|
Service operation to provide detailed information on available dynamic query
|
771
772
|
parameters for a particular data type.
|
772
773
|
"""
|
773
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
774
774
|
return self._get(
|
775
775
|
"/udl/airevent/queryhelp",
|
776
776
|
options=make_request_options(
|
777
777
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
778
778
|
),
|
779
|
-
cast_to=
|
779
|
+
cast_to=AirEventQueryhelpResponse,
|
780
780
|
)
|
781
781
|
|
782
782
|
def tuple(
|
@@ -1600,18 +1600,17 @@ class AsyncAirEventsResource(AsyncAPIResource):
|
|
1600
1600
|
extra_query: Query | None = None,
|
1601
1601
|
extra_body: Body | None = None,
|
1602
1602
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
1603
|
-
) ->
|
1603
|
+
) -> AirEventQueryhelpResponse:
|
1604
1604
|
"""
|
1605
1605
|
Service operation to provide detailed information on available dynamic query
|
1606
1606
|
parameters for a particular data type.
|
1607
1607
|
"""
|
1608
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
1609
1608
|
return await self._get(
|
1610
1609
|
"/udl/airevent/queryhelp",
|
1611
1610
|
options=make_request_options(
|
1612
1611
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
1613
1612
|
),
|
1614
|
-
cast_to=
|
1613
|
+
cast_to=AirEventQueryhelpResponse,
|
1615
1614
|
)
|
1616
1615
|
|
1617
1616
|
async def tuple(
|
@@ -30,6 +30,7 @@ from .._base_client import AsyncPaginator, make_request_options
|
|
30
30
|
from ..types.airloadplan_full import AirloadplanFull
|
31
31
|
from ..types.airloadplan_abridged import AirloadplanAbridged
|
32
32
|
from ..types.air_load_plan_tuple_response import AirLoadPlanTupleResponse
|
33
|
+
from ..types.air_load_plan_queryhelp_response import AirLoadPlanQueryhelpResponse
|
33
34
|
|
34
35
|
__all__ = ["AirLoadPlansResource", "AsyncAirLoadPlansResource"]
|
35
36
|
|
@@ -564,18 +565,17 @@ class AirLoadPlansResource(SyncAPIResource):
|
|
564
565
|
extra_query: Query | None = None,
|
565
566
|
extra_body: Body | None = None,
|
566
567
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
567
|
-
) ->
|
568
|
+
) -> AirLoadPlanQueryhelpResponse:
|
568
569
|
"""
|
569
570
|
Service operation to provide detailed information on available dynamic query
|
570
571
|
parameters for a particular data type.
|
571
572
|
"""
|
572
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
573
573
|
return self._get(
|
574
574
|
"/udl/airloadplan/queryhelp",
|
575
575
|
options=make_request_options(
|
576
576
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
577
577
|
),
|
578
|
-
cast_to=
|
578
|
+
cast_to=AirLoadPlanQueryhelpResponse,
|
579
579
|
)
|
580
580
|
|
581
581
|
def tuple(
|
@@ -1170,18 +1170,17 @@ class AsyncAirLoadPlansResource(AsyncAPIResource):
|
|
1170
1170
|
extra_query: Query | None = None,
|
1171
1171
|
extra_body: Body | None = None,
|
1172
1172
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
1173
|
-
) ->
|
1173
|
+
) -> AirLoadPlanQueryhelpResponse:
|
1174
1174
|
"""
|
1175
1175
|
Service operation to provide detailed information on available dynamic query
|
1176
1176
|
parameters for a particular data type.
|
1177
1177
|
"""
|
1178
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
1179
1178
|
return await self._get(
|
1180
1179
|
"/udl/airloadplan/queryhelp",
|
1181
1180
|
options=make_request_options(
|
1182
1181
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
1183
1182
|
),
|
1184
|
-
cast_to=
|
1183
|
+
cast_to=AirLoadPlanQueryhelpResponse,
|
1185
1184
|
)
|
1186
1185
|
|
1187
1186
|
async def tuple(
|