{"id":13536419,"url":"https://github.com/houtianze/bypy","last_synced_at":"2025-05-13T16:04:58.861Z","repository":{"id":12856965,"uuid":"15532991","full_name":"houtianze/bypy","owner":"houtianze","description":"Python client for Baidu Yun (Personal Cloud Storage) 百度云/百度网盘Python客户端","archived":false,"fork":false,"pushed_at":"2025-04-02T01:11:10.000Z","size":2846,"stargazers_count":8172,"open_issues_count":37,"forks_count":1412,"subscribers_count":294,"default_branch":"master","last_synced_at":"2025-04-22T11:36:49.854Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/houtianze.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["houtianze"],"buy_me_a_coffee":"ibic"}},"created_at":"2013-12-30T17:47:38.000Z","updated_at":"2025-04-22T07:15:24.000Z","dependencies_parsed_at":"2024-01-14T02:37:04.533Z","dependency_job_id":"ea16f4b1-3968-43bf-87d7-eaa856712b6e","html_url":"https://github.com/houtianze/bypy","commit_stats":{"total_commits":498,"total_committers":34,"mean_commits":"14.647058823529411","dds":"0.45783132530120485","last_synced_commit":"c61eb581050c30604f76e117ecebd2313a707cc8"},"previous_names":[],"tags_count":87,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/houtianze%2Fbypy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/houtianze%2Fbypy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/houtianze%2Fbypy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/houtianze%2Fbypy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/houtianze","download_url":"https://codeload.github.com/houtianze/bypy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252590509,"owners_count":21772934,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T09:00:38.915Z","updated_at":"2025-05-05T22:46:22.967Z","avatar_url":"https://github.com/houtianze.png","language":"Python","funding_links":["https://github.com/sponsors/houtianze","https://buymeacoffee.com/ibic"],"categories":["Python","1. Unsplash Spider","Python (1887)","云安全","网络信息服务"],"sub_categories":["资源传输下载"],"readme":"bypy - Python client for Baidu Yun (Personal Cloud Storage) 百度云/百度网盘Python客户端\n====================================================================================\n\n[![alt text](https://img.shields.io/pypi/v/bypy.svg \"PyPi Version\")](https://pypi.python.org/pypi/bypy)\n[![alt text](https://img.shields.io/pypi/dm/bypy.svg \"PyPi Downloads\")](https://pypi.python.org/pypi/bypy)\n[![alt text](https://travis-ci.org/houtianze/bypy.svg \"Build status\")](https://travis-ci.org/houtianze/bypy)\n[![Coverage Status](https://coveralls.io/repos/houtianze/bypy/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/houtianze/bypy?branch=master)\n[![Code Climate](https://codeclimate.com/github/houtianze/bypy/badges/gpa.svg)](https://codeclimate.com/github/houtianze/bypy)\n[![Join the chat at https://gitter.im/houtianze/bypy](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/houtianze/bypy?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://stand-with-ukraine.pp.ua)\n\n极简说明\n-------\n\n- 安装: `pip install bypy`\n- 运行: `bypy`\n\nTL;DR\n-----\n\n- To install: `pip install bypy`\n- To use: `bypy`\n\n**此项目已经进入维护状态：不会再有新的功能加入，只有在发现重大bug情况下才会有 _可能_ 更新。**\n\n**This is project is now in \"maintenance\" mode: NO new features will be added, and _may_ be updated only if critical bugs are found.**\n\n---\n\n**如果有人想帮助搭国内建授权服务器的话，请按以下步骤进行:**\n\n1. Clone \u003chttps://github.com/houtianze/bypyoauth\u003e 并用任意值配置好环境变量后成功运行服务\n2. Fork 此repo，并把你的新服务器地址加到这里 \u003chttps://github.com/houtianze/bypy/blob/master/bypy/res/auth.json\u003e\n3. 创建拉取请求，然后通过 [![Join the chat at https://gitter.im/houtianze/bypy](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/houtianze/bypy?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge) 或者在拉取请求里留下你的联系方式\n4. 我测试新服务器可以使用后，通过Gitter/邮件把Secret Key发给你，你用正确的配置启动授权服务器\n5. 新的授权服务器配置好后我合并拉取请求\n6. 谢谢。\n\n---\n\n中文说明 (English readme is at the bottom)\n-----------------------------------------\n\n- 最新: 目录上传/下载/同步加入了多进程支持（`--processes`）\n\n---\n这是一个百度云/百度网盘的Python客户端。主要的目的就是在Linux环境下（Windows下应该也可用，但没有仔细测试过）通过命令行来使用百度云盘的2TB的巨大空间。比如，你可以用在Raspberry Pi树莓派上。它提供文件列表、下载、上传、比较、向上同步、向下同步，等操作。\n\n**由于百度PCS API权限限制，程序只能存取百度云端`/apps/bypy`目录下面的文件和目录。**\n\n**（已解决）~~据说百度PCS API最多返回目录下1000个文件（ #285 )，如果属实，百度云盘上若有超过1000个文件的目录，将有一部分文件无法被看到 / 下载~~**\n\n**特征: 支持Unicode/中文；失败重试；递归上传/下载；目录比较; 哈希缓存。**\n\n界面是英文的，主要是因为这个是为了Raspberry Pi树莓派开发的。\n\n程序依赖\n------\n\n**重要：需要把系统的区域编码设置为UTF-8。（参见：\u003chttp://perlgeek.de/en/article/set-up-a-clean-utf8-environment\u003e)**\n\n安装\n---\n\n- 通过`pip`来安装：`pip install bypy` （支持Python 2.7+, 3.3+)\n\n运行\n---\n\n- 作为独立程序: 运行 `bypy` (或者`python -m bypy`，或者`python3 -m bypy`）\n\n  可以看到命令行支持的全部命令和参数。\n- 作为一个包，在代码中使用: `import bypy`\n\n简单的图形界面：\n运行 `bypygui`\n\n基本操作\n------\n\n显示使用帮助和所有命令（英文）:\n\n```bash\nbypy\n```\n\n第一次运行时需要授权，只需跑任何一个命令（比如 `bypy info`）然后跟着说明（登陆等）来授权即可。授权只需一次，一旦成功，以后不会再出现授权提示.\n\n更详细的了解某一个命令：\n\n```bash\nbypy help \u003ccommand\u003e\n```\n\n显示在云盘（程序的）根目录下文件列表：\n\n```bash\nbypy list\n```\n\n把当前目录同步到云盘：\n\n```bash\nbypy syncup\n```\n\nor\n\n```bash\nbypy upload\n```\n\n把云盘内容同步到本地来：\n\n```bash\nbypy syncdown\n```\n\nor\n\n```bash\nbypy downdir /\n```\n\n**比较本地当前目录和云盘（程序的）根目录（个人认为非常有用）：**\n\n```bash\nbypy compare\n```\n\n更多命令和详细解释请见运行`bypy`的输出。\n\n调试\n---\n\n- 运行时添加`-v`参数，会显示进度详情。\n- 运行时添加`-d`，会显示一些调试信息。\n- 运行时添加`-ddd`，还会会显示HTTP通讯信息（**警告：非常多**）\n\n整合测试（15 - 30分钟）\n-------------------\n\n- 在主目录下跑：`python -m bypy.test`\n\n直接在Python程序中调用\n-------------------\n\n```python\nfrom bypy import ByPy\nbp=ByPy()\nbp.list() # or whatever instance methods of ByPy class\n```\n\n经验分享\n-------\n\n请移步至[wiki](../../wiki)，方便分享/交流。\n\n授权许可\n-------\n\n请阅: [LICENSE](LICENSE)\n\n---\n\nPCS API文档（已失效）: \u003chttp://developer.baidu.com/wiki/index.php?title=docs/pcs/rest/file_data_apis_list\u003e (以前保存的离线版： [baidudoc](baidudoc) directory)\n\n---\n\nIntroduction\n------------\n\n- Latest feature: Multiprocessing added to directory upload / download / sync（`--processes`）\n\n---\nThis is a Python client for Baidu Yun (a.k.a PCS - Personal Cloud Storage), an online storage website offering 2 TB (fast) free personal storage. This main purpose is to be able to utilize this storage service under Linux environment (console), e.g. Raspberry Pi.\n\n**Due to Baidu PC permission restrictions, this program can only access your `/apps/bypy` directory at Baidu PCS**\n\n**(Fixed) ~~It's said the Baidu PCS API won't return more than 1000 items inside a directory ( #285 )，if this is true，you won't be able to see / download some files if you have a directory with more than 1000 files on Baidu Cloud~~**\n\n**Features: Unicode / Chinese support; Retry on failures; Recursive down/up-load; Directory comparison; Hash caching.**\n\nPrerequisite\n------------\n\n**Important: You need to set you system locale encoding to UTF-8 for this to work (You can refer here: \u003chttp://perlgeek.de/en/article/set-up-a-clean-utf8-environment\u003e)**\n\nInstallation\n------------\n\n- `pip install bypy` (Supports Python 2.7+, 3.3+)\n\nUsage\n-----\n\n- Standalone program\n  - Simply run `bypy`  (or `python -m bypy`, or `python3 -m bypy`）\n  You will see all the commands and parameters it supports\n\n- As a package in your code\n  - `import bypy`\n\nSimple GUI:\nRun `bypygui`\n\nGetting started\n---------------\n\nTo get help and a list of available commands:\n\n```bash\nbypy\n```\n\nTo authorize for first time use, run any commands e.g. `bypy info` and follow the instructions (login etc). This is a one-time requirement only.\n\nTo get more details about certain command:\n\n```bash\nbypy help \u003ccommand\u003e\n```\n\nList files at (App's) root directory at Baidu PCS:\n\n```bash\nbypy list\n```\n\nTo sync up to the cloud (from the current directory):\n\n```bash\nbypy syncup\n```\n\nor\n\n```bash\nbypy upload\n```\n\nTo sync down from the cloud (to the current directory):\n\n```bash\nbypy syncdown\n```\n\nor\n\n```bash\nbypy downdir /\n```\n\n**To compare the current directory to (App's) root directory at Baidu PCS (which I think is very useful):**\n\n```bash\nbypy compare\n```\n\nTo get more information about the commands, check the output of `bypy`.\n\nDebug\n-----\n\n- Add in `-v` parameter, it will print more details about the progress.\n- Add in `-d` parameter, it will print some debug messages.\n- Add in `-ddd`, it will display HTTP messages as well (**Warning: A lot**）\n\nIntegration Test (15-30min)\n--------------------------\n\n- (In the project root directory) run: `python -m bypy.test`\n\nTo call from Python code\n------------------------\n\n```python\nfrom bypy import ByPy\nbp=ByPy()\nbp.list() # or whatever instance methods of ByPy class\n```\n\nTips / Sharing\n--------------\n\nPlease go to [wiki](../../wiki)\n\nLicense\n---\n\nPlease refer to [LICENSE](LICENSE)\n\n---\n\nPCS API Document (link dead 404): \u003chttp://developer.baidu.com/wiki/index.php?title=docs/pcs/rest/file_data_apis_list\u003e (Offline pdf retrieved before: [baidudoc](baidudoc) directory)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoutianze%2Fbypy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhoutianze%2Fbypy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoutianze%2Fbypy/lists"}