cs-models 0.0.658__py3-none-any.whl → 0.0.659__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 cs-models might be problematic. Click here for more details.

File without changes
@@ -0,0 +1,33 @@
1
+ from sqlalchemy import (
2
+ Column,
3
+ Integer,
4
+ DateTime,
5
+ Boolean,
6
+ String,
7
+ Text,
8
+ )
9
+ from datetime import datetime
10
+
11
+ from ...database import Base
12
+
13
+
14
+ class EventsQueueModel(Base):
15
+ __tablename__ = 'events_queue'
16
+
17
+ id = Column(Integer, primary_key=True)
18
+ artifact_id = Column(String(50), nullable=False)
19
+ processed = Column(
20
+ Boolean,
21
+ nullable=True,
22
+ )
23
+ attempts = Column(Integer, nullable=True)
24
+ error = Column(Text, nullable=True)
25
+ submitted = Column(Boolean, nullable=True)
26
+ submitted_date = Column(DateTime, nullable=True)
27
+ updated_at = Column(
28
+ DateTime,
29
+ nullable=False,
30
+ # https://stackoverflow.com/questions/58776476/why-doesnt-freezegun-work-with-sqlalchemy-default-values
31
+ default=lambda: datetime.utcnow(),
32
+ onupdate=lambda: datetime.utcnow(),
33
+ )
@@ -0,0 +1,18 @@
1
+ from marshmallow import (
2
+ Schema,
3
+ fields,
4
+ validate,
5
+ )
6
+
7
+
8
+ class EventsQueueResourceSchema(Schema):
9
+ not_blank = validate.Length(min=1, error='Field cannot be blank')
10
+
11
+ id = fields.Integer(dump_only=True)
12
+ artifact_id = fields.String(required=True)
13
+ processed = fields.Boolean(allow_none=True)
14
+ attempts = fields.Integer(allow_none=True)
15
+ error = fields.String(allow_none=True)
16
+ submitted = fields.Boolean(allow_none=True)
17
+ submitted_date = fields.DateTime(allow_none=True)
18
+ updated_at = fields.DateTime(dump_only=True)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cs-models
3
- Version: 0.0.658
3
+ Version: 0.0.659
4
4
  Summary: MySQL db models
5
5
  Home-page: https://github.com/mindgram/cs-models
6
6
  Author: Shrey Verma
@@ -292,6 +292,9 @@ cs_models/resources/Event/schemas.py,sha256=63C0x7i-JUu5Q0aAZeNBd1O0_XZ7cahM3KTp
292
292
  cs_models/resources/EventLLM/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
293
293
  cs_models/resources/EventLLM/models.py,sha256=YzZnYW4cJBdDeppLPAI5LihOPD83acOaNlSeGR0LiP8,1052
294
294
  cs_models/resources/EventLLM/schemas.py,sha256=sE3b1aiCeAuhRI9uzCk_Uozw2NrNtRFwtdJxvhKCUAc,1319
295
+ cs_models/resources/EventsQueue/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
296
+ cs_models/resources/EventsQueue/models.py,sha256=frFQpfjnbEejlPvUqtOyBb-tN48UNG77uVUOdj-u63A,853
297
+ cs_models/resources/EventsQueue/schemas.py,sha256=X6EGAog4ZTBraLJ1w0FOU88KWdmRiu1rl4XjPAh-nqU,556
295
298
  cs_models/resources/ExplorerColumn/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
296
299
  cs_models/resources/ExplorerColumn/models.py,sha256=t448jSUDUNpN3MPlA1-nf2H-K9KVfMkKIV7ruB-DSks,799
297
300
  cs_models/resources/ExplorerColumn/schemas.py,sha256=0qsNjOCkilZNa_Ly083dzp43h72MrAFM39dp2s8CnmY,442
@@ -1084,7 +1087,7 @@ cs_models/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1084
1087
  cs_models/utils/alchemy.py,sha256=fhINGFn41owJ2DLXQKXAAtLqeZ1BRzD_qU0wPK_bsGQ,1598
1085
1088
  cs_models/utils/utils.py,sha256=bY623DuzycfPQiaOQT2AxfANeWfwr5w76dBuQ813-ns,3664
1086
1089
  cs_models/utils/profiling/__init__.py,sha256=N-73vb0M92C975fxgXyBCBjCPELl8Oh21ZY_-tzDnns,569
1087
- cs_models-0.0.658.dist-info/METADATA,sha256=JRL_hAO6yXpWffesqYu5IN58-HR05VuH9RebV3v6Cww,792
1088
- cs_models-0.0.658.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
1089
- cs_models-0.0.658.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
1090
- cs_models-0.0.658.dist-info/RECORD,,
1090
+ cs_models-0.0.659.dist-info/METADATA,sha256=MjgYiwWRgPUQbKD-tQNHlfZWd5TRhdGEN-iwwyTBQEo,792
1091
+ cs_models-0.0.659.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
1092
+ cs_models-0.0.659.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
1093
+ cs_models-0.0.659.dist-info/RECORD,,