zou 0.20.82__py3-none-any.whl → 0.20.84__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.
Files changed (114) hide show
  1. zou/__init__.py +1 -1
  2. zou/app/blueprints/assets/resources.py +1060 -153
  3. zou/app/blueprints/auth/resources.py +368 -238
  4. zou/app/blueprints/breakdown/resources.py +584 -94
  5. zou/app/blueprints/chats/resources.py +176 -37
  6. zou/app/blueprints/comments/resources.py +409 -150
  7. zou/app/blueprints/concepts/resources.py +443 -63
  8. zou/app/blueprints/crud/asset_instance.py +272 -0
  9. zou/app/blueprints/crud/attachment_file.py +263 -0
  10. zou/app/blueprints/crud/base.py +176 -69
  11. zou/app/blueprints/crud/budget.py +278 -0
  12. zou/app/blueprints/crud/budget_entry.py +269 -0
  13. zou/app/blueprints/crud/chat.py +282 -0
  14. zou/app/blueprints/crud/chat_message.py +286 -0
  15. zou/app/blueprints/crud/comments.py +312 -1
  16. zou/app/blueprints/crud/custom_action.py +268 -0
  17. zou/app/blueprints/crud/day_off.py +298 -0
  18. zou/app/blueprints/crud/department.py +268 -0
  19. zou/app/blueprints/crud/entity.py +297 -3
  20. zou/app/blueprints/crud/entity_link.py +303 -0
  21. zou/app/blueprints/crud/entity_type.py +269 -0
  22. zou/app/blueprints/crud/event.py +197 -0
  23. zou/app/blueprints/crud/file_status.py +268 -0
  24. zou/app/blueprints/crud/hardware_item.py +268 -0
  25. zou/app/blueprints/crud/metadata_descriptor.py +312 -0
  26. zou/app/blueprints/crud/milestone.py +302 -1
  27. zou/app/blueprints/crud/news.py +285 -0
  28. zou/app/blueprints/crud/notification.py +287 -0
  29. zou/app/blueprints/crud/organisation.py +269 -0
  30. zou/app/blueprints/crud/output_file.py +34 -10
  31. zou/app/blueprints/crud/output_type.py +30 -10
  32. zou/app/blueprints/crud/person.py +407 -2
  33. zou/app/blueprints/crud/playlist.py +322 -4
  34. zou/app/blueprints/crud/plugin.py +269 -0
  35. zou/app/blueprints/crud/preview_background_file.py +272 -0
  36. zou/app/blueprints/crud/preview_file.py +280 -9
  37. zou/app/blueprints/crud/production_schedule_version.py +569 -0
  38. zou/app/blueprints/crud/project.py +440 -0
  39. zou/app/blueprints/crud/project_status.py +268 -0
  40. zou/app/blueprints/crud/salary_scale.py +185 -5
  41. zou/app/blueprints/crud/schedule_item.py +305 -0
  42. zou/app/blueprints/crud/search_filter.py +302 -0
  43. zou/app/blueprints/crud/search_filter_group.py +270 -0
  44. zou/app/blueprints/crud/software.py +30 -10
  45. zou/app/blueprints/crud/status_automation.py +296 -2
  46. zou/app/blueprints/crud/studio.py +268 -0
  47. zou/app/blueprints/crud/subscription.py +279 -0
  48. zou/app/blueprints/crud/task.py +325 -5
  49. zou/app/blueprints/crud/task_status.py +301 -0
  50. zou/app/blueprints/crud/task_type.py +283 -0
  51. zou/app/blueprints/crud/time_spent.py +327 -0
  52. zou/app/blueprints/crud/working_file.py +273 -10
  53. zou/app/blueprints/departments/resources.py +302 -68
  54. zou/app/blueprints/edits/resources.py +651 -81
  55. zou/app/blueprints/entities/resources.py +104 -39
  56. zou/app/blueprints/events/resources.py +96 -8
  57. zou/app/blueprints/export/csv/assets.py +15 -5
  58. zou/app/blueprints/export/csv/base.py +12 -3
  59. zou/app/blueprints/export/csv/casting.py +32 -5
  60. zou/app/blueprints/export/csv/edits.py +15 -5
  61. zou/app/blueprints/export/csv/persons.py +24 -0
  62. zou/app/blueprints/export/csv/playlists.py +16 -5
  63. zou/app/blueprints/export/csv/projects.py +23 -0
  64. zou/app/blueprints/export/csv/shots.py +15 -5
  65. zou/app/blueprints/export/csv/task_types.py +23 -0
  66. zou/app/blueprints/export/csv/tasks.py +24 -0
  67. zou/app/blueprints/export/csv/time_spents.py +24 -0
  68. zou/app/blueprints/files/resources.py +928 -377
  69. zou/app/blueprints/index/resources.py +49 -42
  70. zou/app/blueprints/news/resources.py +47 -27
  71. zou/app/blueprints/persons/resources.py +644 -271
  72. zou/app/blueprints/playlists/resources.py +154 -72
  73. zou/app/blueprints/previews/resources.py +473 -228
  74. zou/app/blueprints/projects/__init__.py +5 -0
  75. zou/app/blueprints/projects/resources.py +987 -420
  76. zou/app/blueprints/search/resources.py +44 -32
  77. zou/app/blueprints/shots/resources.py +1338 -88
  78. zou/app/blueprints/source/csv/assets.py +44 -6
  79. zou/app/blueprints/source/csv/casting.py +43 -6
  80. zou/app/blueprints/source/csv/edits.py +47 -9
  81. zou/app/blueprints/source/csv/persons.py +43 -4
  82. zou/app/blueprints/source/csv/shots.py +47 -6
  83. zou/app/blueprints/source/csv/task_type_estimations.py +95 -35
  84. zou/app/blueprints/source/kitsu.py +433 -11
  85. zou/app/blueprints/source/otio.py +215 -20
  86. zou/app/blueprints/source/shotgun/assets.py +146 -0
  87. zou/app/blueprints/source/shotgun/base.py +85 -14
  88. zou/app/blueprints/source/shotgun/episode.py +124 -0
  89. zou/app/blueprints/source/shotgun/import_errors.py +105 -14
  90. zou/app/blueprints/source/shotgun/notes.py +132 -0
  91. zou/app/blueprints/source/shotgun/person.py +163 -0
  92. zou/app/blueprints/source/shotgun/project.py +120 -0
  93. zou/app/blueprints/source/shotgun/scene.py +120 -0
  94. zou/app/blueprints/source/shotgun/sequence.py +134 -0
  95. zou/app/blueprints/source/shotgun/shot.py +166 -0
  96. zou/app/blueprints/source/shotgun/status.py +129 -0
  97. zou/app/blueprints/source/shotgun/steps.py +138 -0
  98. zou/app/blueprints/source/shotgun/tasks.py +199 -0
  99. zou/app/blueprints/source/shotgun/team.py +132 -0
  100. zou/app/blueprints/source/shotgun/versions.py +155 -0
  101. zou/app/blueprints/tasks/resources.py +1197 -308
  102. zou/app/blueprints/user/resources.py +1808 -215
  103. zou/app/models/metadata_descriptor.py +1 -0
  104. zou/app/services/persons_service.py +1 -1
  105. zou/app/services/projects_service.py +45 -1
  106. zou/app/services/time_spents_service.py +1 -1
  107. zou/app/swagger.py +100 -27
  108. zou/migrations/versions/a1b2c3d4e5f6_add_position_to_metadata_descriptor.py +32 -0
  109. {zou-0.20.82.dist-info → zou-0.20.84.dist-info}/METADATA +18 -18
  110. {zou-0.20.82.dist-info → zou-0.20.84.dist-info}/RECORD +114 -113
  111. {zou-0.20.82.dist-info → zou-0.20.84.dist-info}/WHEEL +0 -0
  112. {zou-0.20.82.dist-info → zou-0.20.84.dist-info}/entry_points.txt +0 -0
  113. {zou-0.20.82.dist-info → zou-0.20.84.dist-info}/licenses/LICENSE +0 -0
  114. {zou-0.20.82.dist-info → zou-0.20.84.dist-info}/top_level.txt +0 -0
