talentro-commons 0.19.10__tar.gz → 0.19.12__tar.gz
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.
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/PKG-INFO +1 -1
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/pyproject.toml +1 -1
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/services/google_storage.py +9 -5
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/README.md +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/__init__.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/acquisition/__init__.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/acquisition/dataclasses.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/acquisition/models.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/billing/__init__.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/billing/dataclasses.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/billing/models.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/candidates/__init__.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/candidates/dataclasses.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/candidates/models.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/constants.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/event.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/exceptions.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/general/__init__.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/general/dataclasses.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/general/models.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/iam/__init__.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/iam/dataclasses.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/iam/models.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/iam/types.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/integrations/__init__.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/integrations/dataclasses.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/integrations/models.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/services/__init__.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/services/billing.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/services/caching.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/services/clients.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/services/db.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/services/rabbitmq.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/util/__init__.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/util/attributes.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/util/enum.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/util/files.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/util/singleton.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/util/string.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/util/vacancy.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/vacancies/__init__.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/vacancies/dataclasses.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/vacancies/models.py +0 -0
- {talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/vacancies/taxanomy.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "talentro-commons"
|
|
3
|
-
version = "0.19.
|
|
3
|
+
version = "0.19.12"
|
|
4
4
|
description = "This package contains all globally used code, services, models and data structures for Talentro"
|
|
5
5
|
authors = ["Emiel van Essen <emiel@marksmen.nl>"]
|
|
6
6
|
license = "Proprietary"
|
{talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/services/google_storage.py
RENAMED
|
@@ -27,8 +27,12 @@ class BucketEnum(StrEnum):
|
|
|
27
27
|
class FilePathEnum(StrEnum):
|
|
28
28
|
IAM_ORGANIZATION_LOGO = "iam/organizations/{organization_id}/details/logo.{extension}"
|
|
29
29
|
IAM_PROFILE_PICTURE = "iam/users/{user_id}/profile/profile_picture.{extension}"
|
|
30
|
+
|
|
31
|
+
# Candidates
|
|
30
32
|
CANDIDATES_CANDIDATE_CV_FILE = "organizations/{organization_id}/cand_{candidate_id}/cv/{file_name}"
|
|
31
33
|
CANDIDATES_CANDIDATE_CV_FOLDER = "organizations/{organization_id}/cand_{candidate_id}/cv/"
|
|
34
|
+
|
|
35
|
+
# DPG
|
|
32
36
|
SYSTEM_DPG_SYNC = "dpg/last_sync.txt"
|
|
33
37
|
|
|
34
38
|
|
|
@@ -66,7 +70,7 @@ class GoogleStorage(metaclass=SingletonMeta):
|
|
|
66
70
|
|
|
67
71
|
def _get_bucket(self, bucket: BucketEnum) -> Bucket:
|
|
68
72
|
try:
|
|
69
|
-
bucket = self._client.get_bucket(bucket.value)
|
|
73
|
+
bucket = self._client.get_bucket(f"talentro-{self.env}-{bucket.value}")
|
|
70
74
|
except NotFound:
|
|
71
75
|
print(f"Bucket {bucket.value} not found, creating...")
|
|
72
76
|
bucket = self._client.create_bucket(bucket.value)
|
|
@@ -91,13 +95,13 @@ class GoogleStorage(metaclass=SingletonMeta):
|
|
|
91
95
|
blob = bucket.blob(filled_destination_path)
|
|
92
96
|
return blob
|
|
93
97
|
|
|
94
|
-
def get_blob(self, bucket: BucketEnum, destination: FilePathEnum, path_definitions: dict) -> Blob:
|
|
98
|
+
def get_blob(self, bucket: BucketEnum, destination: FilePathEnum, path_definitions: dict | None = None) -> Blob:
|
|
95
99
|
"""Deletes a blob from the bucket."""
|
|
96
100
|
blob = self._get_blob(bucket, destination, path_definitions)
|
|
97
101
|
blob.reload()
|
|
98
102
|
return blob
|
|
99
103
|
|
|
100
|
-
def delete_file(self, bucket: BucketEnum, destination: FilePathEnum, path_definitions: dict) -> bool:
|
|
104
|
+
def delete_file(self, bucket: BucketEnum, destination: FilePathEnum, path_definitions: dict | None = None) -> bool:
|
|
101
105
|
"""Deletes a blob from the bucket."""
|
|
102
106
|
try:
|
|
103
107
|
blob = self._get_blob(bucket, destination, path_definitions)
|
|
@@ -110,7 +114,7 @@ class GoogleStorage(metaclass=SingletonMeta):
|
|
|
110
114
|
traceback.print_exc()
|
|
111
115
|
return False
|
|
112
116
|
|
|
113
|
-
def delete_folder(self, bucket: BucketEnum, destination: FilePathEnum, path_definitions: dict) -> bool:
|
|
117
|
+
def delete_folder(self, bucket: BucketEnum, destination: FilePathEnum, path_definitions: dict | None = None) -> bool:
|
|
114
118
|
"""Deletes a blob from the bucket."""
|
|
115
119
|
try:
|
|
116
120
|
bucket = self._get_bucket(bucket)
|
|
@@ -127,7 +131,7 @@ class GoogleStorage(metaclass=SingletonMeta):
|
|
|
127
131
|
return False
|
|
128
132
|
|
|
129
133
|
def upload_file(self, file: UploadFile, bucket: BucketEnum, destination: FilePathEnum,
|
|
130
|
-
path_definitions: dict) -> Blob:
|
|
134
|
+
path_definitions: dict | None = None) -> Blob:
|
|
131
135
|
"""
|
|
132
136
|
Uploads a file to Google Storage
|
|
133
137
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/acquisition/dataclasses.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/candidates/dataclasses.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{talentro_commons-0.19.10 → talentro_commons-0.19.12}/src/talentro/integrations/dataclasses.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|