xiaoshiai-hub 0.1.1__tar.gz → 0.1.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.
- {xiaoshiai_hub-0.1.1/xiaoshiai_hub.egg-info → xiaoshiai_hub-0.1.3}/PKG-INFO +1 -1
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3}/pyproject.toml +1 -1
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3}/setup.py +1 -1
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3}/xiaoshiai_hub/upload.py +4 -26
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3/xiaoshiai_hub.egg-info}/PKG-INFO +1 -1
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3}/LICENSE +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3}/MANIFEST.in +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3}/README.md +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3}/README_EN.md +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3}/examples/01_basic_usage.py +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3}/examples/02_download_file.py +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3}/examples/03_download_repository.py +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3}/examples/04_upload_file.py +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3}/examples/05_upload_folder.py +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3}/examples/06_encryption.py +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3}/examples/07_complete_workflow.py +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3}/examples/README.md +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3}/requirements-dev.txt +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3}/requirements-test.txt +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3}/requirements.txt +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3}/setup.cfg +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3}/xiaoshiai_hub/__init__.py +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3}/xiaoshiai_hub/client.py +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3}/xiaoshiai_hub/download.py +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3}/xiaoshiai_hub/encryption.py +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3}/xiaoshiai_hub/exceptions.py +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3}/xiaoshiai_hub/types.py +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3}/xiaoshiai_hub.egg-info/SOURCES.txt +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3}/xiaoshiai_hub.egg-info/dependency_links.txt +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3}/xiaoshiai_hub.egg-info/not-zip-safe +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3}/xiaoshiai_hub.egg-info/requires.txt +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.3}/xiaoshiai_hub.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: xiaoshiai-hub
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: Python SDK for XiaoShi AI Hub - Upload, download, and manage AI models and datasets with encryption support
|
|
5
5
|
Home-page: https://github.com/poxiaoyun/moha-sdk
|
|
6
6
|
Author: XiaoShi AI
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "xiaoshiai-hub"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.3"
|
|
8
8
|
description = "Python SDK for XiaoShi AI Hub - Upload, download, and manage AI models and datasets with encryption support"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.7"
|
|
@@ -17,7 +17,7 @@ else:
|
|
|
17
17
|
long_description = "Python SDK for XiaoShi AI Hub"
|
|
18
18
|
|
|
19
19
|
# Read version from __init__.py
|
|
20
|
-
version = "0.1.
|
|
20
|
+
version = "0.1.3"
|
|
21
21
|
init_file = Path(__file__).parent / "xiaoshiai_hub" / "__init__.py"
|
|
22
22
|
if init_file.exists():
|
|
23
23
|
with open(init_file, "r", encoding="utf-8") as f:
|
|
@@ -291,9 +291,8 @@ def upload_folder(
|
|
|
291
291
|
password=password,
|
|
292
292
|
token=token,
|
|
293
293
|
)
|
|
294
|
-
|
|
295
294
|
try:
|
|
296
|
-
|
|
295
|
+
client.get_repository_info(
|
|
297
296
|
organization=organization,
|
|
298
297
|
repo_type=repo_type,
|
|
299
298
|
repo_name=repo_name,
|
|
@@ -303,17 +302,7 @@ def upload_folder(
|
|
|
303
302
|
f"Repository '{repo_id}' does not exist. "
|
|
304
303
|
"Please create the repository before uploading."
|
|
305
304
|
)
|
|
306
|
-
|
|
307
|
-
# Check if repository requires encryption
|
|
308
|
-
is_encrypted = repo_info.annotations.get('encryption') == 'true'
|
|
309
|
-
if is_encrypted:
|
|
310
|
-
if not encryption_key:
|
|
311
|
-
raise EncryptionError(
|
|
312
|
-
f"Repository '{repo_id}' requires encryption, but no encryption_key was provided. "
|
|
313
|
-
"Please provide an encryption_key parameter."
|
|
314
|
-
)
|
|
315
|
-
print(f"Repository is encrypted. Files will be encrypted before upload.")
|
|
316
|
-
|
|
305
|
+
is_encrypted = bool(encryption_key)
|
|
317
306
|
# Validate folder path
|
|
318
307
|
folder_path = Path(folder_path)
|
|
319
308
|
if not folder_path.exists():
|
|
@@ -631,9 +620,8 @@ def upload_file(
|
|
|
631
620
|
password=password,
|
|
632
621
|
token=token,
|
|
633
622
|
)
|
|
634
|
-
|
|
635
623
|
try:
|
|
636
|
-
|
|
624
|
+
client.get_repository_info(
|
|
637
625
|
organization=organization,
|
|
638
626
|
repo_type=repo_type,
|
|
639
627
|
repo_name=repo_name,
|
|
@@ -643,17 +631,7 @@ def upload_file(
|
|
|
643
631
|
f"Repository '{repo_id}' does not exist. "
|
|
644
632
|
"Please create the repository before uploading."
|
|
645
633
|
)
|
|
646
|
-
|
|
647
|
-
# 检查仓库是否是加密仓库
|
|
648
|
-
is_encrypted = repo_info.annotations.get('encryption') == 'true'
|
|
649
|
-
if is_encrypted:
|
|
650
|
-
if not encryption_key:
|
|
651
|
-
raise EncryptionError(
|
|
652
|
-
f"Repository '{repo_id}' requires encryption, but no encryption_key was provided. "
|
|
653
|
-
"Please provide an encryption_key parameter."
|
|
654
|
-
)
|
|
655
|
-
print(f"Repository is encrypted. File will be encrypted before upload.")
|
|
656
|
-
|
|
634
|
+
is_encrypted = bool(encryption_key)
|
|
657
635
|
# 构建 Git URL
|
|
658
636
|
git_url = _build_git_url(
|
|
659
637
|
base_url=base_url,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: xiaoshiai-hub
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: Python SDK for XiaoShi AI Hub - Upload, download, and manage AI models and datasets with encryption support
|
|
5
5
|
Home-page: https://github.com/poxiaoyun/moha-sdk
|
|
6
6
|
Author: XiaoShi AI
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|