@@ -17,7 +17,7 @@ from zou.app.utils.redis import get_redis_url
17
17
  class IndexResource(Resource):
18
18
  def get(self):
19
19
  """
20
- Get API name and version.
20
+ Get API name and version
21
21
  ---
22
22
  tags:
23
23
  - Index
@@ -106,39 +106,40 @@ class BaseStatusResource(Resource):
106
106
  class StatusResource(BaseStatusResource):
107
107
  def get(self):
108
108
  """
109
- Retrieve API name, version and status.
110
- ---
111
- tags:
112
- - Index
113
- responses:
114
- '200':
115
- description: API name, version and status
116
- content:
117
- application/json:
118
- schema:
119
- type: object
120
- properties:
121
- name:
122
- type: string
123
- example: "Zou"
124
- version:
125
- type: string
126
- example: "0.20.0"
127
- database-up:
128
- type: boolean
129
- example: true
130
- key-value-store-up:
131
- type: boolean
132
- example: true
133
- event-stream-up:
134
- type: boolean
135
- example: true
136
- job-queue-up:
137
- type: boolean
138
- example: true
139
- indexer-up:
140
- type: boolean
141
- example: true
109
+ Get status of the API services
110
+ ---
111
+ description: Get status of the database, key value store, event stream, job queue, indexer
112
+ tags:
113
+ - Index
114
+ responses:
115
+ '200':
116
+ description: Status of the API services
117
+ content:
118
+ application/json:
119
+ schema:
120
+ type: object
121
+ properties:
122
+ name:
123
+ type: string
124
+ example: "Zou"
125
+ version:
126
+ type: string
127
+ example: "0.20.0"
128
+ database-up:
129
+ type: boolean
130
+ example: true
131
+ key-value-store-up:
132
+ type: boolean
133
+ example: true
134
+ event-stream-up:
135
+ type: boolean
136
+ example: true
137
+ job-queue-up:
138
+ type: boolean
139
+ example: true
140
+ indexer-up:
141
+ type: boolean
142
+ example: true
142
143
  """
143
144
  (
144
145
  api_name,
@@ -164,13 +165,14 @@ class StatusResource(BaseStatusResource):
164
165
  class StatusResourcesResource(BaseStatusResource):
165
166
  def get(self):
166
167
  """
