talentro-commons 0.19.12__tar.gz → 0.19.14__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.
Files changed (44) hide show
  1. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/PKG-INFO +1 -1
  2. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/pyproject.toml +1 -1
  3. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/services/google_storage.py +19 -0
  4. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/util/string.py +2 -2
  5. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/README.md +0 -0
  6. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/__init__.py +0 -0
  7. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/acquisition/__init__.py +0 -0
  8. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/acquisition/dataclasses.py +0 -0
  9. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/acquisition/models.py +0 -0
  10. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/billing/__init__.py +0 -0
  11. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/billing/dataclasses.py +0 -0
  12. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/billing/models.py +0 -0
  13. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/candidates/__init__.py +0 -0
  14. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/candidates/dataclasses.py +0 -0
  15. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/candidates/models.py +0 -0
  16. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/constants.py +0 -0
  17. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/event.py +0 -0
  18. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/exceptions.py +0 -0
  19. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/general/__init__.py +0 -0
  20. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/general/dataclasses.py +0 -0
  21. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/general/models.py +0 -0
  22. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/iam/__init__.py +0 -0
  23. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/iam/dataclasses.py +0 -0
  24. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/iam/models.py +0 -0
  25. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/iam/types.py +0 -0
  26. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/integrations/__init__.py +0 -0
  27. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/integrations/dataclasses.py +0 -0
  28. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/integrations/models.py +0 -0
  29. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/services/__init__.py +0 -0
  30. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/services/billing.py +0 -0
  31. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/services/caching.py +0 -0
  32. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/services/clients.py +0 -0
  33. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/services/db.py +0 -0
  34. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/services/rabbitmq.py +0 -0
  35. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/util/__init__.py +0 -0
  36. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/util/attributes.py +0 -0
  37. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/util/enum.py +0 -0
  38. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/util/files.py +0 -0
  39. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/util/singleton.py +0 -0
  40. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/util/vacancy.py +0 -0
  41. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/vacancies/__init__.py +0 -0
  42. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/vacancies/dataclasses.py +0 -0
  43. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/vacancies/models.py +0 -0
  44. {talentro_commons-0.19.12 → talentro_commons-0.19.14}/src/talentro/vacancies/taxanomy.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: talentro-commons
3
- Version: 0.19.12
3
+ Version: 0.19.14
4
4
  Summary: This package contains all globally used code, services, models and data structures for Talentro
5
5
  License: Proprietary
6
6
  Author: Emiel van Essen
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "talentro-commons"
3
- version = "0.19.12"
3
+ version = "0.19.14"
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"
@@ -148,3 +148,22 @@ class GoogleStorage(metaclass=SingletonMeta):
148
148
  blob.upload_from_file(file.file)
149
149
 
150
150
  return blob
151
+
152
+ def upload_filename(self, filename: str, bucket: BucketEnum, destination: FilePathEnum,
153
+ path_definitions: dict | None = None) -> Blob:
154
+ """
155
+ Uploads a file to Google Storage
156
+
157
+ :param filename: The filename you want to upload.
158
+ :param bucket: The bucket you want to upload to.
159
+ :param destination: The file destination you want to upload to.
160
+ :param path_definitions: Key-value pair to declare the dynamic parts of the destination path.
161
+ :return: The public URL of the uploaded file.
162
+ :rtype: str
163
+ """
164
+ # Get the bucket or create it if it doesn't exist.
165
+ blob = self._get_blob(bucket, destination, path_definitions)
166
+
167
+ blob.upload_from_filename(filename)
168
+
169
+ return blob
@@ -1,11 +1,11 @@
1
1
  import string
2
2
 
3
- def render_template_path(template: str, values: dict | None) -> str:
3
+ def render_template_path(template: str, values: dict | None = None) -> str:
4
4
  formatter = string.Formatter()
5
5
 
6
6
  required_fields = [field for _, field, _, _ in formatter.parse(template) if field]
7
7
 
8
- if required_fields is None or required_fields is []:
8
+ if not required_fields:
9
9
  return template
10
10
 
11
11
  if not values: