inpython-package 1.0.1__tar.gz → 1.0.3__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: inpython-package
3
- Version: 1.0.1
3
+ Version: 1.0.3
4
4
  Summary: # Infodata's IN-Tools U2Python Package
5
5
  Home-page: https://bitbucket.org/infodata-dev/inpython
6
6
  Author: infodata
@@ -12,13 +12,10 @@ License-File: LICENSE.txt
12
12
 
13
13
  # README #
14
14
 
15
- ce projet 'inpython' rassemble tous les packages et modules python exploités par Integrix .
16
-
17
- ### What is this repository for? ###
18
-
19
- * Define python packages
20
- * 1.0.0
15
+ ce projet 'inpython-package' rassemble tous les packages et modules python exploités par Integrix .
21
16
 
17
+ # inpython.ingarph
18
+ package pour la gestion avec MS-Graph.
22
19
 
23
20
  ### How do I get set up? ###
24
21
 
@@ -33,7 +30,6 @@ exit()
33
30
  ```
34
31
 
35
32
  ### Install inPackages into U2python
36
-
37
- `pip install /path/to/mypypackage/`
33
+ `pip install inpython-package`
38
34
 
39
35
 
@@ -1,12 +1,9 @@
1
1
  # README #
2
2
 
3
- ce projet 'inpython' rassemble tous les packages et modules python exploités par Integrix .
4
-
5
- ### What is this repository for? ###
6
-
7
- * Define python packages
8
- * 1.0.0
3
+ ce projet 'inpython-package' rassemble tous les packages et modules python exploités par Integrix .
9
4
 
5
+ # inpython.ingarph
6
+ package pour la gestion avec MS-Graph.
10
7
 
11
8
  ### How do I get set up? ###
12
9
 
@@ -21,7 +18,6 @@ exit()
21
18
  ```
22
19
 
23
20
  ### Install inPackages into U2python
24
-
25
- `pip install /path/to/mypypackage/`
21
+ `pip install inpython-package`
26
22
 
27
23
 
@@ -7,6 +7,7 @@ def helloWorld():
7
7
  print("hellp from inpython")
8
8
 
9
9
 
10
+
10
11
  def getGraphTokenFromCertificate(path):
11
12
  # fonctions pour générer un token Graph avec un certificat
12
13
  # retourne un objet string json
@@ -23,13 +24,16 @@ def getGraphTokenFromCertificate(path):
23
24
  # "thumbprint": "9615472D8...",
24
25
  # "private_key_file": "...//9615472D8...//9615472D8....privatekey"
25
26
  # }
26
-
27
+
27
28
  try:
28
- config = json.load(path)
29
+ f = open(path)
30
+ config = json.load(f)
29
31
  except: # catch *all* exceptions
30
- result = {"errorCode":"1",
31
- "errorFrom":"json.load({0})".format(path),
32
- "error":sys.exc_info()[0]}
32
+ result = {"errorCode" : "1",
33
+ "errorFrom" : "json.load({0})".format(path),
34
+ "error" : "{0}".format(sys.exc_info()[0])
35
+ }
36
+ print(result)
33
37
  return json.dumps(result)
34
38
 
35
39
  # try to connect
@@ -41,19 +45,21 @@ def getGraphTokenFromCertificate(path):
41
45
  "private_key": open(config['private_key_file']).read()},
42
46
  )
43
47
  except:
44
- result = {"errorCode":"2",
45
- "errorFrom":"msal.ConfidentialClientApplication(authority={authority}, client_credentials=thumbprint={thumbprint}, privatekey={privatekey})".format(authority=config["authority"], thumbprint=config["thumbprint"], privatekey=config['private_key_file']),
46
- "error":sys.exc_info()[0] }
48
+ result = {"errorCode" : "2",
49
+ "errorFrom" : "msal.ConfidentialClientApplication(authority={authority}, client_credentials=thumbprint={thumbprint}, privatekey={privatekey})".format(authority=config["authority"], thumbprint=config["thumbprint"], privatekey=config['private_key_file']),
50
+ "error" : "{0}".format(sys.exc_info()[0])
51
+ }
47
52
  return json.dumps(result)
48
-
53
+
49
54
  # try to get a token
50
55
  result = None
51
56
  try:
52
57
  result = app.acquire_token_for_client(scopes=config["scope"])
53
58
  except:
54
- result = {"errorCode":"3",
55
- "errorFrom":"app.acquire_token_for_client {scopes}=".format(scopes=config["scope"]) ,
56
- "error":sys.exc_info()[0]}
59
+ result = {"errorCode" : "3",
60
+ "errorFrom" : "app.acquire_token_for_client {scopes}=".format(scopes=config["scope"]) ,
61
+ "error" : "{0}".format(sys.exc_info()[0])
62
+ }
57
63
  return json.dumps(result)
58
64
 
59
65
  return json.dumps(result)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: inpython-package
3
- Version: 1.0.1
3
+ Version: 1.0.3
4
4
  Summary: # Infodata's IN-Tools U2Python Package
5
5
  Home-page: https://bitbucket.org/infodata-dev/inpython
6
6
  Author: infodata
@@ -12,13 +12,10 @@ License-File: LICENSE.txt
12
12
 
13
13
  # README #
14
14
 
15
- ce projet 'inpython' rassemble tous les packages et modules python exploités par Integrix .
16
-
17
- ### What is this repository for? ###
18
-
19
- * Define python packages
20
- * 1.0.0
15
+ ce projet 'inpython-package' rassemble tous les packages et modules python exploités par Integrix .
21
16
 
17
+ # inpython.ingarph
18
+ package pour la gestion avec MS-Graph.
22
19
 
23
20
  ### How do I get set up? ###
24
21
 
@@ -33,7 +30,6 @@ exit()
33
30
  ```
34
31
 
35
32
  ### Install inPackages into U2python
36
-
37
- `pip install /path/to/mypypackage/`
33
+ `pip install inpython-package`
38
34
 
39
35
 
@@ -9,7 +9,7 @@ with open("README.md", "r") as fh:
9
9
 
10
10
  setup(
11
11
  name="inpython-package",
12
- version="1.0.1",
12
+ version="1.0.3",
13
13
  author="infodata",
14
14
  author_email="info@infodata.lu",
15
15
  packages=find_packages(),