artemis-model 0.1.153__py3-none-any.whl → 0.1.155__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.

Potentially problematic release.


This version of artemis-model might be problematic. Click here for more details.

artemis_model/__init__.py CHANGED
@@ -8,6 +8,7 @@ from artemis_model.location import * # noqa
8
8
  from artemis_model.location_genre_exclusion import * # noqa
9
9
  from artemis_model.message import * # noqa
10
10
  from artemis_model.organization import * # noqa
11
+ from artemis_model.organization_include_pal_setting import * # noqa
11
12
  from artemis_model.playlist import * # noqa
12
13
  from artemis_model.schedule import * # noqa
13
14
  from artemis_model.setting import * # noqa
@@ -37,6 +37,10 @@ class OrganizationMixin(TimeStampMixin):
37
37
  @declared_attr
38
38
  def message_groups(cls) -> Mapped[List["MessageGroup"]]:
39
39
  return relationship(back_populates="organization")
40
+
41
+ @declared_attr
42
+ def include_pal_setting(cls) -> Mapped["OrganizationIncludePalSetting"]:
43
+ return relationship(back_populates="organization", uselist=False, cascade="all, delete-orphan")
40
44
 
41
45
 
42
46
  def generate_slug(target: Any, value: Any, old_value: Any, initiator: Any) -> None:
@@ -0,0 +1,34 @@
1
+ import uuid
2
+ from sqlalchemy import ForeignKey, UniqueConstraint
3
+ from sqlalchemy.orm import Mapped, mapped_column, relationship
4
+ from sqlalchemy.ext.declarative import declared_attr
5
+
6
+ from artemis_model.base import TimeStampMixin, CustomSyncBase, CustomBase
7
+
8
+
9
+ class OrganizationIncludePalSettingMixin(TimeStampMixin):
10
+ """Organization-level setting for including parental advisory (explicit) content."""
11
+
12
+ id: Mapped[int] = mapped_column(primary_key=True, autoincrement=True)
13
+ organization_id: Mapped[uuid.UUID] = mapped_column(
14
+ ForeignKey("organization.id", ondelete="CASCADE"), nullable=False, index=True
15
+ )
16
+ include_pal: Mapped[bool] = mapped_column(
17
+ nullable=False, default=False
18
+ )
19
+
20
+ @declared_attr
21
+ def organization(cls) -> Mapped["Organization"]:
22
+ return relationship(back_populates="include_pal_setting")
23
+
24
+ __table_args__ = (
25
+ UniqueConstraint("organization_id", name="unique_organization_include_pal_setting"),
26
+ )
27
+
28
+
29
+ class OrganizationIncludePalSettingSync(CustomSyncBase, OrganizationIncludePalSettingMixin):
30
+ pass
31
+
32
+
33
+ class OrganizationIncludePalSetting(CustomBase, OrganizationIncludePalSettingMixin):
34
+ pass
@@ -56,8 +56,7 @@ class ScheduleDetails(BaseModel):
56
56
  class PushedPlaylistDetails(BaseModel):
57
57
  """Player details schema."""
58
58
 
59
- bucket_ts: BucketTS | None = Field(
60
- default_factory=dict,
59
+ bucket_key: str | None = Field(
61
60
  description="""Pushed playlists does exist in Redis with a timestamp.
62
61
  Example: zone_{zone_id}_pp_bucket_{ts}
63
62
  """,
artemis_model/setting.py CHANGED
@@ -25,7 +25,7 @@ class SettingMixin(TimeStampMixin):
25
25
  "<track_id>": "<track_name>",
26
26
  ...
27
27
  },
28
- "exclude_pal": True/False
28
+ "include_pal": True/False
29
29
  }
