addftool 0.2.13__py3-none-any.whl → 0.2.15__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 CHANGED
@@ -16,6 +16,8 @@ def add_api(parser):
16
16
  parser.add_argument("-a", "--api", help="api url")
17
17
  parser.add_argument("-n", "--name", help="name")
18
18
  parser.add_argument("-c", "--container", help="container")
19
+ parser.add_argument("-u", "--url", type=str, default="",
20
+ help="blob url")
19
21
 
20
22
 
21
23
  def get_ubuntu_version():
@@ -180,7 +182,10 @@ def mount_main(args):
180
182
 
181
183
 
182
184
  def get_token(args, info=False):
183
- return get_sas_token(args.api, args.name, args.container, args.key, info=info)
185
+ if args.url and args.url != "":
186
+ return get_sas_token_for_blob_url(args.api, args.url, args.key, info=info)
187
+ else:
188
+ return get_sas_token(args.api, args.name, args.container, args.key, info=info)
184
189
 
185
190
 
186
191
  # create a new function for function calling
addftool/tool.py CHANGED
@@ -21,6 +21,11 @@ def init_vscode():
21
21
  execute_command(f"code --install-extension {ext}")
22
22
 
23
23
 
24
+ def clean_py312_externally_managed():
25
+ if os.path.exists("/usr/lib/python3.12/EXTERNALLY-MANAGED") and os.name == 'posix' and os.getuid() == 0:
26
+ execute_command("rm /usr/lib/python3.12/EXTERNALLY-MANAGED")
27
+
28
+
24
29
  def add_alias():
25
30
  # add to ~/.bashrc
26
31
 
@@ -62,11 +67,14 @@ def main():
62
67
  execute_command('git config --global user.email "addf400@foxmail.com"')
63
68
  elif to_do == 'alias':
64
69
  add_alias()
70
+ elif to_do == 'clean_py312':
71
+ clean_py312_externally_managed()
65
72
  elif to_do == 'all':
66
73
  init_vscode()
67
74
  execute_command('git config --global user.name "addf400"')
68
75
  execute_command('git config --global user.email "addf400@foxmail.com"')
69
76
  add_alias()
77
+ clean_py312_externally_managed()
70
78
  else:
71
79
  print("No such init option")
72
80
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: addftool
3
- Version: 0.2.13
3
+ Version: 0.2.15
4
4
  Requires-Dist: cryptography
5
5
  Requires-Dist: requests
6
6
  Requires-Dist: PyYAML
@@ -1,10 +1,10 @@
1
1
  addftool/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  addftool/addf_portal.py,sha256=CnOAq3JLQjK9-OyYWDYcmtLBM68L3N6WeP5NjBod4zc,1819
3
- addftool/blob.py,sha256=prGpDy_esyBL53a5R3yVJdGiXQSPFuU4is1yM9dp2qo,15037
3
+ addftool/blob.py,sha256=RzPpIrBPNKr5KS4sScHFWqsYW9tA8EY-H0fSrlmns8w,15272
4
4
  addftool/broadcast_folder.py,sha256=GQBuSL8Ch537V_fSBHesWyqT3KRYry68pbYOKy2bDj4,19619
5
5
  addftool/sleep.py,sha256=kykcZR2tA0ZpRUwQf6IIUdJ4dYkolyD91FdriViq9Nc,11771
6
6
  addftool/sync.py,sha256=ZpYxbM8uiPFrV7ODmOaM7asVPCWaxBixA-arVc-1kfs,14045
7
- addftool/tool.py,sha256=FmxRY3-pP0_Z0zCUAngjmEMmPUruMftg_iUlB1t2TnQ,2001
7
+ addftool/tool.py,sha256=5Q9CoLh2C5LhxC2thMMAMKnQdnW241Nig10iRFOIZcc,2346
8
8
  addftool/util.py,sha256=zlNLu8Be8cGIpNRqBw8_0q7nFxWlsJ9cToN62ohjdXE,2335
9
9
  addftool/deploy/__init__.py,sha256=UL8b-Idt7lStlMiOm8oTZ65fdzYz99Fgzq2Gaw8WsZc,1544
10
10
  addftool/deploy/azure.py,sha256=_o_9Eh8cVwLDAqvfyRYBtQRHs_Gul-nCs2ZXttwO1bk,1301
@@ -13,8 +13,8 @@ addftool/deploy/vscode_server.py,sha256=tLtSvlcK2fEOaw6udWt8dNELVhwv9F59hF5DJJ-1
13
13
  addftool/process/__init__.py,sha256=Dze8OrcyjQlAbPrjE_h8bMi8W4b3OJyZOjTucPrkJvM,3721
14
14
  addftool/process/utils.py,sha256=JldxnwanLJOgxaPgmCJh7SeBRaaj5rFxWWxh1hpsvbA,2609
15
15
  addftool/ssh/__init__.py,sha256=h5_rCO0A6q2Yw9vFguQZZp_ApAJsT1dcnKnbKKZ0cDM,4409
16
- addftool-0.2.13.dist-info/METADATA,sha256=C8_l-dQvZoQ8gkxbP86PYJsfAHzjNiMhBW5lCtq8rCI,221
17
- addftool-0.2.13.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
18
- addftool-0.2.13.dist-info/entry_points.txt,sha256=9lkmuWMInwUAtev8w8poNkNd7iML9Bjd5CBCFVxg2b8,111
19
- addftool-0.2.13.dist-info/top_level.txt,sha256=jqj56-plrBbyzY0tIxB6wPzjAA8kte4hUlajyyQygN4,9
20
- addftool-0.2.13.dist-info/RECORD,,
16
+ addftool-0.2.15.dist-info/METADATA,sha256=MNHj48rJ5avJsWZ7x6mN7m4vX-7C8d9EOpICgeIb9Gk,221
17
+ addftool-0.2.15.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
18
+ addftool-0.2.15.dist-info/entry_points.txt,sha256=9lkmuWMInwUAtev8w8poNkNd7iML9Bjd5CBCFVxg2b8,111
19
+ addftool-0.2.15.dist-info/top_level.txt,sha256=jqj56-plrBbyzY0tIxB6wPzjAA8kte4hUlajyyQygN4,9
20
+ addftool-0.2.15.dist-info/RECORD,,