ark-utils-cli 0.3.0__tar.gz → 0.4.0__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.
@@ -3,6 +3,7 @@ name: Publish to PyPI
3
3
  on:
4
4
  release:
5
5
  types: [published]
6
+ workflow_dispatch:
6
7
 
7
8
  jobs:
8
9
  publish:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ark-utils-cli
3
- Version: 0.3.0
3
+ Version: 0.4.0
4
4
  Summary: 火山引擎命令行工具 - 让人类和 AI Agent 都能在终端中操作火山引擎
5
5
  License-File: LICENSE
6
6
  Requires-Python: >=3.9
@@ -1,3 +1,3 @@
1
1
  """火山引擎命令行工具"""
2
2
 
3
- __version__ = "0.3.0"
3
+ __version__ = "0.4.0"
@@ -2,6 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ import mimetypes
5
6
  import os
6
7
 
7
8
  import tos
@@ -52,7 +53,11 @@ class TosClient:
52
53
  if not os.path.exists(local_path):
53
54
  raise FileNotFoundError(f"文件不存在: {local_path}")
54
55
 
55
- self.client.put_object_from_file(bucket, object_key, local_path)
56
+ content_type, _ = mimetypes.guess_type(local_path)
57
+ if content_type is None:
58
+ content_type = "application/octet-stream"
59
+
60
+ self.client.put_object_from_file(bucket, object_key, local_path, content_type=content_type)
56
61
 
57
62
  # 生成预签名临时链接
58
63
  result = self.client.pre_signed_url(
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "ark-utils-cli"
3
- version = "0.3.0"
3
+ version = "0.4.0"
4
4
  description = "火山引擎命令行工具 - 让人类和 AI Agent 都能在终端中操作火山引擎"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.9"
@@ -8,7 +8,7 @@ resolution-markers = [
8
8
 
9
9
  [[package]]
10
10
  name = "ark-utils-cli"
11
- version = "0.3.0"
11
+ version = "0.4.0"
12
12
  source = { editable = "." }
13
13
  dependencies = [
14
14
  { name = "tos" },
@@ -1,6 +0,0 @@
1
- def main():
2
- print("Hello from ark-cli!")
3
-
4
-
5
- if __name__ == "__main__":
6
- main()
File without changes
File without changes
File without changes
File without changes
File without changes