plexus-python-pulse-common 1.1.80__py3-none-any.whl → 1.1.81__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.
@@ -444,6 +444,11 @@ def make_tag_target_model_mixin() -> type[pdt.BaseModel]:
444
444
  default=None,
445
445
  description="Additional properties of the tag target in JSON format",
446
446
  )
447
+ flags: int = Field(
448
+ sa_column=sa.Column(sa_sqlite.INTEGER),
449
+ default=0,
450
+ description="Integer bitmask storing status or metadata flags for this tag target",
451
+ )
447
452
 
448
453
  @pdt.field_validator("identifier", mode="after")
449
454
  @classmethod
@@ -619,6 +624,7 @@ if typing.TYPE_CHECKING:
619
624
  begin_dt: sa_orm.Mapped[datetime.datetime] = ...
620
625
  end_dt: sa_orm.Mapped[datetime.datetime] = ...
621
626
  props: sa_orm.Mapped[JsonType | None] = ...
627
+ flags: sa_orm.Mapped[int] = ...
622
628
 
623
629
 
624
630
  class TagTargetTable(TagTarget, SequenceModelMixinProtocol):
@@ -769,6 +775,7 @@ class TagCache(object):
769
775
  begin_dt: datetime.datetime | None = None,
770
776
  end_dt: datetime.datetime | None = None,
771
777
  props: JsonType | None = None,
778
+ flags: int | None = None,
772
779
  ) -> Chainable[Self, TagTargetTable]:
773
780
  """
774
781
  Updates a tag target.
@@ -781,6 +788,7 @@ class TagCache(object):
781
788
  :param begin_dt: New start datetime for the tag target's validity period.
782
789
  :param end_dt: New end datetime for the tag target's validity period.
783
790
  :param props: New additional tag target properties.
791
+ :param flags: New integer bitmask for status or metadata flags.
784
792
  :return: Chainable self and the updated ``TagTargetTable`` instance.
785
793
  """
786
794
 
@@ -808,6 +816,8 @@ class TagCache(object):
808
816
  db_tag_target.vehicle_name = vehicle_name
809
817
  if props is not None:
810
818
  db_tag_target.props = props
819
+ if flags is not None:
820
+ db_tag_target.flags = flags
811
821
 
812
822
  session.commit()
813
823
 
@@ -892,7 +902,7 @@ class TagCache(object):
892
902
  .delete(synchronize_session=False)
893
903
  )
894
904
 
895
- query_stmt.delete(synchronize_session=False)
905
+ query_stmt.delete()
896
906
  session.commit()
897
907
 
898
908
  return self
@@ -1179,10 +1189,10 @@ class TagCache(object):
1179
1189
  begin_dt: datetime.datetime,
1180
1190
  end_dt: datetime.datetime,
1181
1191
  tag: str | Tag | BoundTag,
1182
- features: JsonType | None = None,
1183
- props: JsonType | None = None,
1184
1192
  tagset_namespace: str | None = None,
1185
1193
  tagset_version: str | None = None,
1194
+ features: JsonType | None = None,
1195
+ props: JsonType | None = None,
1186
1196
  ) -> Chainable[Self, TagRecordTable]:
1187
1197
  """
1188
1198
  Adds a tag record to the cache for the specified time range.
@@ -1192,14 +1202,14 @@ class TagCache(object):
1192
1202
  :param end_dt: End datetime of the tag record.
1193
1203
  :param tag: Tag name or ``Tag``/``BoundTag`` instance to add. If a ``Tag``/``BoundTag`` instance is provided,
1194
1204
  its name is used.
1195
- :param features: Optional tag record features in JSON format, used to store preprocessed data for querying
1196
- and filtering.
1197
- :param props: Optional tag record properties in JSON format.
1198
1205
  :param tagset_namespace: Namespace of the tagset that the tag belongs to. If the ``tag`` parameter is a
1199
1206
  ``BoundTag`` instance, this parameter will be ignored and the namespace from the
1200
1207
  instance will be used.
1201
1208
  :param tagset_version: Version of the tagset that the tag belongs to. If the ``tag`` parameter is a ``BoundTag``
1202
1209
  instance, this parameter will be ignored and the version from the instance will be used.
1210
+ :param features: Optional tag record features in JSON format, used to store preprocessed data for querying
1211
+ and filtering.
1212
+ :param props: Optional tag record properties in JSON format.
1203
1213
  :return: Chainable self and the added ``TagRecordTable`` instance.
1204
1214
  """