30
30
  """
31
31
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: artemis-model
3
- Version: 0.1.153
3
+ Version: 0.1.155
4
4
  Summary:
5
5
  Author: Jukeboxy
6
6
  Requires-Python: >=3.10.6,<4.0.0
@@ -1,4 +1,4 @@
1
- artemis_model/__init__.py,sha256=Ejibc6nk_vwWCPqRZirhof2Y2t-zeaYvOWyXJLUZsTg,853
1
+ artemis_model/__init__.py,sha256=k2vjBKwr-B0GU51teQMyNwVaXxqW9lJT3GoyU_yI2ZM,922
2
2
  artemis_model/album.py,sha256=9uw9HVNHVBjl-0Dgv-o5MHXhUPwedvbnbzzY3A1cKQg,2077
3
3
  artemis_model/artist.py,sha256=vjXlFN2mOEidAzUzxmsAP5GnVTvJUuhFdhQaH214lgw,1563
4
4
  artemis_model/auth.py,sha256=0Yg_6N1nj4U31F86u1PE0leIa3D64QlYrsDlavulN6s,4033
@@ -10,7 +10,8 @@ artemis_model/genre.py,sha256=8_-IuJS543wIhUVCES3bdrDpKPKx-plDuBKGBcoMIbc,1570
10
10
  artemis_model/location.py,sha256=6Z99OCxhB3VQ4CqNwZP3ShnJ-gOnc5rxGnCn5aCIFZ8,4896
11
11
  artemis_model/location_genre_exclusion.py,sha256=SMX4TXmpwn28tytUq7-qP9ZyJ_ULs5SUv4h7sU0dRFo,1252
12
12
  artemis_model/message.py,sha256=W4vhllsD4Nn11JIKeXlgsKC2NWCt3UMkWh-Sma71gBI,3325
13
- artemis_model/organization.py,sha256=yjGHJLTOtb9PUfxSPal782Rceb8xb8vftXX67tHRNqc,2351
13
+ artemis_model/organization.py,sha256=_UON9x6iDsU6bW_GWbtQaRnetFx1Bel4ZqXTiugjL2s,2556
14
+ artemis_model/organization_include_pal_setting.py,sha256=OhNRn4aH96IquJcJBsubvZEgIY3ENqPr4Rda4GWEZ1g,1179
14
15
  artemis_model/otp.py,sha256=guIRGtyFlHUBthCAEsTh5_Hs-1yiGN_qfEO4uHNcv4s,1017
15
16
  artemis_model/permission.py,sha256=Bn1Bg1aCS4Z4_3tqEqvtrzqAYDCImsvmGyIEMoVycEk,1452
16
17
  artemis_model/playlist.py,sha256=O60zlP1LrDkzNrrfNA7TD_kotd5A9i8PuFhwonXFhN0,6559
@@ -19,15 +20,15 @@ artemis_model/redis/bucket.py,sha256=DlmIf6GxfKq9CzcXmMx5IcviaqOTvuWwIb6lAVcZQGs
19
20
  artemis_model/redis/device.py,sha256=ZUiIyVmtWiEwayFIg9mktiFaVuHQ7Fg0rvSjjWyryCI,484
20
21
  artemis_model/redis/keys.py,sha256=IdYexbBfBJR9AGtKB5SXFl1fxVY16yYmUXE-feYYT84,634
21
22
  artemis_model/redis/play_history.py,sha256=Jm0guS0UZDxfCXeWJ8vqcjjl93W_EeC7XcBXcclKPiE,1259
22
- artemis_model/redis/zone_state.py,sha256=2ITvK40NcI1gEXu7ImnT05HeqU2-ep2gFoD-oH_kLow,3186
23
+ artemis_model/redis/zone_state.py,sha256=A5z2ss1-zq6_UHavs6mBgxsllXLz5hYbKCNRAjD-ONw,3152
23
24
  artemis_model/schedule.py,sha256=CkLHWz-BwvUY2EQCfoU4SymgCariPzoQdtRLITqBPmk,2451
24
- artemis_model/setting.py,sha256=EWzOmE31mLNWwmV_wmqttHPMycvQZW7SJUIozF2b8bo,1190
25
+ artemis_model/setting.py,sha256=xe5SHDziY8RzFxzB1GzousxI1FXYhyXZ5proEseS60g,1190
25
26
  artemis_model/sqs/__init__.py,sha256=nHpXQns64qQ5Cqjyo6w9fDGO_wWhprqn1bhKf3eWnio,17
26
27
  artemis_model/sqs/messages.py,sha256=2TVlSQJzF2phblQGrlUWdQ8Uw-kJstnGtcbY06MIBWM,2852
27
28
  artemis_model/track.py,sha256=QwUF0QKVn1I64648B-NI75-IzGQvnLt9B0emD4GnS6E,3757
28
29
  artemis_model/user.py,sha256=eqIdCiBJRNLjCwPPCn-gQ6si0O5JUBGfp9oWJL5zVW4,2131
29
30
  artemis_model/zone.py,sha256=iGRUtzUwKh9LHT3MOfzzg1DnkPBts_ZBzZVTi2EmIgs,2282
30
31
  artemis_model/zone_activity.py,sha256=BY4iODavY9ceJ5oRChdjjxf26S3U30Yb7Pxm5YRFpCo,1590
31
- artemis_model-0.1.153.dist-info/METADATA,sha256=ygR73EgZmfls8BU6Wjqi6s2o16dx6Tvyj5_6R2dK-YY,3445
32
- artemis_model-0.1.153.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
33
- artemis_model-0.1.153.dist-info/RECORD,,
32
+ artemis_model-0.1.155.dist-info/METADATA,sha256=bUx84sqbBt3FrgbIUqu2mmX4AhVY0S6ky1oKMc6-oxQ,3445
33
+ artemis_model-0.1.155.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
34
+ artemis_model-0.1.155.dist-info/RECORD,,