167
- Retrieve date and CPU, memory and jobs stats.
168
+ Get resource usage stats
168
169
  ---
170
+ description: Get CPU usage for each core, memory repartition and number of jobs in the job queue.
169
171
  tags:
170
172
  - Index
171
173
  responses:
172
174
  '200':
173
- description: Date and CPU, memory and jobs stats
175
+ description: CPU, memory and jobs stats
174
176
  content:
175
177
  application/json:
176
178
  schema:
@@ -261,8 +263,9 @@ class StatusResourcesResource(BaseStatusResource):
261
263
  class TxtStatusResource(BaseStatusResource):
262
264
  def get(self):
263
265
  """
264
- Retrieve API name, version and status as txt.
266
+ Get status of the API services as text
265
267
  ---
268
+ description: Get status of the database, key value store, event stream, job queue, the indexer as a text.
266
269
  tags:
267
270
  - Index
268
271
  responses:
@@ -313,8 +316,9 @@ indexer-up: %s
313
316
  class InfluxStatusResource(BaseStatusResource):
314
317
  def get(self):
315
318
  """
316
- Retrieve status of database and time.
319
+ Get status of the API services for InfluxDB
317
320
  ---
321
+ description: Get status of the database, key value store, event stream, job queue, indexer as a JSON object.
318
322
  tags:
319
323
  - Index
320
324
  responses:
@@ -371,8 +375,9 @@ class StatsResource(Resource):
371
375
  @jwt_required()
372
376
  def get(self):
373
377
  """
374
- Retrieve main stats.
378
+ Get usage stats
375
379
  ---
380
+ description: Get the amount of projects, assets, shots, tasks, and persons.
376
381
  tags:
377
382
  - Index
378
383
  responses:
@@ -407,13 +412,14 @@ class StatsResource(Resource):
407
412
  class ConfigResource(Resource):
408
413
  def get(self):
409
414
  """
410
- Get basic configuration for the current instance.
415
+ Get the configuration of the Kitsu instance
411
416
  ---
417
+ description: The configuration includes self-hosted status, Crisp token, indexer configuration, SAML status, and dark theme status.
412
418
  tags:
413
419
  - Index
414
420
  responses:
415
421
  '200':
416
- description: Configuration object including self-hosted status, Crisp token, indexer configuration, SAML status, and dark theme status
422
+ description: Configuration object
417
423
  content:
418
424
  application/json:
419
425
  schema:
@@ -475,8 +481,9 @@ class ConfigResource(Resource):
475
481
  class TestEventsResource(Resource):
476
482
  def get(self):
477
483
  """
478
- Generate a main:test event.
484
+ Generate a test event
479
485
  ---
486
+ description: Generate a `main:test` event to test the event stream with the Python client or similar.
480
487
  tags:
481
488
  - Index
482
489
  responses:
@@ -96,8 +96,9 @@ class ProjectNewsResource(Resource, NewsMixin, ArgsMixin):
96
96
  @jwt_required()
97
97
  def get(self, project_id):
98
98
  """
99
- Retrieve all news related to a given project
99
+ Get project latest news
100
100
  ---
101
+ description: Get the 50 latest news object (activity feed) for a project
101
102
  tags:
102
103
  - News
103
104
  parameters:
@@ -108,6 +109,7 @@ class ProjectNewsResource(Resource, NewsMixin, ArgsMixin):
108
109
  type: string
109
110
  format: uuid
110
111
  example: a24a6ea4-ce75-4665-a070-57453082c25
112
+ description: Unique identifier of the project
111
113
  - in: query
112
114
  name: before
113
115
  required: false
@@ -115,6 +117,7 @@ class ProjectNewsResource(Resource, NewsMixin, ArgsMixin):
115
117
  type: string
116
118
  format: date
117
119
  example: "2022-07-12"
120
+ description: Filter news before this date
118
121
  - in: query
119
122
  name: after
120
123
  required: false
@@ -122,6 +125,7 @@ class ProjectNewsResource(Resource, NewsMixin, ArgsMixin):
122
125
  type: string
123
126
  format: date
124
127
  example: "2022-07-12"
128
+ description: Filter news after this date
125
129
  - in: query
126
130
  name: page
127
131
  required: false
@@ -129,6 +133,7 @@ class ProjectNewsResource(Resource, NewsMixin, ArgsMixin):
129
133
  type: integer
130
134
  default: 1
131
135
  example: 1
136
+ description: Page number for pagination
132
137
  - in: query
133
138
  name: limit
134
139
  required: false
@@ -136,6 +141,7 @@ class ProjectNewsResource(Resource, NewsMixin, ArgsMixin):
136
141
  type: integer
137
142
  default: 50
138
143
  example: 50
144
+ description: Number of news items per page
139
145
  - in: query
140
146
  name: person_id
141
147
  required: false
@@ -143,6 +149,7 @@ class ProjectNewsResource(Resource, NewsMixin, ArgsMixin):
143
149
  type: string
144
150
  format: uuid
145
151
  example: a24a6ea4-ce75-4665-a070-57453082c25
152
+ description: Filter news by specific team member
146
153
  - in: query
147
154
  name: task_type_id
148
155
  required: false
@@ -150,6 +157,7 @@ class ProjectNewsResource(Resource, NewsMixin, ArgsMixin):
150
157
  type: string
151
158
  format: uuid
152
159
  example: a24a6ea4-ce75-4665-a070-57453082c25
160
+ description: Filter news by task type
153
161
  - in: query
154
162
  name: task_status_id
155
163
  required: false
