pywayne-aliyun-oss
БесплатноБез исполняемых скриптовНе проверенAliyun OSS (Object Storage Service) file management toolkit for Python. Use when working with Aliyun OSS to upload files, download files, list objects, delete…
от modbender★ 21 звезда на GitHubОб этом скилле
Pywayne Aliyun OSS
pywayne.aliyun_oss.OssManager provides a comprehensive toolkit for managing Aliyun OSS (Object Storage Service) buckets.
Quick Start
from pywayne.aliyun_oss import OssManager
# Initialize with write permissions
oss = OssManager(
endpoint="https://oss-cn-xxx.aliyuncs.com",
bucket_name="my-bucket",
api_key="your_api_key",
api_secret="your_api_secret"
)
# Initialize with read-only (anonymous) access
oss = OssManager(
endpoint="https://oss-cn-xxx.aliyuncs.com",
bucket_name="my-bucket",
verbose=False # Disable verbose output
)
Upload Operations
Upload a local file
oss.upload_file(key="data/sample.txt", file_path="./sample.txt")
Upload text content
oss.upload_text(key="config/settings.json", text='{"key": "value"}')
Upload an image (numpy array)
import cv2
image = cv2.imread("photo.jpg")
oss.upload_image(key="photos/photo.jpg", image=image)
Upload entire directory
oss.upload_directory(local_path="./local_folder", prefix="remote_folder/")
Download Operations
Download a single file
# Preserve directory structure: downloads/data/sample.txt
oss.download_file(key="data/sample.txt", root_dir="./downloads")
# Use only basename: downloads/sample.txt
oss.download_file(key="data/sample.txt", root_dir="./downloads", use_basename=True)
Download files with prefix
oss.download_files_with_prefix(prefix="photos/", root_dir="./downloads")
Download entire directory
oss.download_directory(prefix="photos/", local_path="./downloads")
List Operations
List all keys in bucket
keys = oss.list_all_keys() # Returns sorted list
List keys with prefix
keys = oss.list_keys_with_prefix(prefix="data/")
List directory contents (first level only)
contents = oss.list_directory_contents(prefix="data/")
# Returns: [("file1.txt", False), ("subdir", True), ...]
Read Operations
Read file content as string
content = oss.read_file_content(key="config/settings.json")
Check if file exists
if oss.key_exists("data/sample.txt"):
print("File exists")
Get file metadata
metadata = oss.get_file_metadata("data/sample.txt")
# Returns: {'content_length': 1234, 'last_modified': ..., 'etag': ..., 'content_type': ...}
Delete Operations
Delete a single file
oss.delete_file(key="data/sample.txt")
Delete files with prefix
oss.delete_files_with_prefix(prefix="temp/")
Copy and Move Operations
Copy object within bucket
oss.copy_object(source_key="data/original.txt", target_key="backup/original.txt")
Move object within bucket
oss.move_object(source_key="data/temp.txt", target_key="archive/temp.txt")
Important Notes
- Write permissions: Upload, delete, copy, and move operations require
api_keyandapi_secret - Anonymous access: Omit
api_keyandapi_secretfor read-only access - Directory handling: OSS doesn't have real directories - use prefixes (keys ending with
/) - Natural sorting:
list_all_keys()andlist_keys_with_prefix()use natural sorting by default - Verbose output: All methods print status messages when
verbose=True(default)
Установить pywayne-aliyun-oss в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл pywayne-aliyun-oss?
Aliyun OSS (Object Storage Service) file management toolkit for Python. Use when working with Aliyun OSS to upload files, download files, list objects, delete files, manage directories, read file contents, check file existence, get file metadata, copy and move objects. Supports both authenticated (with API key/secret for write operations) and anonymous access (read-only).
Как установить скилл pywayne-aliyun-oss?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл pywayne-aliyun-oss запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic