xiaoshiai-hub 0.1.1__tar.gz → 0.1.2__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.2}/PKG-INFO +1 -1
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2}/pyproject.toml +1 -1
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2}/setup.py +1 -1
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2}/xiaoshiai_hub/upload.py +2 -46
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2/xiaoshiai_hub.egg-info}/PKG-INFO +1 -1
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2}/LICENSE +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2}/MANIFEST.in +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2}/README.md +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2}/README_EN.md +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2}/examples/01_basic_usage.py +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2}/examples/02_download_file.py +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2}/examples/03_download_repository.py +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2}/examples/04_upload_file.py +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2}/examples/05_upload_folder.py +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2}/examples/06_encryption.py +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2}/examples/07_complete_workflow.py +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2}/examples/README.md +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2}/requirements-dev.txt +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2}/requirements-test.txt +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2}/requirements.txt +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2}/setup.cfg +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2}/xiaoshiai_hub/__init__.py +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2}/xiaoshiai_hub/client.py +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2}/xiaoshiai_hub/download.py +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2}/xiaoshiai_hub/encryption.py +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2}/xiaoshiai_hub/exceptions.py +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2}/xiaoshiai_hub/types.py +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2}/xiaoshiai_hub.egg-info/SOURCES.txt +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2}/xiaoshiai_hub.egg-info/dependency_links.txt +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2}/xiaoshiai_hub.egg-info/not-zip-safe +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2}/xiaoshiai_hub.egg-info/requires.txt +0 -0
- {xiaoshiai_hub-0.1.1 → xiaoshiai_hub-0.1.2}/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.2
|
|
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.2"
|
|
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.2"
|
|
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,29 +291,7 @@ def upload_folder(
|
|
|
291
291
|
password=password,
|
|
292
292
|
token=token,
|
|
293
293
|
)
|
|
294
|
-
|
|
295
|
-
try:
|
|
296
|
-
repo_info = client.get_repository_info(
|
|
297
|
-
organization=organization,
|
|
298
|
-
repo_type=repo_type,
|
|
299
|
-
repo_name=repo_name,
|
|
300
|
-
)
|
|
301
|
-
except RepositoryNotFoundError:
|
|
302
|
-
raise RepositoryNotFoundError(
|
|
303
|
-
f"Repository '{repo_id}' does not exist. "
|
|
304
|
-
"Please create the repository before uploading."
|
|
305
|
-
)
|
|
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
|
-
|
|
294
|
+
is_encrypted = bool(encryption_key)
|
|
317
295
|
# Validate folder path
|
|
318
296
|
folder_path = Path(folder_path)
|
|
319
297
|
if not folder_path.exists():
|
|
@@ -631,29 +609,7 @@ def upload_file(
|
|
|
631
609
|
password=password,
|
|
632
610
|
token=token,
|
|
633
611
|
)
|
|
634
|
-
|
|
635
|
-
try:
|
|
636
|
-
repo_info = client.get_repository_info(
|
|
637
|
-
organization=organization,
|
|
638
|
-
repo_type=repo_type,
|
|
639
|
-
repo_name=repo_name,
|
|
640
|
-
)
|
|
641
|
-
except RepositoryNotFoundError:
|
|
642
|
-
raise RepositoryNotFoundError(
|
|
643
|
-
f"Repository '{repo_id}' does not exist. "
|
|
644
|
-
"Please create the repository before uploading."
|
|
645
|
-
)
|
|
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
|
-
|
|
612
|
+
is_encrypted = bool(encryption_key)
|
|
657
613
|
# 构建 Git URL
|
|
658
614
|
git_url = _build_git_url(
|
|
659
615
|
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.2
|
|
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
|