aepp 0.4.2__tar.gz → 0.4.2.post1__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 (57) hide show
  1. {aepp-0.4.2/aepp.egg-info → aepp-0.4.2.post1}/PKG-INFO +1 -1
  2. aepp-0.4.2.post1/aepp/__version__.py +1 -0
  3. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/queryservice.py +21 -13
  4. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/synchronizer.py +8 -2
  5. {aepp-0.4.2 → aepp-0.4.2.post1/aepp.egg-info}/PKG-INFO +1 -1
  6. aepp-0.4.2/aepp/__version__.py +0 -1
  7. {aepp-0.4.2 → aepp-0.4.2.post1}/LICENSE +0 -0
  8. {aepp-0.4.2 → aepp-0.4.2.post1}/MANIFEST.in +0 -0
  9. {aepp-0.4.2 → aepp-0.4.2.post1}/README.md +0 -0
  10. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/__init__.py +0 -0
  11. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/accesscontrol.py +0 -0
  12. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/catalog.py +0 -0
  13. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/classmanager.py +0 -0
  14. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/config.py +0 -0
  15. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/configs.py +0 -0
  16. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/connector.py +0 -0
  17. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/customerprofile.py +0 -0
  18. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/dataaccess.py +0 -0
  19. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/dataprep.py +0 -0
  20. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/datasets.py +0 -0
  21. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/datatypemanager.py +0 -0
  22. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/deletion.py +0 -0
  23. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/destination.py +0 -0
  24. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/destinationinstanceservice.py +0 -0
  25. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/edge.py +0 -0
  26. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/exportDatasetToDataLandingZone.py +0 -0
  27. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/fieldgroupmanager.py +0 -0
  28. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/flowservice.py +0 -0
  29. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/hygiene.py +0 -0
  30. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/identity.py +0 -0
  31. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/ingestion.py +0 -0
  32. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/observability.py +0 -0
  33. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/policy.py +0 -0
  34. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/privacyservice.py +0 -0
  35. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/sandboxes.py +0 -0
  36. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/schema.py +0 -0
  37. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/schemamanager.py +0 -0
  38. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/segmentation.py +0 -0
  39. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/sensei.py +0 -0
  40. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/som.py +0 -0
  41. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/tags.py +0 -0
  42. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp/utils.py +0 -0
  43. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp.egg-info/SOURCES.txt +0 -0
  44. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp.egg-info/dependency_links.txt +0 -0
  45. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp.egg-info/requires.txt +0 -0
  46. {aepp-0.4.2 → aepp-0.4.2.post1}/aepp.egg-info/top_level.txt +0 -0
  47. {aepp-0.4.2 → aepp-0.4.2.post1}/setup.cfg +0 -0
  48. {aepp-0.4.2 → aepp-0.4.2.post1}/setup.py +0 -0
  49. {aepp-0.4.2 → aepp-0.4.2.post1}/tests/__init__.py +0 -0
  50. {aepp-0.4.2 → aepp-0.4.2.post1}/tests/catalog_test.py +0 -0
  51. {aepp-0.4.2 → aepp-0.4.2.post1}/tests/dataaccess_test.py +0 -0
  52. {aepp-0.4.2 → aepp-0.4.2.post1}/tests/datasets_test.py +0 -0
  53. {aepp-0.4.2 → aepp-0.4.2.post1}/tests/destinationinstanceservice_test.py +0 -0
  54. {aepp-0.4.2 → aepp-0.4.2.post1}/tests/exportDatasetToDatalandingZone_test.py +0 -0
  55. {aepp-0.4.2 → aepp-0.4.2.post1}/tests/flowservice_test.py +0 -0
  56. {aepp-0.4.2 → aepp-0.4.2.post1}/tests/schema_test.py +0 -0
  57. {aepp-0.4.2 → aepp-0.4.2.post1}/tests/som_test.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aepp
3
- Version: 0.4.2
3
+ Version: 0.4.2.post1
4
4
  Summary: Package to manage AEP API endpoint and some helper functions
5
5
  Home-page: https://github.com/adobe/aepp
6
6
  Author: Julien Piccini
@@ -0,0 +1 @@
1
+ __version__ = "0.4.2-1"
@@ -706,27 +706,35 @@ class QueryService:
706
706
  res = self.connector.deleteData(self.endpoint + path)
707
707
  return res
708
708
 
709
- def createQueryTemplate(self, queryData: dict = None) -> dict:
709
+ def createQueryTemplate(self, queryData: dict = None,name: str = None,sql: str = None,queryParameters: dict = None) -> dict:
710
710
  """
711
711
  Create a query template based on the dictionary passed.
712
712
  Arguments:
713
- queryData : REQUIED : An object that contains "sql", "queryParameter" and "name" keys.
714
- more info : https://www.adobe.io/apis/experienceplatform/home/api-reference.html#/Query-Templates/create_query_template
713
+ queryData : REQUIED : An object that contains "sql" and "name" keys.
714
+ name : OPTIONAL : Name of the template
715
+ sql : OPTIONAL : SQL query as a string.
716
+ queryParameters : OPTIONAL : in case you are using template, providing the paramter in a dictionary.
717
+ more info : https://developer.adobe.com/experience-platform-apis/references/query-service/#tag/Query-Templates
715
718
  """
716
719
  path = "/query-templates"
717
720
  if self.loggingEnabled:
718
721
  self.logger.debug(f"Starting createTemplate")
719
- if isinstance(queryData, dict):
720
- if (
721
- "sql" not in queryData.keys()
722
- or "queryParameters" not in queryData.keys()
723
- or "name" not in queryData.keys()
724
- ):
725
- raise KeyError(
726
- "Minimum key value are not respected.\nPlease see here for more info :\nhttps://www.adobe.io/apis/experienceplatform/home/api-reference.html#/Query-Templates/create_query_template "
727
- )
722
+ if queryData is not None:
723
+ if isinstance(queryData, dict):
724
+ if ("sql" not in queryData.keys() or "name" not in queryData.keys()):
725
+ raise KeyError(
726
+ "Minimum key value are not respected.\nPlease see here for more info :\nhttps://www.adobe.io/apis/experienceplatform/home/api-reference.html#/Query-Templates/create_query_template "
727
+ )
728
+ else:
729
+ raise Exception("expected a dictionary for queryData")
728
730
  else:
729
- raise Exception("expected a dictionary for queryData")
731
+ if name is None or sql is None:
732
+ raise Exception(
733
+ "Either queryData dictionary or name and sql parameters are required."
734
+ )
735
+ queryData = {"name": name, "sql": sql}
736
+ if queryParameters is not None:
737
+ queryData["queryParameters"] = queryParameters
730
738
  res = self.connector.postData(
731
739
  self.endpoint + path, headers=self.header, data=queryData
732
740
  )
@@ -1025,6 +1025,12 @@ class Synchronizer:
1025
1025
  raise Exception("the audience could not be created in the target sandbox")
1026
1026
  else: ## audience already exists in target
1027
1027
  if verbose:
1028
- print(f"audience '{audience_name}' already exists in target {target}, saving it")
1029
- self.dict_targetComponents[target]['audience'][audience_name] = [el for el in t_audiences if el['name'] == audience_name][0]
1028
+ print(f"audience '{audience_name}' already exists in target {target}, updating it")
1029
+ t_audience = [el for el in t_audiences if el['name'] == audience_name][0]
1030
+ t_audience['description'] = baseAudience.get('description','')
1031
+ t_audience['expression'] = baseAudience.get('expression',[])
1032
+ t_audience['ansibleDataModel'] = baseAudience.get('ansibleDataModel',{})
1033
+ t_audience['evaluationInfo'] = baseAudience.get('evaluationInfo',{'batch': {'enabled': True}, 'continuous': {'enabled': False},'synchronous': {'enabled': False}})
1034
+ res = targetAudiences.putAudience(t_audience['id'],t_audience)
1035
+ self.dict_targetComponents[target]['audience'][audience_name] = res
1030
1036
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aepp
3
- Version: 0.4.2
3
+ Version: 0.4.2.post1
4
4
  Summary: Package to manage AEP API endpoint and some helper functions
5
5
  Home-page: https://github.com/adobe/aepp
6
6
  Author: Julien Piccini
@@ -1 +0,0 @@
1
- __version__ = "0.4.2"
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
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
File without changes
File without changes