2.5k
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openclaw/skills --skill aliyun-oss-2- _meta.json285 B
- SKILL.md3.7 KB
Overview
This skill is a Python toolkit for managing files in Aliyun OSS (Object Storage Service). It provides high-level operations for uploading, downloading, listing, reading, deleting, copying, and moving objects, and supports both authenticated write access and anonymous read-only access. The API is designed for simple scripts and automation tasks involving OSS buckets.
How this skill works
Instantiate OssManager with an endpoint and bucket name; supply api_key and api_secret for write operations or omit them for anonymous read-only access. Methods operate on object keys and prefixes (OSS uses key prefixes instead of real directories) and include helpers for uploading files, text, and images, downloading single files or entire prefixes, listing keys with natural sort, reading contents, checking existence, and managing metadata. Verbose mode prints status messages for each operation.
When to use it
- Automating backups or uploads to an Aliyun OSS bucket from Python scripts.
- Reading public OSS content without credentials for data ingestion or analysis.
- Bulk downloading or synchronizing a bucket prefix to a local folder.
- Performing maintenance tasks: list, delete, copy, or move many objects programmatically.
- Integrating object storage actions into CI/CD pipelines or ETL jobs.
Best practices
- Provide api_key and api_secret only when you need write operations; keep credentials out of source control and use environment variables or a secrets manager.
- Use prefixes to emulate directories; avoid assuming OSS has hierarchical directories.
- Enable verbose during development to observe progress, then disable it in production for quieter logs.
- Use natural-sorted listing for predictable ordering when processing batches of objects.
- Validate file metadata (content_type, etag) after uploads when integrity matters.
Example use cases
- Upload a local folder of processed images to a remote prefix for archival.
- Download all files under a prefix to a local directory for batch processing.
- Check whether a key exists before attempting a read or re-upload.
- Move temporary objects from a staging prefix into an archive prefix as part of a pipeline.
- Delete stale files matching a temp/ prefix to free bucket space.
FAQ
No. Omit api_key and api_secret for anonymous read-only access. Provide credentials for uploads, deletes, copies, or moves.
How are directories handled in OSS?
OSS uses key prefixes; directories are simulated by keys ending with '/'. Use prefix-based methods to list or operate on groups of objects.