1205
1215
  if is_tag_cache_strict_mode():
@@ -1234,10 +1244,10 @@ class TagCache(object):
1234
1244
  begin_dt: datetime.datetime | None = None,
1235
1245
  end_dt: datetime.datetime | None = None,
1236
1246
  tag: str | Tag | BoundTag | None = None,
1237
- features: JsonType | None = None,
1238
- props: JsonType | None = None,
1239
1247
  tagset_namespace: str | None = None,
1240
1248
  tagset_version: str | None = None,
1249
+ features: JsonType | None = None,
1250
+ props: JsonType | None = None,
1241
1251
  flags: int | None = None,
1242
1252
  ) -> Chainable[Self, TagRecordTable]:
1243
1253
  """
@@ -1245,20 +1255,20 @@ class TagCache(object):
1245
1255
 
1246
1256
  :param target_sqn: Sequence number of the tag record's target.
1247
1257
  :param sqn: Sequence number of the tag record to update.
1248
- :param begin_dt: New start datetime of the tag record (optional).
1249
- :param end_dt: New end datetime of the tag record (optional).
1250
- :param tag: New tag name or ``Tag``/``BoundTag`` instance to use (optional). If a ``Tag``/``BoundTag`` instance
1251
- is provided, its name will be used.
1258
+ :param begin_dt: New start datetime of the tag record.
1259
+ :param end_dt: New end datetime of the tag record.
1260
+ :param tag: New tag name or ``Tag``/``BoundTag`` instance to use. If a ``Tag``/``BoundTag`` instance is
1261
+ provided, its name will be used.
1262
+ :param tagset_namespace: New namespace of the tagset that the tag belongs to. If the ``tag`` parameter is a
1263
+ ``BoundTag`` instance, this parameter will be ignored and the namespace from the
1264
+ instance will be used.
1265
+ :param tagset_version: New version of the tagset that the tag belongs to. If the ``tag`` parameter is a
1266
+ ``BoundTag`` instance, this parameter will be ignored and the version from the instance
1267
+ will be used.
1252
1268
  :param features: New optional tag record features in JSON format, used to store preprocessed data for querying
1253
1269
  and filtering.
1254
1270
  :param props: New optional tag record properties in JSON format.
1255
- :param tagset_namespace: New namespace of the tagset that the tag belongs to (optional). If the ``tag``
1256
- parameter is a ``BoundTag`` instance, this parameter will be ignored and the namespace
1257
- from the instance will be used.
1258
- :param tagset_version: New version of the tagset that the tag belongs to (optional). If the ``tag`` parameter
1259
- is a ``BoundTag`` instance, this parameter will be ignored and the version from the
1260
- instance will be used.
1261
- :param flags: New integer bitmask for status or metadata flags (optional).
1271
+ :param flags: New integer bitmask for status or metadata flags.
1262
1272
  :return: Chainable self and the updated ``TagRecordTable`` instance.
1263
1273
  """
1264
1274
  with self.make_session() as session:
@@ -1459,38 +1469,38 @@ class TargetedTagCache(object):
1459
1469
  begin_dt: datetime.datetime | None,
1460
1470
  end_dt: datetime.datetime | None,
1461
1471
  tag: str | Tag | BoundTag,
1462
- features: JsonType | None = None,
1463
- props: JsonType | None = None,
1464
1472
  tagset_namespace: str | None = None,
1465
1473
  tagset_version: str | None = None,
1474
+ features: JsonType | None = None,
1475
+ props: JsonType | None = None,
1466
1476
  ) -> Chainable[Self, TagRecordTable]:
1467
1477
  result = self.cache.target_add_record(
1468
1478
  target_sqn=self.tag_target.sqn,
1469
1479
  begin_dt=begin_dt or self.tag_target.begin_dt,
1470
1480
  end_dt=end_dt or self.tag_target.end_dt,
1471
1481
  tag=tag,
1472
- features=features,
1473
- props=props,
1474
1482
  tagset_namespace=tagset_namespace,
1475
1483
  tagset_version=tagset_version,
1484
+ features=features,
1485
+ props=props,
1476
1486
  )
1477
1487
  return result.retarget(self)
1478
1488
 
1479
1489
  def add_record(
1480
1490
  self,
1481
1491
  tag: str | Tag | BoundTag,
1482
- features: JsonType | None = None,
1483
- props: JsonType | None = None,
1484
1492
  tagset_namespace: str | None = None,
1485
1493
  tagset_version: str | None = None,
1494
+ features: JsonType | None = None,
1495
+ props: JsonType | None = None,
1486
1496
  ) -> Chainable[Self, TagRecordTable]:
1487
1497
  result = self.add_ranged_record(
1488
1498
  begin_dt=self.tag_target.begin_dt,
1489
1499
  end_dt=self.tag_target.end_dt,
1490
1500
  tag=tag,
1491
- features=features,
1492
1501
  tagset_namespace=tagset_namespace,
1493
1502
  tagset_version=tagset_version,
1503
+ features=features,
1494
1504
  props=props,
1495
1505
  )
1496
1506
  return result.retarget(self)
@@ -1502,10 +1512,10 @@ class TargetedTagCache(object):
1502
1512
  begin_dt: datetime.datetime | None = None,
1503
1513
  end_dt: datetime.datetime | None = None,
1504
1514
  tag: str | Tag | BoundTag | None = None,
1505
- features: JsonType | None = None,
1506
- props: JsonType | None = None,
1507
1515
  tagset_namespace: str | None = None,
1508
1516
  tagset_version: str | None = None,
1517
+ features: JsonType | None = None,
1518
+ props: JsonType | None = None,
1509
1519
  flags: int | None = None,
1510
1520
  ) -> Chainable[Self, TagRecordTable]:
1511
1521
  result = self.cache.target_update_record(
@@ -1514,10 +1524,10 @@ class TargetedTagCache(object):
1514
1524
  begin_dt=begin_dt,
1515
1525
  end_dt=end_dt,
1516
1526
  tag=tag,
1517
- features=features,
1518
- props=props,
1519
1527
  tagset_namespace=tagset_namespace,
1520
1528
  tagset_version=tagset_version,
1529
+ features=features,
1530
+ props=props,
1521
1531
  flags=flags,
1522
1532
  )
1523
1533
  return result.retarget(self)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plexus-python-pulse-common
3
- Version: 1.1.80
3
+ Version: 1.1.81
4
4
  Classifier: Programming Language :: Python :: 3
5
5
  Classifier: Programming Language :: Python :: 3.12
6
6
  Classifier: Programming Language :: Python :: 3.13
@@ -22,9 +22,9 @@ plexus/pulse/common/utils/pathutils.py,sha256=eYfNK48wf1xZGK2IbpKxYOn4skZhWWA8OT
22
22
  plexus/pulse/common/utils/s3utils.py,sha256=5q5wSOavt-n5EdrflQX7WPGgDeWQkGO9lG5Nq3QXjCk,35904
23
23
  plexus/pulse/common/utils/sqlutils.py,sha256=D6kTBjhO5YlNRt3uFlPt6z3uH61m9ajEzPYmsI6NoFc,231
24
24
  plexus/pulse/common/utils/strutils.py,sha256=PkmMHCcHN9vALCy_8fJTf00Dg7I2N4QTCXdBmB3t7rk,16440
25
- plexus/pulse/common/utils/tagutils.py,sha256=-3xizapJz4zj_sWkNNEkVvF9QTdgqCuyWuDz435o00w,66602
25
+ plexus/pulse/common/utils/tagutils.py,sha256=V8eUxtWSijX6nHSCuRX2dTJz3why3TCOzPVK5YXt28s,66944
26
26
  plexus/pulse/common/utils/testutils.py,sha256=hKPRvoN4mg8QGQJH121l59a0uo8jN5rntGQAVYplGBw,6166
27
- plexus_python_pulse_common-1.1.80.dist-info/METADATA,sha256=TDJDV7lFVA3p5B9z-qyaNhanWZmRlXjoJltppqXPayY,1555
28
- plexus_python_pulse_common-1.1.80.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
29
- plexus_python_pulse_common-1.1.80.dist-info/top_level.txt,sha256=ug_g7CVwaMQuas5UzAXbHUrQvKGCn8ezc6ZNvvRlJOE,7
30
- plexus_python_pulse_common-1.1.80.dist-info/RECORD,,
27
+ plexus_python_pulse_common-1.1.81.dist-info/METADATA,sha256=i2uemuWFHDqKPkBBXnolVVef6PFFzCyu5UqgQeQ6Wag,1555
28
+ plexus_python_pulse_common-1.1.81.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
29
+ plexus_python_pulse_common-1.1.81.dist-info/top_level.txt,sha256=ug_g7CVwaMQuas5UzAXbHUrQvKGCn8ezc6ZNvvRlJOE,7
30
+ plexus_python_pulse_common-1.1.81.dist-info/RECORD,,