cs-models 0.0.573__py3-none-any.whl → 0.0.574__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,31 @@
1
+ from datetime import datetime
2
+
3
+ from sqlalchemy import (
4
+ Column,
5
+ Integer,
6
+ DateTime,
7
+ String,
8
+ Text,
9
+ )
10
+
11
+ from ...database import Base
12
+
13
+
14
+ class BatchJobStatusModel(Base):
15
+ __tablename__ = "batch_jobs_status"
16
+
17
+ id = Column(Integer, primary_key=True)
18
+ job_id = Column(String(128), nullable=False, index=True)
19
+ job_def = Column(String(128), nullable=False, index=True)
20
+ job_queue = Column(String(125), nullable=False, index=True)
21
+ parameters = Column(Text, nullable=True)
22
+ status = Column(String(50), nullable=False)
23
+ created_at = Column(DateTime, nullable=False)
24
+ updated_at = Column(
25
+ DateTime,
26
+ nullable=False,
27
+ index=True,
28
+ # https://stackoverflow.com/questions/58776476/why-doesnt-freezegun-work-with-sqlalchemy-default-values
29
+ default=lambda: datetime.utcnow(),
30
+ onupdate=lambda: datetime.utcnow(),
31
+ )
@@ -0,0 +1,18 @@
1
+ from marshmallow import (
2
+ Schema,
3
+ fields,
4
+ validate,
5
+ )
6
+
7
+
8
+ class BatchJobStatusResourceSchema(Schema):
9
+ not_blank = validate.Length(min=1, error='Field cannot be blank')
10
+
11
+ id = fields.Integer(dump_only=True)
12
+ job_id = fields.String(required=True)
13
+ job_def = fields.String(required=True)
14
+ job_queue = fields.String(required=True)
15
+ parameters = fields.String(allow_none=True)
16
+ status = fields.String(required=True)
17
+ created_at = fields.DateTime(required=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.573
3
+ Version: 0.0.574
4
4
  Summary: MySQL db models
5
5
  Home-page: https://github.com/mindgram/cs-models
6
6
  Author: Shrey Verma
@@ -37,6 +37,9 @@ cs_models/resources/AssistantSession/schemas.py,sha256=Sc5pFt5O3ISQRR-hRYW7LcCqA
37
37
  cs_models/resources/AssistantUserQuery/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
38
  cs_models/resources/AssistantUserQuery/models.py,sha256=fCM9N65laJanb_hVzFgTMzVLV09KuqSQKa27RuHhnMU,1753
39
39
  cs_models/resources/AssistantUserQuery/schemas.py,sha256=dGAHxkNxY7v8iD0EtKi_XJrIBF67ie-r7j6wNnAewP0,716
40
+ cs_models/resources/BatchJobStatus/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
41
+ cs_models/resources/BatchJobStatus/models.py,sha256=nKXTIzOp_T0vWOgaLBMg-8gCq6MiKSktyfjG9JFxQGg,890
42
+ cs_models/resources/BatchJobStatus/schemas.py,sha256=Wqze3FXBQdHuCjPhHEa9FUGy2doq0ijpKmxuwFD9wpc,540
40
43
  cs_models/resources/Biomarker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
41
44
  cs_models/resources/Biomarker/models.py,sha256=67yyvRKi6_5pLwSH6IE9ZTemIqmpsCx7IIVDSqMwOvo,810
42
45
  cs_models/resources/Biomarker/schemas.py,sha256=saP7FJfKeUPDHEhKeJqLci9gze3WZYXWgP1M-ySMWmE,434
@@ -928,7 +931,7 @@ cs_models/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
928
931
  cs_models/utils/alchemy.py,sha256=fhINGFn41owJ2DLXQKXAAtLqeZ1BRzD_qU0wPK_bsGQ,1598
929
932
  cs_models/utils/utils.py,sha256=bY623DuzycfPQiaOQT2AxfANeWfwr5w76dBuQ813-ns,3664
930
933
  cs_models/utils/profiling/__init__.py,sha256=N-73vb0M92C975fxgXyBCBjCPELl8Oh21ZY_-tzDnns,569
931
- cs_models-0.0.573.dist-info/METADATA,sha256=tqdBotJAitkQ5DeJorHCs6Dg41cQirSGgi-3XTQTKUk,791
932
- cs_models-0.0.573.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
933
- cs_models-0.0.573.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
934
- cs_models-0.0.573.dist-info/RECORD,,
934
+ cs_models-0.0.574.dist-info/METADATA,sha256=_7qFwP8lUsWnCjJUpOhQtJ-Un6AyGuZIze2WvLSCi14,791
935
+ cs_models-0.0.574.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
936
+ cs_models-0.0.574.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
937
+ cs_models-0.0.574.dist-info/RECORD,,