cjapy 0.2.2.post2__tar.gz → 0.2.2.post3__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.
- {cjapy-0.2.2.post2 → cjapy-0.2.2.post3}/PKG-INFO +1 -1
- cjapy-0.2.2.post3/cjapy/__version__.py +1 -0
- {cjapy-0.2.2.post2 → cjapy-0.2.2.post3}/cjapy/cjapy.py +1 -1
- {cjapy-0.2.2.post2 → cjapy-0.2.2.post3}/cjapy.egg-info/PKG-INFO +1 -1
- {cjapy-0.2.2.post2 → cjapy-0.2.2.post3}/docs/authenticating_without_config_json.md +3 -9
- {cjapy-0.2.2.post2 → cjapy-0.2.2.post3}/docs/main.md +13 -5
- {cjapy-0.2.2.post2 → cjapy-0.2.2.post3}/docs/releases.md +2 -1
- cjapy-0.2.2.post2/cjapy/__version__.py +0 -1
- {cjapy-0.2.2.post2 → cjapy-0.2.2.post3}/LICENSE +0 -0
- {cjapy-0.2.2.post2 → cjapy-0.2.2.post3}/README.md +0 -0
- {cjapy-0.2.2.post2 → cjapy-0.2.2.post3}/cjapy/__init__.py +0 -0
- {cjapy-0.2.2.post2 → cjapy-0.2.2.post3}/cjapy/config.py +0 -0
- {cjapy-0.2.2.post2 → cjapy-0.2.2.post3}/cjapy/configs.py +0 -0
- {cjapy-0.2.2.post2 → cjapy-0.2.2.post3}/cjapy/connector.py +0 -0
- {cjapy-0.2.2.post2 → cjapy-0.2.2.post3}/cjapy/projects.py +0 -0
- {cjapy-0.2.2.post2 → cjapy-0.2.2.post3}/cjapy/requestCreator.py +0 -0
- {cjapy-0.2.2.post2 → cjapy-0.2.2.post3}/cjapy/token_provider.py +0 -0
- {cjapy-0.2.2.post2 → cjapy-0.2.2.post3}/cjapy/workspace.py +0 -0
- {cjapy-0.2.2.post2 → cjapy-0.2.2.post3}/cjapy.egg-info/SOURCES.txt +0 -0
- {cjapy-0.2.2.post2 → cjapy-0.2.2.post3}/cjapy.egg-info/dependency_links.txt +0 -0
- {cjapy-0.2.2.post2 → cjapy-0.2.2.post3}/cjapy.egg-info/requires.txt +0 -0
- {cjapy-0.2.2.post2 → cjapy-0.2.2.post3}/cjapy.egg-info/top_level.txt +0 -0
- {cjapy-0.2.2.post2 → cjapy-0.2.2.post3}/docs/cja.md +0 -0
- {cjapy-0.2.2.post2 → cjapy-0.2.2.post3}/docs/getting_started.md +0 -0
- {cjapy-0.2.2.post2 → cjapy-0.2.2.post3}/docs/logging.md +0 -0
- {cjapy-0.2.2.post2 → cjapy-0.2.2.post3}/docs/projects.md +0 -0
- {cjapy-0.2.2.post2 → cjapy-0.2.2.post3}/docs/requestCreator.md +0 -0
- {cjapy-0.2.2.post2 → cjapy-0.2.2.post3}/docs/workspace.md +0 -0
- {cjapy-0.2.2.post2 → cjapy-0.2.2.post3}/pyproject.toml +0 -0
- {cjapy-0.2.2.post2 → cjapy-0.2.2.post3}/requirements.txt +0 -0
- {cjapy-0.2.2.post2 → cjapy-0.2.2.post3}/setup.cfg +0 -0
- {cjapy-0.2.2.post2 → cjapy-0.2.2.post3}/setup.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.2-3"
|
|
@@ -245,7 +245,7 @@ class CJA:
|
|
|
245
245
|
"""
|
|
246
246
|
if calcId is None:
|
|
247
247
|
raise ValueError("Require a calculated metrics")
|
|
248
|
-
if data is None or type(data)
|
|
248
|
+
if data is None or type(data) != dict:
|
|
249
249
|
raise ValueError("Require a dictionary to create the calculated metrics")
|
|
250
250
|
if self.loggingEnabled:
|
|
251
251
|
self.logger.debug(f"updateCalculatedMetrics start, id: {calcId}")
|
|
@@ -35,31 +35,25 @@ import os
|
|
|
35
35
|
|
|
36
36
|
USER = os.getenv('API_USER')
|
|
37
37
|
PASSWORD = os.environ.get('API_PASSWORD')
|
|
38
|
+
...
|
|
38
39
|
```
|
|
39
40
|
|
|
40
41
|
## 3. using the configure method
|
|
41
42
|
|
|
42
43
|
The `cjapy` module provide a configure method that will set the correct value to be used in the module.
|
|
43
44
|
|
|
44
|
-
**Note** : Be careful there is a possibility to pass the `path_to_key` or `private_key` to the configure method.\
|
|
45
|
-
Select the correct method:
|
|
46
|
-
|
|
47
|
-
* path_to_key : the element is a path to a file containing your key.
|
|
48
|
-
* private_key : the element is the key as a string directly.
|
|
49
|
-
|
|
50
45
|
```python
|
|
51
46
|
import os
|
|
52
47
|
|
|
53
48
|
my_org_id = os.getenv('org_id')
|
|
54
49
|
my_tech_id = os.environ.get('tech_id')
|
|
55
50
|
my_secret = os.environ.get('secret')
|
|
56
|
-
my_path_to_key = os.environ.get('path_to_key')
|
|
57
51
|
my_client_id = os.environ.get('client_id')
|
|
58
|
-
|
|
52
|
+
my_scopes = os.environ.get('scopes')
|
|
59
53
|
|
|
60
54
|
import cjapy
|
|
61
55
|
|
|
62
|
-
cjapy.configure(org_id=my_org_id,tech_id=my_tech_id, secret=my_secret,
|
|
56
|
+
cjapy.configure(org_id=my_org_id,tech_id=my_tech_id, secret=my_secret,client_id=my_client_id,scopes=my_scopes)
|
|
63
57
|
|
|
64
58
|
```
|
|
65
59
|
|
|
@@ -13,14 +13,18 @@ The methods available directly from the module are the following:
|
|
|
13
13
|
### createConfigFile
|
|
14
14
|
|
|
15
15
|
This methods allows you to create JSON file that will host the different information required for your connection to Adobe IO and to retrieve the token.\
|
|
16
|
-
It
|
|
16
|
+
It has 2 possible parameters:
|
|
17
|
+
* filename : OPTIONAL : If you want to create your config file from a specific name
|
|
18
|
+
* auth_type : OPTIONAL : By default using OauthV2 (Server-to-Server) but can be changed to `jwt`. JWT will be discontinue in 2025.
|
|
19
|
+
|
|
20
|
+
It usually looks like this.
|
|
17
21
|
|
|
18
22
|
```python
|
|
19
23
|
import aanalytics2 as api2
|
|
20
24
|
api2.createConfigFile()
|
|
21
25
|
```
|
|
22
26
|
|
|
23
|
-
As you can see, it
|
|
27
|
+
As you can see, it no arguments are required and the output of the file will look like this :
|
|
24
28
|
|
|
25
29
|
```JavaScript
|
|
26
30
|
{
|
|
@@ -28,12 +32,13 @@ As you can see, it takes no argument and the output of the file will look like t
|
|
|
28
32
|
'client_id': "<clientId>",
|
|
29
33
|
'tech_id': "<something>@techacct.adobe.com",
|
|
30
34
|
'secret': "<YourSecret>",
|
|
31
|
-
'
|
|
35
|
+
'scopes': '<scopesServerToServer>',
|
|
32
36
|
}
|
|
33
37
|
```
|
|
34
38
|
|
|
35
39
|
You update the information from the Adobe IO account that you have setup.
|
|
36
40
|
|
|
41
|
+
|
|
37
42
|
### importConfigFile
|
|
38
43
|
|
|
39
44
|
As you have created your JSON config file, you will need to import it before realizing any request to the Analytics API.\
|
|
@@ -63,8 +68,11 @@ The different arguments are:
|
|
|
63
68
|
* tech_id : REQUIRED : Technical Account ID
|
|
64
69
|
* secret : REQUIRED : secret generated for your connection
|
|
65
70
|
* client_id : REQUIRED : The client_id (old api_key) provided by the JWT connection.
|
|
66
|
-
*
|
|
67
|
-
*
|
|
71
|
+
* scopes : REQUIRED : Require if using the oauth Server to Server
|
|
72
|
+
* path_to_key : REQUIRED : If you have a file containing your private key value. If using jwt.
|
|
73
|
+
* private_key : REQUIRED : If you do not use a file but pass a variable directly. If using jwt.
|
|
74
|
+
|
|
75
|
+
**Note**: JWT integration will be discontinue in 2025. Hence we do not recommend starting a new integration using the `path_to_key` and `private_key` parameters.
|
|
68
76
|
|
|
69
77
|
### CJA class
|
|
70
78
|
|
|
@@ -11,7 +11,8 @@ Patch:
|
|
|
11
11
|
* Changing Oauth V2 to V3
|
|
12
12
|
* Accepting more elements as credentials
|
|
13
13
|
* Fixing some edge cases of `findComponentUsage`
|
|
14
|
-
*
|
|
14
|
+
* Adding more parameters for `createDataView` methods
|
|
15
|
+
* Fixing `updateCalculatedMetric`
|
|
15
16
|
|
|
16
17
|
## 0.2.1
|
|
17
18
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2.2-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
|