addftool 0.1.0__py3-none-any.whl → 0.1.1__py3-none-any.whl
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.
- addftool/blob.py +8 -8
- {addftool-0.1.0.dist-info → addftool-0.1.1.dist-info}/METADATA +1 -1
- addftool-0.1.1.dist-info/RECORD +9 -0
- addftool-0.1.0.dist-info/RECORD +0 -9
- {addftool-0.1.0.dist-info → addftool-0.1.1.dist-info}/WHEEL +0 -0
- {addftool-0.1.0.dist-info → addftool-0.1.1.dist-info}/entry_points.txt +0 -0
- {addftool-0.1.0.dist-info → addftool-0.1.1.dist-info}/top_level.txt +0 -0
addftool/blob.py
CHANGED
|
@@ -163,22 +163,22 @@ def mount_main(args):
|
|
|
163
163
|
|
|
164
164
|
|
|
165
165
|
def get_token(args, info=False):
|
|
166
|
-
|
|
166
|
+
return get_sas_token(args.api, args.name, args.container, args.key, info=info)
|
|
167
167
|
|
|
168
|
-
f = Fernet(args.key.encode())
|
|
169
168
|
|
|
170
|
-
|
|
171
|
-
|
|
169
|
+
# create a new function for function calling
|
|
170
|
+
def get_sas_token(api_url, name, container, key, info=False):
|
|
171
|
+
f = Fernet(key.encode())
|
|
172
|
+
|
|
173
|
+
an = f.encrypt(name.encode()).decode()
|
|
174
|
+
cn = f.encrypt(container.encode()).decode()
|
|
172
175
|
|
|
173
176
|
if info:
|
|
174
177
|
print("Get token from: ", api_url)
|
|
175
178
|
print("Name: ", an)
|
|
176
179
|
print("Container: ", cn)
|
|
177
180
|
|
|
178
|
-
params = {
|
|
179
|
-
"an": an,
|
|
180
|
-
"cn": cn,
|
|
181
|
-
}
|
|
181
|
+
params = {"an": an, "cn": cn}
|
|
182
182
|
response = requests.get(api_url, params=params)
|
|
183
183
|
if response.status_code == 200:
|
|
184
184
|
data = json.loads(response.text)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
addftool/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
addftool/blob.py,sha256=gO3fXR0t4L0ZqOaHM33J3-HF7vz8pQ3IpXE1KrXZU8A,8135
|
|
3
|
+
addftool/tool.py,sha256=EuKQ2t2InN7yB-_oYLcdsA7vRqzRGTunwIxplUSqEG0,2054
|
|
4
|
+
addftool/util.py,sha256=Q3A68vJDxgfeNiEFmk54HuMuworVndocXpSbVpvGMfc,362
|
|
5
|
+
addftool-0.1.1.dist-info/METADATA,sha256=5reB8SX4clfLDPmuuojahelUDXxvbtKd73GWCUPCDFw,126
|
|
6
|
+
addftool-0.1.1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
7
|
+
addftool-0.1.1.dist-info/entry_points.txt,sha256=h5TlQy4AQw-J55HqI7FRkIVRUfw-x3pStFWCoYtoCTM,78
|
|
8
|
+
addftool-0.1.1.dist-info/top_level.txt,sha256=jqj56-plrBbyzY0tIxB6wPzjAA8kte4hUlajyyQygN4,9
|
|
9
|
+
addftool-0.1.1.dist-info/RECORD,,
|
addftool-0.1.0.dist-info/RECORD
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
addftool/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
addftool/blob.py,sha256=P4Fj6ghLsEAw3C1NpEKEe3N4_LS3EedS1OYm5C6yzPw,8006
|
|
3
|
-
addftool/tool.py,sha256=EuKQ2t2InN7yB-_oYLcdsA7vRqzRGTunwIxplUSqEG0,2054
|
|
4
|
-
addftool/util.py,sha256=Q3A68vJDxgfeNiEFmk54HuMuworVndocXpSbVpvGMfc,362
|
|
5
|
-
addftool-0.1.0.dist-info/METADATA,sha256=EbzSeyvThjLaTnuLShjdJ_3skYisyb2NYaWlBv7qMd8,126
|
|
6
|
-
addftool-0.1.0.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
7
|
-
addftool-0.1.0.dist-info/entry_points.txt,sha256=h5TlQy4AQw-J55HqI7FRkIVRUfw-x3pStFWCoYtoCTM,78
|
|
8
|
-
addftool-0.1.0.dist-info/top_level.txt,sha256=jqj56-plrBbyzY0tIxB6wPzjAA8kte4hUlajyyQygN4,9
|
|
9
|
-
addftool-0.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|