Use megfile’s APIs, SmartPath, configuration, and CLI to perform filesystem tasks easy across local FS, S3/OSS-style object storage, SFTP, WebDAV, HTTP, HDFS, and stdio.
Guide to using megfile’s unified APIs, SmartPath, configuration, and CLI for file operations across various backends, like local FS, S3/OSS-compatible object storage, SFTP, WebDAV, HTTP, HDFS, and stdio.
pip install megfile; add extras per backend (megfile[cli], megfile[hdfs], megfile[webdav]).AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, optional AWS_ENDPOINT_URL / OSS_ENDPOINT / AWS_ENDPOINT_URL_S3, AWS_S3_ADDRESSING_STYLE.protocol://bucket/key or alias (e.g., tos://); bare POSIX paths are treated as file://.from megfile import smart_open, smart_sync, ...) or SmartPath (from megfile.smart_path import SmartPath).file:// or bare paths) — base install.s3://, plus aliases) — base install.sftp://) — install megfile[cli] or megfile with SFTP deps.http://, https://) — base install.stdio://) — base install.hdfs://) — install megfile[hdfs].webdav://) — install megfile[webdav].references/path_format.md.smart_open(path, mode='r', encoding=None, **options): open binary/text handles.smart_load_content / smart_save_content (bytes), smart_load_text / smart_save_text (str), smart_save_as(file_obj, path), smart_load_from(path) returns BinaryIO.smart_combine_open(glob, mode='rb', open_func=smart_open): sequentially reads multiple files as one stream.smart_exists, smart_isfile, smart_isdir, smart_islink, smart_isabs.smart_access(path, mode=Access.READ/WRITE).smart_stat / smart_lstat (via SmartPath), smart_getsize, smart_getmtime, smart_getmd5(recalculate=False, followlinks=False).smart_listdir, smart_scandir, smart_walk, smart_scan, smart_scan_stat (returns FileEntry/StatResult).smart_glob, smart_iglob, smart_glob_stat for stat-rich globbing.smart_copy, smart_sync, smart_sync_with_progress (progress-friendly wrapper), smart_concat to merge multiple sources.smart_move, smart_rename, smart_remove, smart_unlink, smart_touch, smart_makedirs.smart_symlink, smart_readlink.smart_path_join, smart_abspath, smart_realpath, smart_relpath, smart_isabs.path = SmartPath("s3://bucket/key"); path.exists(); path.open(mode="rb").smart_cache(path, cacher=SmartCacher, **options): cache remote resources locally for tools that only support local files.s3+prod://...). See references/configuration/ for protocol-specific flags and env vars.references/configuration/.pip install 'megfile[cli]'.megfile completion zsh.references/cli.md.map_func (e.g., ThreadPoolExecutor.map) and callback to report progress.megfile config alias <alias> <protocol> to shorten paths (e.g., tos://).references/megfile.smart.md and references/megfile.smart_path.md.references/configuration/references/cli.mdreferences/path_format.md.references/advanced/glob.md.npx skills add megvii-research/megfile下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer