Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here


Python client for Baidu Yun (Personal Cloud Storage) 百度云/百度网盘Python客户端

Subscribe to updates I use bypy

Statistics on bypy

Number of watchers on Github 3586
Number of open issues 12
Average time to close an issue 7 days
Main language Python
Average time to merge a PR 8 days
Open pull requests 4+
Closed pull requests 7+
Last commit over 1 year ago
Repo Created almost 6 years ago
Repo Last Updated over 1 year ago
Size 1.89 MB
Organization / Authorhoutianze
Page Updated
Do you use bypy? Leave a review!
View open issues (12)
View bypy activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating bypy for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

bypy - Python client for Baidu Yun (Personal Cloud Storage) /Python

alt text alt text alt text Coverage Status Code Climate Join the chat at

  • : pip install bypy
  • : bypy


  • To install: pip install bypy
  • To use: bypy

*bug __ *

This is project is now in maintenance mode: NO new features will be added, and may be updated only if critical bugs are found.

(English readme is at the bottom)

  • : //--processes

/PythonLinuxWindows2TBRaspberry Pi

PCS API/apps/bypy

~~PCS API1000 #285 )1000 / ~~

*: Unicode//; *

Raspberry Pi


  • pippip install bypy Python 2.7+, 3.3+)

  • : bypy (python -m bypypython3 -m bypy

  • : import bypy




bypy info.

bypy help <command>
bypy list
bypy syncup


bypy upload
bypy syncdown


bypy downdir /

bypy compare


  • -v
  • -d
  • -dddHTTP****



from bypy import ByPy
bp.list() # or whatever instance methods of ByPy class


PCS API: ( baidudoc directory)


  • Latest feature: Multiprocessing added to directory upload / download / sync--processes

This 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 stoarge service under Linux environment (console), e.g. Raspberry Pi.

Due to Baidu PC permission restrictions, this program can only access your /apps/bypy directoy at Baidu PCS

(Fixed) It's said the Baidu PCS API won't return more than 1000 items inside a directory ( #285 )if this is trueyou won't be able to see / download some files if you have a directory with more than 1000 files on Baidu Cloud

Features: Unicode / Chinese support; Retry on failures; Recursive down/up-load; Directory comparison; Hash caching.


Important: You need to set you system locale encoding to UTF-8 for this to work (You can refere here:


  • pip install bypy (Supports Python 2.7+, 3.3+)


  • Standalone program

    • Simply run bypy (or python -m bypy, or python3 -m bypy You will see all the commands and parameters it supports
  • As a package in your code

    • import bypy

Simple GUI: Run bypygui

Getting started

To get help and a list of available commands:


To 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.

To get more details about certain command:

bypy help <command>

List files at (App's) root directory at Baidu PCS:

bypy list

To sync up to the cloud (from the current directory):

bypy syncup


bypy upload

To sync down from the cloud (to the current directory):

bypy syncdown


bypy downdir /

To compare the current directory to (App's) root directory at Baidu PCS (which I think is very useful):

bypy compare

To get more information about the commands, check the output of bypy.


  • Add in -v parameter, it will print more details about the progress.
  • Add in -d parameter, it will print some debug messages.
  • Add in -ddd, it will display HTTP messages as well (Warning: A lot

Tips / Sharing

Please go to wiki

To call from Python code

from bypy import ByPy
bp.list() # or whatever instance methods of ByPy class


Please refer to LICENSE

PCS API Document (link dead 404): (Offline pdf retrieved before: baidudoc directory)

bypy open issues Ask a question     (View All Issues)
  • about 3 years Program authorization FAILED.
  • about 3 years bypy upload not working with file name begin with -
  • about 3 years 传一个40多G的大文件报错Error code 31363
  • about 3 years API 访问出错
  • about 3 years 超过20M的大文件上传无法正确建立文件夹
  • about 3 years 上传好慢,几兆的东西也上传不上去
  • about 3 years Cloud download not support torrent/magnet.
  • about 3 years 可以并发吗
  • about 3 years 关于使用 zipapp 构建可独立运行的方法
  • over 3 years 登入了作者的百度账户
  • over 3 years 本地文件,远程文件大小不匹配怎么回事?
  • over 3 years request openssl 出错
  • over 3 years `bypy list` capped at 1000 files maximum per directory?
  • over 3 years 希望增加ftp/webdav服务支持
  • over 3 years UnicodeDecodeError: 'ascii' codec can't decode byte 0xc9 in position 18: ordinal not in range(128)
  • over 3 years 楼主请问,wp2pcs方式,百度云离线下载提示用户未授权,怎么回事呢
  • over 3 years aria2下载过50%以上中断后无法续传
  • over 3 years 同步到本地时报错,程序中断
  • over 3 years Error accessing '
  • over 3 years Unhandled exception while getting the help info about a command.
  • over 3 years syncup的时候deleteremote参数加不上
  • over 3 years 建议添加daemon选项
  • over 3 years 内层子文件夹被创建至外层
  • over 3 years bypy对大文件下载的支持不友善啊~
  • over 3 years file is not authorized
  • over 3 years 上传运行前报错,然后正常上传,文件未上传
  • over 3 years 提供多用户登陆
  • over 3 years <E> [21:11:20] Maximum number (1) of tries failed. <E> [21:11:20] Token-refreshing on all the servers failed
  • over 3 years 想问下有没有计划增加webui?
  • over 3 years 同步失败啊
bypy open pull requests (View All Pulls)
  • Because refresh_token doesn't work, I hope it would provide an interface to auto with auth_code.
  • wrap json.dumps with unicode to ensure type
  • Make the more friendly to pip
  • Fix `TypeError: b'xxxxxx' is not JSON serializable`
bypy list of languages used
Other projects in Python