From 4c1419dd46879b112d089ed35cbf4bb39801f1a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Matheson=20Wergeland?= Date: Thu, 8 Jul 2021 15:48:09 +0200 Subject: [PATCH] Expose create_library_signal and create_tag (#33) --- .../api/api_client/http/signal_http_client.py | 7 ++++- .../http/time_series_http_client.py | 5 +++- exabel_data_sdk/client/api/signal_api.py | 7 +++-- exabel_data_sdk/client/api/time_series_api.py | 24 ++++++++++------- exabel_data_sdk/scripts/create_signal.py | 10 ++++++- .../exabel/api/data/v1/signal_service_pb2.py | 20 +++++++------- .../exabel/api/data/v1/signal_service_pb2.pyi | 6 ++--- .../api/data/v1/time_series_service_pb2.py | 26 +++++++++---------- .../api/data/v1/time_series_service_pb2.pyi | 8 +++--- .../data/v1/time_series_service_pb2_grpc.py | 2 +- setup.py | 2 +- 11 files changed, 70 insertions(+), 47 deletions(-) diff --git a/exabel_data_sdk/client/api/api_client/http/signal_http_client.py b/exabel_data_sdk/client/api/api_client/http/signal_http_client.py index 81997c9..6f47e32 100644 --- a/exabel_data_sdk/client/api/api_client/http/signal_http_client.py +++ b/exabel_data_sdk/client/api/api_client/http/signal_http_client.py @@ -22,7 +22,12 @@ def get_signal(self, request: GetSignalRequest) -> Signal: return self._request("GET", request.name, Signal()) def create_signal(self, request: CreateSignalRequest) -> Signal: - return self._request("POST", "signals", Signal(), request.signal) + return self._request( + "POST", + f"signals?createLibrarySignal={request.create_library_signal}", + Signal(), + request.signal, + ) def delete_signal(self, request: DeleteSignalRequest) -> None: self._request("DELETE", request.name, None) diff --git a/exabel_data_sdk/client/api/api_client/http/time_series_http_client.py b/exabel_data_sdk/client/api/api_client/http/time_series_http_client.py index 798d635..764c23f 100644 --- a/exabel_data_sdk/client/api/api_client/http/time_series_http_client.py +++ b/exabel_data_sdk/client/api/api_client/http/time_series_http_client.py @@ -27,7 +27,10 @@ def get_time_series(self, request: GetTimeSeriesRequest) -> TimeSeries: def create_time_series(self, request: CreateTimeSeriesRequest) -> TimeSeries: return self._request( - "POST", request.time_series.name, TimeSeries(), body=request.time_series + "POST", + f"{request.time_series.name}?createTag={request.create_tag}", + TimeSeries(), + body=request.time_series, ) def update_time_series(self, request: UpdateTimeSeriesRequest) -> TimeSeries: diff --git a/exabel_data_sdk/client/api/signal_api.py b/exabel_data_sdk/client/api/signal_api.py index 5852895..d5ee2ca 100644 --- a/exabel_data_sdk/client/api/signal_api.py +++ b/exabel_data_sdk/client/api/signal_api.py @@ -59,15 +59,18 @@ def get_signal(self, name: str) -> Optional[Signal]: raise return Signal.from_proto(response) - def create_signal(self, signal: Signal) -> Signal: + def create_signal(self, signal: Signal, create_library_signal: bool = False) -> Signal: """ Create one signal and returns it. Args: signal: The signal to create. + create_library_signal: Set to true to add the signal to the library when created. """ response = self.client.create_signal( - CreateSignalRequest(signal=signal.to_proto()), + CreateSignalRequest( + signal=signal.to_proto(), create_library_signal=create_library_signal + ), ) return Signal.from_proto(response) diff --git a/exabel_data_sdk/client/api/time_series_api.py b/exabel_data_sdk/client/api/time_series_api.py index afac763..9a2908c 100644 --- a/exabel_data_sdk/client/api/time_series_api.py +++ b/exabel_data_sdk/client/api/time_series_api.py @@ -110,7 +110,7 @@ def get_time_series( return self._time_series_points_to_series(time_series.points, time_series.name) - def create_time_series(self, name: str, series: pd.Series) -> None: + def create_time_series(self, name: str, series: pd.Series, create_tag: bool = False) -> None: """ Create a time series. @@ -119,19 +119,23 @@ def create_time_series(self, name: str, series: pd.Series) -> None: first version is the canonical form. The signal must be associated with the entity's type. Args: - name: The resource name of the time series, for example - "entityTypes/ns1.type/entities/ns2.entities/signals/ns3.signal". - An alternative name for the same time series is - "signals/ns3.signal/entityTypes/ns1.type/entities/ns2.entity". The namespaces - must be empty (being global) or one of the predetermined namespaces the - customer has access to. If ns2 is not empty, it must be equals to ns3, - and if ns1 is not empty, all three namespaces must be equal. - series: The time series data + name: The resource name of the time series, for example + "entityTypes/ns1.type/entities/ns2.entities/signals/ns3.signal". + An alternative name for the same time series is + "signals/ns3.signal/entityTypes/ns1.type/entities/ns2.entity". The + namespaces must be empty (being global) or one of the predetermined + namespaces the customer has access to. If ns2 is not empty, it must be + equals to ns3, and if ns1 is not empty, all three namespaces must be equal. + series: The time series data + create_tag: Set to true to create a tag for every entity type a signal has time series + for. If a tag already exists, it will be updated when time series are + created (or deleted) regardless of the value of this flag. """ time_series_points = self._series_to_time_series_points(series) self.client.create_time_series( CreateTimeSeriesRequest( - time_series=ProtoTimeSeries(name=name, points=time_series_points) + time_series=ProtoTimeSeries(name=name, points=time_series_points), + create_tag=create_tag, ), ) diff --git a/exabel_data_sdk/scripts/create_signal.py b/exabel_data_sdk/scripts/create_signal.py index a6854d6..8e67ae9 100644 --- a/exabel_data_sdk/scripts/create_signal.py +++ b/exabel_data_sdk/scripts/create_signal.py @@ -30,6 +30,13 @@ def __init__(self, argv: Sequence[str], description: str): default="", help="One or more paragraphs of text description", ) + self.parser.add_argument( + "--create-library-signal", + required=False, + type=bool, + default=False, + help="Set to true to create a library signal", + ) def run_script(self, client: ExabelClient, args: argparse.Namespace) -> None: signal = client.signal_api.create_signal( @@ -37,7 +44,8 @@ def run_script(self, client: ExabelClient, args: argparse.Namespace) -> None: name=args.name, display_name=args.display_name, description=args.description, - ) + ), + create_library_signal=args.create_library_signal, ) print("Successfully created signal:") print(signal) diff --git a/exabel_data_sdk/stubs/exabel/api/data/v1/signal_service_pb2.py b/exabel_data_sdk/stubs/exabel/api/data/v1/signal_service_pb2.py index fee607a..ddbaabb 100644 --- a/exabel_data_sdk/stubs/exabel/api/data/v1/signal_service_pb2.py +++ b/exabel_data_sdk/stubs/exabel/api/data/v1/signal_service_pb2.py @@ -26,7 +26,7 @@ syntax="proto3", serialized_options=b"\n\026com.exabel.api.data.v1B\022SignalServiceProtoP\001", create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\'exabel/api/data/v1/signal_service.proto\x12\x12\x65xabel.api.data.v1\x1a(exabel/api/data/v1/signal_messages.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto";\n\x12ListSignalsRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t"o\n\x13ListSignalsResponse\x12+\n\x07signals\x18\x01 \x03(\x0b\x32\x1a.exabel.api.data.v1.Signal\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05" \n\x10GetSignalRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"\\\n\x13\x43reateSignalRequest\x12*\n\x06signal\x18\x01 \x01(\x0b\x32\x1a.exabel.api.data.v1.Signal\x12\x19\n\x11no_library_signal\x18\x02 \x01(\x08"r\n\x13UpdateSignalRequest\x12*\n\x06signal\x18\x01 \x01(\x0b\x32\x1a.exabel.api.data.v1.Signal\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"#\n\x13\x44\x65leteSignalRequest\x12\x0c\n\x04name\x18\x01 \x01(\t2\xd5\x04\n\rSignalService\x12s\n\x0bListSignals\x12&.exabel.api.data.v1.ListSignalsRequest\x1a\'.exabel.api.data.v1.ListSignalsResponse"\x13\x82\xd3\xe4\x93\x02\r\x12\x0b/v1/signals\x12k\n\tGetSignal\x12$.exabel.api.data.v1.GetSignalRequest\x1a\x1a.exabel.api.data.v1.Signal"\x1c\x82\xd3\xe4\x93\x02\x16\x12\x14/v1/{name=signals/*}\x12p\n\x0c\x43reateSignal\x12\'.exabel.api.data.v1.CreateSignalRequest\x1a\x1a.exabel.api.data.v1.Signal"\x1b\x82\xd3\xe4\x93\x02\x15"\x0b/v1/signals:\x06signal\x12\x80\x01\n\x0cUpdateSignal\x12\'.exabel.api.data.v1.UpdateSignalRequest\x1a\x1a.exabel.api.data.v1.Signal"+\x82\xd3\xe4\x93\x02%2\x1b/v1/{signal.name=signals/*}:\x06signal\x12m\n\x0c\x44\x65leteSignal\x12\'.exabel.api.data.v1.DeleteSignalRequest\x1a\x16.google.protobuf.Empty"\x1c\x82\xd3\xe4\x93\x02\x16*\x14/v1/{name=signals/*}B.\n\x16\x63om.exabel.api.data.v1B\x12SignalServiceProtoP\x01\x62\x06proto3', + serialized_pb=b'\n\'exabel/api/data/v1/signal_service.proto\x12\x12\x65xabel.api.data.v1\x1a(exabel/api/data/v1/signal_messages.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto";\n\x12ListSignalsRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t"o\n\x13ListSignalsResponse\x12+\n\x07signals\x18\x01 \x03(\x0b\x32\x1a.exabel.api.data.v1.Signal\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05" \n\x10GetSignalRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"`\n\x13\x43reateSignalRequest\x12*\n\x06signal\x18\x01 \x01(\x0b\x32\x1a.exabel.api.data.v1.Signal\x12\x1d\n\x15\x63reate_library_signal\x18\x02 \x01(\x08"r\n\x13UpdateSignalRequest\x12*\n\x06signal\x18\x01 \x01(\x0b\x32\x1a.exabel.api.data.v1.Signal\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"#\n\x13\x44\x65leteSignalRequest\x12\x0c\n\x04name\x18\x01 \x01(\t2\xd5\x04\n\rSignalService\x12s\n\x0bListSignals\x12&.exabel.api.data.v1.ListSignalsRequest\x1a\'.exabel.api.data.v1.ListSignalsResponse"\x13\x82\xd3\xe4\x93\x02\r\x12\x0b/v1/signals\x12k\n\tGetSignal\x12$.exabel.api.data.v1.GetSignalRequest\x1a\x1a.exabel.api.data.v1.Signal"\x1c\x82\xd3\xe4\x93\x02\x16\x12\x14/v1/{name=signals/*}\x12p\n\x0c\x43reateSignal\x12\'.exabel.api.data.v1.CreateSignalRequest\x1a\x1a.exabel.api.data.v1.Signal"\x1b\x82\xd3\xe4\x93\x02\x15"\x0b/v1/signals:\x06signal\x12\x80\x01\n\x0cUpdateSignal\x12\'.exabel.api.data.v1.UpdateSignalRequest\x1a\x1a.exabel.api.data.v1.Signal"+\x82\xd3\xe4\x93\x02%2\x1b/v1/{signal.name=signals/*}:\x06signal\x12m\n\x0c\x44\x65leteSignal\x12\'.exabel.api.data.v1.DeleteSignalRequest\x1a\x16.google.protobuf.Empty"\x1c\x82\xd3\xe4\x93\x02\x16*\x14/v1/{name=signals/*}B.\n\x16\x63om.exabel.api.data.v1B\x12SignalServiceProtoP\x01\x62\x06proto3', dependencies=[ exabel_dot_api_dot_data_dot_v1_dot_signal__messages__pb2.DESCRIPTOR, google_dot_api_dot_annotations__pb2.DESCRIPTOR, @@ -244,8 +244,8 @@ create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( - name="no_library_signal", - full_name="exabel.api.data.v1.CreateSignalRequest.no_library_signal", + name="create_library_signal", + full_name="exabel.api.data.v1.CreateSignalRequest.create_library_signal", index=1, number=2, type=8, @@ -272,7 +272,7 @@ extension_ranges=[], oneofs=[], serialized_start=406, - serialized_end=498, + serialized_end=502, ) @@ -331,8 +331,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=500, - serialized_end=614, + serialized_start=504, + serialized_end=618, ) @@ -372,8 +372,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=616, - serialized_end=651, + serialized_start=620, + serialized_end=655, ) _LISTSIGNALSRESPONSE.fields_by_name[ @@ -472,8 +472,8 @@ index=0, serialized_options=None, create_key=_descriptor._internal_create_key, - serialized_start=654, - serialized_end=1251, + serialized_start=658, + serialized_end=1255, methods=[ _descriptor.MethodDescriptor( name="ListSignals", diff --git a/exabel_data_sdk/stubs/exabel/api/data/v1/signal_service_pb2.pyi b/exabel_data_sdk/stubs/exabel/api/data/v1/signal_service_pb2.pyi index 1ecd2d8..ff83048 100644 --- a/exabel_data_sdk/stubs/exabel/api/data/v1/signal_service_pb2.pyi +++ b/exabel_data_sdk/stubs/exabel/api/data/v1/signal_service_pb2.pyi @@ -106,14 +106,14 @@ type___GetSignalRequest = GetSignalRequest class CreateSignalRequest(google___protobuf___message___Message): DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... - no_library_signal: builtin___bool = ... + create_library_signal: builtin___bool = ... @property def signal(self) -> exabel___api___data___v1___signal_messages_pb2___Signal: ... def __init__( self, *, signal: typing___Optional[exabel___api___data___v1___signal_messages_pb2___Signal] = None, - no_library_signal: typing___Optional[builtin___bool] = None, + create_library_signal: typing___Optional[builtin___bool] = None, ) -> None: ... def HasField( self, field_name: typing_extensions___Literal["signal", b"signal"] @@ -121,7 +121,7 @@ class CreateSignalRequest(google___protobuf___message___Message): def ClearField( self, field_name: typing_extensions___Literal[ - "no_library_signal", b"no_library_signal", "signal", b"signal" + "create_library_signal", b"create_library_signal", "signal", b"signal" ], ) -> None: ... diff --git a/exabel_data_sdk/stubs/exabel/api/data/v1/time_series_service_pb2.py b/exabel_data_sdk/stubs/exabel/api/data/v1/time_series_service_pb2.py index f5d0329..2fc9bfe 100644 --- a/exabel_data_sdk/stubs/exabel/api/data/v1/time_series_service_pb2.py +++ b/exabel_data_sdk/stubs/exabel/api/data/v1/time_series_service_pb2.py @@ -28,7 +28,7 @@ syntax="proto3", serialized_options=b"\n\026com.exabel.api.data.v1B\026TimeSeriesServiceProtoP\001", create_key=_descriptor._internal_create_key, - serialized_pb=b'\n,exabel/api/data/v1/time_series_service.proto\x12\x12\x65xabel.api.data.v1\x1a-exabel/api/data/v1/time_series_messages.proto\x1a exabel/api/time/time_range.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto"N\n\x15ListTimeSeriesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"z\n\x16ListTimeSeriesResponse\x12\x33\n\x0btime_series\x18\x01 \x03(\x0b\x32\x1e.exabel.api.data.v1.TimeSeries\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05"V\n\x14GetTimeSeriesRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x30\n\x04view\x18\x02 \x01(\x0b\x32".exabel.api.data.v1.TimeSeriesView"\xd2\x01\n\x17\x43reateTimeSeriesRequest\x12\x33\n\x0btime_series\x18\x01 \x01(\x0b\x32\x1e.exabel.api.data.v1.TimeSeries\x12\x30\n\x04view\x18\x02 \x01(\x0b\x32".exabel.api.data.v1.TimeSeriesView\x12@\n\x12\x64\x65\x66\x61ult_known_time\x18\x03 \x01(\x0b\x32$.exabel.api.data.v1.DefaultKnownTime\x12\x0e\n\x06no_tag\x18\x04 \x01(\x08"\xc2\x01\n\x17UpdateTimeSeriesRequest\x12\x33\n\x0btime_series\x18\x01 \x01(\x0b\x32\x1e.exabel.api.data.v1.TimeSeries\x12\x30\n\x04view\x18\x02 \x01(\x0b\x32".exabel.api.data.v1.TimeSeriesView\x12@\n\x12\x64\x65\x66\x61ult_known_time\x18\x03 \x01(\x0b\x32$.exabel.api.data.v1.DefaultKnownTime"\'\n\x17\x44\x65leteTimeSeriesRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"c\n"BatchDeleteTimeSeriesPointsRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x0btime_ranges\x18\x02 \x03(\x0b\x32\x1a.exabel.api.time.TimeRange2\xec\x0b\n\x11TimeSeriesService\x12\xc6\x01\n\x0eListTimeSeries\x12).exabel.api.data.v1.ListTimeSeriesRequest\x1a*.exabel.api.data.v1.ListTimeSeriesResponse"]\x82\xd3\xe4\x93\x02W\x12\x30/v1/{parent=entityTypes/*/entities/*}/timeSeriesZ#\x12!/v1/{parent=signals/*}/timeSeries\x12\xc9\x02\n\rGetTimeSeries\x12(.exabel.api.data.v1.GetTimeSeriesRequest\x1a\x1e.exabel.api.data.v1.TimeSeries"\xed\x01\x82\xd3\xe4\x93\x02\xe6\x01\x12?/v1/{name=entityTypes/*/entities/*/signals/*}/{view.known_time}ZA\x12?/v1/{name=signals/*/entityTypes/*/entities/*}/{view.known_time}Z/\x12-/v1/{name=entityTypes/*/entities/*/signals/*}Z/\x12-/v1/{name=signals/*/entityTypes/*/entities/*}\x12\xfb\x01\n\x10\x43reateTimeSeries\x12+.exabel.api.data.v1.CreateTimeSeriesRequest\x1a\x1e.exabel.api.data.v1.TimeSeries"\x99\x01\x82\xd3\xe4\x93\x02\x92\x01"9/v1/{time_series.name=entityTypes/*/entities/*/signals/*}:\x0btime_seriesZH"9/v1/{time_series.name=signals/*/entityTypes/*/entities/*}:\x0btime_series\x12\xfb\x01\n\x10UpdateTimeSeries\x12+.exabel.api.data.v1.UpdateTimeSeriesRequest\x1a\x1e.exabel.api.data.v1.TimeSeries"\x99\x01\x82\xd3\xe4\x93\x02\x92\x01\x32\x39/v1/{time_series.name=entityTypes/*/entities/*/signals/*}:\x0btime_seriesZH"9/v1/{time_series.name=signals/*/entityTypes/*/entities/*}:\x0btime_series\x12\xbf\x01\n\x10\x44\x65leteTimeSeries\x12+.exabel.api.data.v1.DeleteTimeSeriesRequest\x1a\x16.google.protobuf.Empty"f\x82\xd3\xe4\x93\x02`*-/v1/{name=entityTypes/*/entities/*/signals/*}Z/*-/v1/{name=signals/*/entityTypes/*/entities/*}\x12\x83\x02\n\x1b\x42\x61tchDeleteTimeSeriesPoints\x12\x36.exabel.api.data.v1.BatchDeleteTimeSeriesPointsRequest\x1a\x16.google.protobuf.Empty"\x93\x01\x82\xd3\xe4\x93\x02\x8c\x01"@/v1/{name=entityTypes/*/entities/*/signals/*}/points:batchDelete:\x01*ZE"@/v1/{name=signals/*/entityTypes/*/entities/*}/points:batchDelete:\x01*B2\n\x16\x63om.exabel.api.data.v1B\x16TimeSeriesServiceProtoP\x01\x62\x06proto3', + serialized_pb=b'\n,exabel/api/data/v1/time_series_service.proto\x12\x12\x65xabel.api.data.v1\x1a-exabel/api/data/v1/time_series_messages.proto\x1a exabel/api/time/time_range.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto"N\n\x15ListTimeSeriesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"z\n\x16ListTimeSeriesResponse\x12\x33\n\x0btime_series\x18\x01 \x03(\x0b\x32\x1e.exabel.api.data.v1.TimeSeries\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05"V\n\x14GetTimeSeriesRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x30\n\x04view\x18\x02 \x01(\x0b\x32".exabel.api.data.v1.TimeSeriesView"\xd6\x01\n\x17\x43reateTimeSeriesRequest\x12\x33\n\x0btime_series\x18\x01 \x01(\x0b\x32\x1e.exabel.api.data.v1.TimeSeries\x12\x30\n\x04view\x18\x02 \x01(\x0b\x32".exabel.api.data.v1.TimeSeriesView\x12@\n\x12\x64\x65\x66\x61ult_known_time\x18\x03 \x01(\x0b\x32$.exabel.api.data.v1.DefaultKnownTime\x12\x12\n\ncreate_tag\x18\x04 \x01(\x08"\xc2\x01\n\x17UpdateTimeSeriesRequest\x12\x33\n\x0btime_series\x18\x01 \x01(\x0b\x32\x1e.exabel.api.data.v1.TimeSeries\x12\x30\n\x04view\x18\x02 \x01(\x0b\x32".exabel.api.data.v1.TimeSeriesView\x12@\n\x12\x64\x65\x66\x61ult_known_time\x18\x03 \x01(\x0b\x32$.exabel.api.data.v1.DefaultKnownTime"\'\n\x17\x44\x65leteTimeSeriesRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"c\n"BatchDeleteTimeSeriesPointsRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x0btime_ranges\x18\x02 \x03(\x0b\x32\x1a.exabel.api.time.TimeRange2\xe4\n\n\x11TimeSeriesService\x12\xc6\x01\n\x0eListTimeSeries\x12).exabel.api.data.v1.ListTimeSeriesRequest\x1a*.exabel.api.data.v1.ListTimeSeriesResponse"]\x82\xd3\xe4\x93\x02W\x12\x30/v1/{parent=entityTypes/*/entities/*}/timeSeriesZ#\x12!/v1/{parent=signals/*}/timeSeries\x12\xc1\x01\n\rGetTimeSeries\x12(.exabel.api.data.v1.GetTimeSeriesRequest\x1a\x1e.exabel.api.data.v1.TimeSeries"f\x82\xd3\xe4\x93\x02`\x12-/v1/{name=entityTypes/*/entities/*/signals/*}Z/\x12-/v1/{name=signals/*/entityTypes/*/entities/*}\x12\xfb\x01\n\x10\x43reateTimeSeries\x12+.exabel.api.data.v1.CreateTimeSeriesRequest\x1a\x1e.exabel.api.data.v1.TimeSeries"\x99\x01\x82\xd3\xe4\x93\x02\x92\x01"9/v1/{time_series.name=entityTypes/*/entities/*/signals/*}:\x0btime_seriesZH"9/v1/{time_series.name=signals/*/entityTypes/*/entities/*}:\x0btime_series\x12\xfb\x01\n\x10UpdateTimeSeries\x12+.exabel.api.data.v1.UpdateTimeSeriesRequest\x1a\x1e.exabel.api.data.v1.TimeSeries"\x99\x01\x82\xd3\xe4\x93\x02\x92\x01\x32\x39/v1/{time_series.name=entityTypes/*/entities/*/signals/*}:\x0btime_seriesZH"9/v1/{time_series.name=signals/*/entityTypes/*/entities/*}:\x0btime_series\x12\xbf\x01\n\x10\x44\x65leteTimeSeries\x12+.exabel.api.data.v1.DeleteTimeSeriesRequest\x1a\x16.google.protobuf.Empty"f\x82\xd3\xe4\x93\x02`*-/v1/{name=entityTypes/*/entities/*/signals/*}Z/*-/v1/{name=signals/*/entityTypes/*/entities/*}\x12\x83\x02\n\x1b\x42\x61tchDeleteTimeSeriesPoints\x12\x36.exabel.api.data.v1.BatchDeleteTimeSeriesPointsRequest\x1a\x16.google.protobuf.Empty"\x93\x01\x82\xd3\xe4\x93\x02\x8c\x01"@/v1/{name=entityTypes/*/entities/*/signals/*}/points:batchDelete:\x01*ZE"@/v1/{name=signals/*/entityTypes/*/entities/*}/points:batchDelete:\x01*B2\n\x16\x63om.exabel.api.data.v1B\x16TimeSeriesServiceProtoP\x01\x62\x06proto3', dependencies=[ exabel_dot_api_dot_data_dot_v1_dot_time__series__messages__pb2.DESCRIPTOR, exabel_dot_api_dot_time_dot_time__range__pb2.DESCRIPTOR, @@ -322,8 +322,8 @@ create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( - name="no_tag", - full_name="exabel.api.data.v1.CreateTimeSeriesRequest.no_tag", + name="create_tag", + full_name="exabel.api.data.v1.CreateTimeSeriesRequest.create_tag", index=3, number=4, type=8, @@ -350,7 +350,7 @@ extension_ranges=[], oneofs=[], serialized_start=501, - serialized_end=711, + serialized_end=715, ) @@ -428,8 +428,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=714, - serialized_end=908, + serialized_start=718, + serialized_end=912, ) @@ -469,8 +469,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=910, - serialized_end=949, + serialized_start=914, + serialized_end=953, ) @@ -529,8 +529,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=951, - serialized_end=1050, + serialized_start=955, + serialized_end=1054, ) _LISTTIMESERIESRESPONSE.fields_by_name[ @@ -658,8 +658,8 @@ index=0, serialized_options=None, create_key=_descriptor._internal_create_key, - serialized_start=1053, - serialized_end=2569, + serialized_start=1057, + serialized_end=2437, methods=[ _descriptor.MethodDescriptor( name="ListTimeSeries", @@ -678,7 +678,7 @@ containing_service=None, input_type=_GETTIMESERIESREQUEST, output_type=exabel_dot_api_dot_data_dot_v1_dot_time__series__messages__pb2._TIMESERIES, - serialized_options=b"\202\323\344\223\002\346\001\022?/v1/{name=entityTypes/*/entities/*/signals/*}/{view.known_time}ZA\022?/v1/{name=signals/*/entityTypes/*/entities/*}/{view.known_time}Z/\022-/v1/{name=entityTypes/*/entities/*/signals/*}Z/\022-/v1/{name=signals/*/entityTypes/*/entities/*}", + serialized_options=b"\202\323\344\223\002`\022-/v1/{name=entityTypes/*/entities/*/signals/*}Z/\022-/v1/{name=signals/*/entityTypes/*/entities/*}", create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( diff --git a/exabel_data_sdk/stubs/exabel/api/data/v1/time_series_service_pb2.pyi b/exabel_data_sdk/stubs/exabel/api/data/v1/time_series_service_pb2.pyi index 2400f2d..b0ecad0 100644 --- a/exabel_data_sdk/stubs/exabel/api/data/v1/time_series_service_pb2.pyi +++ b/exabel_data_sdk/stubs/exabel/api/data/v1/time_series_service_pb2.pyi @@ -120,7 +120,7 @@ type___GetTimeSeriesRequest = GetTimeSeriesRequest class CreateTimeSeriesRequest(google___protobuf___message___Message): DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... - no_tag: builtin___bool = ... + create_tag: builtin___bool = ... @property def time_series(self) -> exabel___api___data___v1___time_series_messages_pb2___TimeSeries: ... @property @@ -141,7 +141,7 @@ class CreateTimeSeriesRequest(google___protobuf___message___Message): default_known_time: typing___Optional[ exabel___api___data___v1___time_series_messages_pb2___DefaultKnownTime ] = None, - no_tag: typing___Optional[builtin___bool] = None, + create_tag: typing___Optional[builtin___bool] = None, ) -> None: ... def HasField( self, @@ -157,10 +157,10 @@ class CreateTimeSeriesRequest(google___protobuf___message___Message): def ClearField( self, field_name: typing_extensions___Literal[ + "create_tag", + b"create_tag", "default_known_time", b"default_known_time", - "no_tag", - b"no_tag", "time_series", b"time_series", "view", diff --git a/exabel_data_sdk/stubs/exabel/api/data/v1/time_series_service_pb2_grpc.py b/exabel_data_sdk/stubs/exabel/api/data/v1/time_series_service_pb2_grpc.py index 6919a7c..a0d3d61 100644 --- a/exabel_data_sdk/stubs/exabel/api/data/v1/time_series_service_pb2_grpc.py +++ b/exabel_data_sdk/stubs/exabel/api/data/v1/time_series_service_pb2_grpc.py @@ -56,7 +56,7 @@ class TimeSeriesServiceServicer(object): """Manages time series in the Data API.""" def ListTimeSeries(self, request, context): - """Lists all time series for one entity. Only the names are returned.""" + """Lists all time series for one entity or for one signal. Only the names are returned.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") diff --git a/setup.py b/setup.py index 340f91c..ed0c87b 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="exabel-data-sdk", - version="0.0.15", + version="0.0.16", author="Exabel", author_email="support@exabel.com", description="Python SDK for the Exabel Data API",