@@ -157,6 +165,7 @@ class ProjectNewsResource(Resource, NewsMixin, ArgsMixin):
157
165
  type: string
158
166
  format: uuid
159
167
  example: a24a6ea4-ce75-4665-a070-57453082c25
168
+ description: Filter news by task status
160
169
  - in: query
161
170
  name: episode_id
162
171
  required: false
@@ -164,6 +173,7 @@ class ProjectNewsResource(Resource, NewsMixin, ArgsMixin):
164
173
  type: string
165
174
  format: uuid
166
175
  example: a24a6ea4-ce75-4665-a070-57453082c25
176
+ description: Filter news by specific episode
167
177
  - in: query
168
178
  name: only_preview
169
179
  required: false
@@ -171,6 +181,7 @@ class ProjectNewsResource(Resource, NewsMixin, ArgsMixin):
171
181
  type: boolean
172
182
  default: false
173
183
  example: false
184
+ description: Show only news related to preview uploads
174
185
  responses:
175
186
  '200':
176
187
  description: All news related to given project
@@ -187,8 +198,10 @@ class ProjectNewsResource(Resource, NewsMixin, ArgsMixin):
187
198
  id:
188
199
  type: string
189
200
  format: uuid
201
+ description: Unique news item identifier
190
202
  title:
191
203
  type: string
204
+ description: News item title
192
205
  content:
193
206
  type: string
194
207
  created_at:
@@ -213,8 +226,10 @@ class NewsResource(Resource, NewsMixin, ArgsMixin):
213
226
  @jwt_required()
214
227
  def get(self):
215
228
  """
216
- Retrieve all news from user's open projects
229
+ Get open projects news
217
230
  ---
231
+ description: Returns the latest news and activity feed from all
232
+ projects the user has access to.
218
233
  tags:
219
234
  - News
220
235
  parameters:
@@ -225,6 +240,7 @@ class NewsResource(Resource, NewsMixin, ArgsMixin):
225
240
  type: string
226
241
  format: uuid
227
242
  example: a24a6ea4-ce75-4665-a070-57453082c25
243
+ description: Filter news by specific project
228
244
  - in: query
229
245
  name: before
230
246
  required: false
@@ -232,6 +248,7 @@ class NewsResource(Resource, NewsMixin, ArgsMixin):
232
248
  type: string
233
249
  format: date
234
250
  example: "2022-07-12"
251
+ description: Filter news before this date
235
252
  - in: query
236
253
  name: after
237
254
  required: false
@@ -239,6 +256,7 @@ class NewsResource(Resource, NewsMixin, ArgsMixin):
239
256
  type: string
240
257
  format: date
241
258
  example: "2022-07-12"
259
+ description: Filter news after this date
242
260
  - in: query
243
261
  name: page
244
262
  required: false
@@ -246,6 +264,7 @@ class NewsResource(Resource, NewsMixin, ArgsMixin):
246
264
  type: integer
247
265
  default: 1
248
266
  example: 1
267
+ description: Page number for pagination
249
268
  - in: query
250
269
  name: limit
251
270
  required: false
@@ -253,6 +272,7 @@ class NewsResource(Resource, NewsMixin, ArgsMixin):
253
272
  type: integer
254
273
  default: 50
255
274
  example: 50
275
+ description: Number of news items per page
256
276
  - in: query
257
277
  name: person_id
258
278
  required: false
@@ -260,6 +280,7 @@ class NewsResource(Resource, NewsMixin, ArgsMixin):
260
280
  type: string
261
281
  format: uuid
262
282
  example: a24a6ea4-ce75-4665-a070-57453082c25
283
+ description: Filter news by specific team member
263
284
  - in: query
264
285
  name: task_type_id
265
286
  required: false
@@ -267,6 +288,7 @@ class NewsResource(Resource, NewsMixin, ArgsMixin):
267
288
  type: string
268
289
  format: uuid
269
290
  example: a24a6ea4-ce75-4665-a070-57453082c25
291
+ description: Filter news by task type
270
292
  - in: query
271
293
  name: task_status_id
272
294
  required: false
@@ -274,6 +296,7 @@ class NewsResource(Resource, NewsMixin, ArgsMixin):
274
296
  type: string
275
297
  format: uuid
276
298
  example: a24a6ea4-ce75-4665-a070-57453082c25
299
+ description: Filter news by task status
277
300
  - in: query
278
301
  name: episode_id
279
302
  required: false
@@ -281,6 +304,7 @@ class NewsResource(Resource, NewsMixin, ArgsMixin):
281
304
  type: string
282
305
  format: uuid
283
306
  example: a24a6ea4-ce75-4665-a070-57453082c25
307
+ description: Filter news by specific episode
284
308
  - in: query
285
309
  name: only_preview
286
310
  required: false
@@ -288,9 +312,10 @@ class NewsResource(Resource, NewsMixin, ArgsMixin):
288
312
  type: boolean
289
313
  default: false
290
314
  example: false
315
+ description: Show only news related to preview uploads
291
316
  responses:
292
317
  '200':
293
- description: All news from user's open projects
318
+ description: News feed successfully retrieved
294
319
  content:
295
320
  application/json:
296
321
  schema:
@@ -300,28 +325,13 @@ class NewsResource(Resource, NewsMixin, ArgsMixin):
300
325
  type: array
301
326
  items:
302
327
  type: object
303
- properties:
304
- id:
305
- type: string
306
- format: uuid
307
- title:
308
- type: string
309
- content:
310
- type: string
311
- created_at:
312
- type: string
313
- format: date-time
314
- author_id:
315
- type: string
316
- format: uuid
317
- project_id:
318
- type: string
319
- format: uuid
328
+ description: Array of news items
320
329
  stats:
321
330
  type: object
322
- properties:
323
- total:
324
- type: integer
331
+ description: News statistics
332
+ total:
333
+ type: integer
334
+ description: Total number of news items
325
335
  """
326
336
  open_project_ids = []
327
337
  if permissions.has_admin_permissions():
@@ -336,8 +346,10 @@ class ProjectSingleNewsResource(Resource):
336
346
  @jwt_required()
337
347
  def get(self, project_id, news_id):
338
348
  """
339
- Retrieve a single given news related to a given project
349
+ Get news item
340
350
  ---
351
+ description: Retrieves detailed information about a specific news item
352
+ from a givenproject.
341
353
  tags:
342
354
  - News
343
355
  parameters:
@@ -348,6 +360,7 @@ class ProjectSingleNewsResource(Resource):
348
360
  type: string
349
361
  format: uuid
350
362
  example: a24a6ea4-ce75-4665-a070-57453082c25
363
+ description: Unique identifier of the project
351
364
  - in: path
352
365
  name: news_id
353
366
  required: true
@@ -355,9 +368,10 @@ class ProjectSingleNewsResource(Resource):
355
368
  type: string
356
369
  format: uuid
357
370
  example: a24a6ea4-ce75-4665-a070-57453082c25
371
+ description: Unique identifier of the news item
358
372
  responses:
359
373
  '200':
360
- description: Single given news related to given project
374
+ description: News item successfully retrieved
361
375
  content:
362
376
  application/json:
363
377
  schema:
@@ -366,21 +380,27 @@ class ProjectSingleNewsResource(Resource):
366
380
  id:
367
381
  type: string
368
382
  format: uuid
383
+ description: Unique news item identifier
369
384
  title:
370
385
  type: string
386
+ description: News item title
371
387
  content:
372
388
  type: string
389
+ description: News item content
373
390
  created_at:
374
391
  type: string
375
392
  format: date-time
393
+ description: Creation timestamp
376
394
  author_id:
377
395
  type: string
378
396
  format: uuid
397
+ description: Author's user ID
379
398
  project_id:
380
399
  type: string
381
400
  format: uuid
382
- '404':
383
- description: News or project not found
401
+ description: Project identifier
402
+ 404:
403
+ description: News item or project not found
384
404
  """
385
405
  projects_service.get_project(project_id)
386
406
  user_service.check_project_access(project_id)