﻿{"id":620,"date":"2020-11-25T03:34:13","date_gmt":"2020-11-24T19:34:13","guid":{"rendered":"https:\/\/byy3.com\/?p=620"},"modified":"2021-01-09T10:14:00","modified_gmt":"2021-01-09T02:14:00","slug":"%e7%99%be%e5%ba%a6%e4%ba%91%e4%bd%bf%e7%94%a8linux%e6%9c%8d%e5%8a%a1%e5%99%a8%e4%bb%a3%e7%90%86%e4%b8%8b%e8%bd%bd","status":"publish","type":"post","link":"https:\/\/byy3.com\/?p=620","title":{"rendered":"\u767e\u5ea6\u4e91\u7f51\u76d8\u4f7f\u7528linux\u670d\u52a1\u5668\u4ee3\u7406\u4e0b\u8f7d"},"content":{"rendered":"<h2><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-621\" data-original=\"https:\/\/byy3.com\/wp-content\/uploads\/2020\/11\/2020112419291839.png\" src=\"https:\/\/byy3.com\/wp-content\/themes\/MNews%20V2.4\/images\/post-loading.gif\" width=\"1245\" height=\"612\" title=\"\u767e\u5ea6\u4e91\u7f51\u76d8\u4f7f\u7528linux\u670d\u52a1\u5668\u4ee3\u7406\u4e0b\u8f7d\u63d2\u56fe\" alt=\"\u767e\u5ea6\u4e91\u7f51\u76d8\u4f7f\u7528linux\u670d\u52a1\u5668\u4ee3\u7406\u4e0b\u8f7d\u63d2\u56fe\" \/><\/h2>\n<h2>\u89e3\u51b3\u65b9\u6848bypy\u4e00\u4e2apython\u5f00\u6e90\u7a0b\u5e8f<\/h2>\n<h2>\u6781\u7b80\u8bf4\u660e<\/h2>\n<ul>\n<li>\u5b89\u88c5:\u00a0<code>pip install bypy<\/code><\/li>\n<li>\u8fd0\u884c:\u00a0<code>bypy<\/code><\/li>\n<\/ul>\n<h2><a id=\"user-content-tldr\" class=\"anchor\" href=\"https:\/\/byy3.com\/go\/?url=https:\/\/github.com\/houtianze\/bypy#tldr\" aria-hidden=\"true\" rel=\"nofollow\" ><\/a>TL;DR<\/h2>\n<ul>\n<li>To install:\u00a0<code>pip install bypy<\/code><\/li>\n<li>To use:\u00a0<code>bypy<\/code><\/li>\n<\/ul>\n<p><strong>\u6b64\u9879\u76ee\u5df2\u7ecf\u8fdb\u5165\u7ef4\u62a4\u72b6\u6001\uff1a\u4e0d\u4f1a\u518d\u6709\u65b0\u7684\u529f\u80fd\u52a0\u5165\uff0c\u53ea\u6709\u5728\u53d1\u73b0\u91cd\u5927bug\u60c5\u51b5\u4e0b\u624d\u4f1a\u6709\u00a0<em>\u53ef\u80fd<\/em>\u00a0\u66f4\u65b0\u3002<\/strong><\/p>\n<p><strong>This is project is now in \"maintenance\" mode: NO new features will be added, and\u00a0<em>may<\/em>\u00a0be updated only if critical bugs are found.<\/strong><\/p>\n<hr \/>\n<h2><a id=\"user-content-\u4e2d\u6587\u8bf4\u660e-english-readme-is-at-the-bottom\" class=\"anchor\" href=\"https:\/\/byy3.com\/go\/?url=https:\/\/github.com\/houtianze\/bypy#%E4%B8%AD%E6%96%87%E8%AF%B4%E6%98%8E-english-readme-is-at-the-bottom\" aria-hidden=\"true\" rel=\"nofollow\" ><\/a>\u4e2d\u6587\u8bf4\u660e (English readme is at the bottom)<\/h2>\n<ul>\n<li>\u6700\u65b0: \u76ee\u5f55\u4e0a\u4f20\/\u4e0b\u8f7d\/\u540c\u6b65\u52a0\u5165\u4e86\u591a\u8fdb\u7a0b\u652f\u6301\uff08<code>--processes<\/code>\uff09<\/li>\n<\/ul>\n<hr \/>\n<p>\u8fd9\u662f\u4e00\u4e2a\u767e\u5ea6\u4e91\/\u767e\u5ea6\u7f51\u76d8\u7684Python\u5ba2\u6237\u7aef\u3002\u4e3b\u8981\u7684\u76ee\u7684\u5c31\u662f\u5728Linux\u73af\u5883\u4e0b\uff08Windows\u4e0b\u5e94\u8be5\u4e5f\u53ef\u7528\uff0c\u4f46\u6ca1\u6709\u4ed4\u7ec6\u6d4b\u8bd5\u8fc7\uff09\u901a\u8fc7\u547d\u4ee4\u884c\u6765\u4f7f\u7528\u767e\u5ea6\u4e91\u76d8\u76842TB\u7684\u5de8\u5927\u7a7a\u95f4\u3002\u6bd4\u5982\uff0c\u4f60\u53ef\u4ee5\u7528\u5728Raspberry Pi\u6811\u8393\u6d3e\u4e0a\u3002\u5b83\u63d0\u4f9b\u6587\u4ef6\u5217\u8868\u3001\u4e0b\u8f7d\u3001\u4e0a\u4f20\u3001\u6bd4\u8f83\u3001\u5411\u4e0a\u540c\u6b65\u3001\u5411\u4e0b\u540c\u6b65\uff0c\u7b49\u64cd\u4f5c\u3002<\/p>\n<p><strong>\u7531\u4e8e\u767e\u5ea6PCS API\u6743\u9650\u9650\u5236\uff0c\u7a0b\u5e8f\u53ea\u80fd\u5b58\u53d6\u767e\u5ea6\u4e91\u7aef<code>\/apps\/bypy<\/code>\u76ee\u5f55\u4e0b\u9762\u7684\u6587\u4ef6\u548c\u76ee\u5f55\u3002<\/strong><\/p>\n<p><strong>\uff08\u5df2\u89e3\u51b3\uff09<del>\u636e\u8bf4\u767e\u5ea6PCS API\u6700\u591a\u8fd4\u56de\u76ee\u5f55\u4e0b1000\u4e2a\u6587\u4ef6\uff08 #285 )\uff0c\u5982\u679c\u5c5e\u5b9e\uff0c\u767e\u5ea6\u4e91\u76d8\u4e0a\u82e5\u6709\u8d85\u8fc71000\u4e2a\u6587\u4ef6\u7684\u76ee\u5f55\uff0c\u5c06\u6709\u4e00\u90e8\u5206\u6587\u4ef6\u65e0\u6cd5\u88ab\u770b\u5230 \/ \u4e0b\u8f7d<\/del><\/strong><\/p>\n<p><strong>\u7279\u5f81: \u652f\u6301Unicode\/\u4e2d\u6587\uff1b\u5931\u8d25\u91cd\u8bd5\uff1b\u9012\u5f52\u4e0a\u4f20\/\u4e0b\u8f7d\uff1b\u76ee\u5f55\u6bd4\u8f83; \u54c8\u5e0c\u7f13\u5b58\u3002<\/strong><\/p>\n<p>\u754c\u9762\u662f\u82f1\u6587\u7684\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u8fd9\u4e2a\u662f\u4e3a\u4e86Raspberry Pi\u6811\u8393\u6d3e\u5f00\u53d1\u7684\u3002<\/p>\n<h2><a id=\"user-content-\u7a0b\u5e8f\u4f9d\u8d56\" class=\"anchor\" href=\"https:\/\/byy3.com\/go\/?url=https:\/\/github.com\/houtianze\/bypy#%E7%A8%8B%E5%BA%8F%E4%BE%9D%E8%B5%96\" aria-hidden=\"true\" rel=\"nofollow\" ><\/a>\u7a0b\u5e8f\u4f9d\u8d56<\/h2>\n<p><strong>\u91cd\u8981\uff1a\u9700\u8981\u628a\u7cfb\u7edf\u7684\u533a\u57df\u7f16\u7801\u8bbe\u7f6e\u4e3aUTF-8\u3002\uff08\u53c2\u89c1\uff1a<a href=\"https:\/\/byy3.com\/go\/?url=http:\/\/perlgeek.de\/en\/article\/set-up-a-clean-utf8-environment\" rel=\"nofollow\">http:\/\/perlgeek.de\/en\/article\/set-up-a-clean-utf8-environment<\/a>)<\/strong><\/p>\n<h2><a id=\"user-content-\u5b89\u88c5\" class=\"anchor\" href=\"https:\/\/byy3.com\/go\/?url=https:\/\/github.com\/houtianze\/bypy#%E5%AE%89%E8%A3%85\" aria-hidden=\"true\" rel=\"nofollow\" ><\/a>\u5b89\u88c5<\/h2>\n<ul>\n<li>\u901a\u8fc7<code>pip<\/code>\u6765\u5b89\u88c5\uff1a<code>pip install bypy<\/code>\u00a0\uff08\u652f\u6301Python 2.7+, 3.3+)<\/li>\n<li><strong>\u6ce8\u610f<\/strong> \u5982\u679c\u7a0b\u5e8f\u5df2\u66f4\u65b0 \u4f7f\u7528<strong>pip install bypy==1.6.10<\/strong>\u00a0 \u00a0\u5b89\u88c5\u597d\u540e\u4f7f\u7528bypy -V\u67e5\u770b\u7248\u672c\uff01<\/li>\n<\/ul>\n<h2><a id=\"user-content-\u8fd0\u884c\" class=\"anchor\" href=\"https:\/\/byy3.com\/go\/?url=https:\/\/github.com\/houtianze\/bypy#%E8%BF%90%E8%A1%8C\" aria-hidden=\"true\" rel=\"nofollow\" ><\/a>\u8fd0\u884c<\/h2>\n<p>\u5b89\u88c5\u597d\u540e\u9996\u5148\u4f7f\u7528\u547d\u4ee4\u00a0 bypy info\u00a0 \u67e5\u770b\u83b7\u5f97API\u7f51\u9875\u8ba4\u8bc1\u5730\u5740 \uff0c\u7136\u540e\u590d\u5236\u5728\u672c\u5730\u8ba1\u7b97\u673a\u7f51\u9875\u6253\u5f00\uff0c\u6388\u6743\u540e\u5f97\u5230\u4e00\u4e2a<strong>\u9a8c\u8bc1\u7801<\/strong>\uff0c<\/p>\n<p>\u7136\u540e\u590d\u5236\u9a8c\u8bc1\u7801\u56de\u5230\u670d\u52a1\u5668linux\u4e2d\u7c98\u8d34 \u56de\u8f66\u641e\u5b9a\u6388\u6743\u3002<\/p>\n<ul>\n<li>\u4f5c\u4e3a\u72ec\u7acb\u7a0b\u5e8f: \u8fd0\u884c\u00a0<code>bypy<\/code>\u00a0(\u6216\u8005<code>python -m bypy<\/code>\uff0c\u6216\u8005<code>python3 -m bypy<\/code>\uff09\u53ef\u4ee5\u770b\u5230\u547d\u4ee4\u884c\u652f\u6301\u7684\u5168\u90e8\u547d\u4ee4\u548c\u53c2\u6570\u3002<\/li>\n<li>\u4f5c\u4e3a\u4e00\u4e2a\u5305\uff0c\u5728\u4ee3\u7801\u4e2d\u4f7f\u7528:\u00a0<code>import bypy<\/code><\/li>\n<\/ul>\n<p>\u7b80\u5355\u7684\u56fe\u5f62\u754c\u9762\uff1a \u8fd0\u884c\u00a0<code>bypygui<\/code><\/p>\n<h2><a id=\"user-content-\u57fa\u672c\u64cd\u4f5c\" class=\"anchor\" href=\"https:\/\/byy3.com\/go\/?url=https:\/\/github.com\/houtianze\/bypy#%E5%9F%BA%E6%9C%AC%E6%93%8D%E4%BD%9C\" aria-hidden=\"true\" rel=\"nofollow\" ><\/a>\u57fa\u672c\u64cd\u4f5c<\/h2>\n<p>\u663e\u793a\u4f7f\u7528\u5e2e\u52a9\u548c\u6240\u6709\u547d\u4ee4\uff08\u82f1\u6587\uff09:<\/p>\n<div class=\"highlight highlight-source-shell\">\n<pre>bypy<\/pre>\n<\/div>\n<p>\u7b2c\u4e00\u6b21\u8fd0\u884c\u65f6\u9700\u8981\u6388\u6743\uff0c\u53ea\u9700\u8dd1\u4efb\u4f55\u4e00\u4e2a\u547d\u4ee4\uff08\u6bd4\u5982\u00a0<code>bypy info<\/code>\uff09\u7136\u540e\u8ddf\u7740\u8bf4\u660e\uff08\u767b\u9646\u7b49\uff09\u6765\u6388\u6743\u5373\u53ef\u3002\u6388\u6743\u53ea\u9700\u4e00\u6b21\uff0c\u4e00\u65e6\u6210\u529f\uff0c\u4ee5\u540e\u4e0d\u4f1a\u518d\u51fa\u73b0\u6388\u6743\u63d0\u793a.<\/p>\n<p>\u66f4\u8be6\u7ec6\u7684\u4e86\u89e3\u67d0\u4e00\u4e2a\u547d\u4ee4\uff1a<\/p>\n<div class=\"highlight highlight-source-shell\">\n<pre>bypy <span class=\"pl-c1\">help<\/span> <span class=\"pl-k\">&lt;<\/span>command<span class=\"pl-k\">&gt;<\/span><\/pre>\n<\/div>\n<p>\u663e\u793a\u5728\u4e91\u76d8\uff08\u7a0b\u5e8f\u7684\uff09\u6839\u76ee\u5f55\u4e0b\u6587\u4ef6\u5217\u8868\uff1a\u00a0 ***\u6ce8\u610f \u6587\u4ef6\u5939\u662f\u5728\u4f60\u7684\u767e\u5ea6\u4e91\u76d8<strong>\u5e94\u7528\u7a0b\u5e8f\u6587\u4ef6\u5939\u4e0b<\/strong>\u7684bypy\u4e0b\u9762\u9ed8\u8ba4\u4e3a\u7a7a\uff0c\u6240\u4ee5\u628a\u4f60\u8981\u4e0b\u8f7d\u7684\u6587\u4ef6move\u79fb\u52a8\u5230bypy\u8fd9\u4e2a\u6587\u4ef6\u5939\u4e0b\u5728yun.baidu.com\u7f51\u9875\u4e0a\u64cd\u4f5c\uff0c\u53ef\u4ee5\u672c\u5730\u673a\u5668\uff01<\/p>\n<div class=\"highlight highlight-source-shell\">\n<pre><strong>bypy list<\/strong><\/pre>\n<\/div>\n<p>\u628a\u5f53\u524d\u76ee\u5f55\u540c\u6b65\u5230\u4e91\u76d8\uff1a<\/p>\n<div class=\"highlight highlight-source-shell\">\n<pre>bypy syncup<\/pre>\n<\/div>\n<p>or<\/p>\n<div class=\"highlight highlight-source-shell\">\n<pre>bypy upload<\/pre>\n<\/div>\n<p>\u628a\u4e91\u76d8\u5185\u5bb9\u540c\u6b65\u5230\u672c\u5730\u6765\uff1a<\/p>\n<div class=\"highlight highlight-source-shell\">\n<pre>bypy syncdown<\/pre>\n<\/div>\n<p>or<\/p>\n<div class=\"highlight highlight-source-shell\">\n<pre>bypy downdir \/<\/pre>\n<\/div>\n<p><strong>\u6bd4\u8f83\u672c\u5730\u5f53\u524d\u76ee\u5f55\u548c\u4e91\u76d8\uff08\u7a0b\u5e8f\u7684\uff09\u6839\u76ee\u5f55\uff08\u4e2a\u4eba\u8ba4\u4e3a\u975e\u5e38\u6709\u7528\uff09\uff1a<\/strong><\/p>\n<div class=\"highlight highlight-source-shell\">\n<pre>bypy compare<\/pre>\n<\/div>\n<p>\u66f4\u591a\u547d\u4ee4\u548c\u8be6\u7ec6\u89e3\u91ca\u8bf7\u89c1\u8fd0\u884c<code>bypy<\/code>\u7684\u8f93\u51fa\u3002<\/p>\n<h2><a id=\"user-content-\u8c03\u8bd5\" class=\"anchor\" href=\"https:\/\/byy3.com\/go\/?url=https:\/\/github.com\/houtianze\/bypy#%E8%B0%83%E8%AF%95\" aria-hidden=\"true\" rel=\"nofollow\" ><\/a>\u8c03\u8bd5<\/h2>\n<ul>\n<li>\u8fd0\u884c\u65f6\u6dfb\u52a0<code>-v<\/code>\u53c2\u6570\uff0c\u4f1a\u663e\u793a\u8fdb\u5ea6\u8be6\u60c5\u3002<\/li>\n<li>\u8fd0\u884c\u65f6\u6dfb\u52a0<code>-d<\/code>\uff0c\u4f1a\u663e\u793a\u4e00\u4e9b\u8c03\u8bd5\u4fe1\u606f\u3002<\/li>\n<li>\u8fd0\u884c\u65f6\u6dfb\u52a0<code>-ddd<\/code>\uff0c\u8fd8\u4f1a\u4f1a\u663e\u793aHTTP\u901a\u8baf\u4fe1\u606f\uff08<strong>\u8b66\u544a\uff1a\u975e\u5e38\u591a<\/strong>\uff09<\/li>\n<\/ul>\n<h2><a id=\"user-content-\u6574\u5408\u6d4b\u8bd515---30\u5206\u949f\" class=\"anchor\" href=\"https:\/\/byy3.com\/go\/?url=https:\/\/github.com\/houtianze\/bypy#%E6%95%B4%E5%90%88%E6%B5%8B%E8%AF%9515---30%E5%88%86%E9%92%9F\" aria-hidden=\"true\" rel=\"nofollow\" ><\/a>\u6574\u5408\u6d4b\u8bd5\uff0815 - 30\u5206\u949f\uff09<\/h2>\n<ul>\n<li>\u5728\u4e3b\u76ee\u5f55\u4e0b\u8dd1\uff1a<code>python -m bypy.test<\/code><\/li>\n<\/ul>\n<h2><a id=\"user-content-\u76f4\u63a5\u5728python\u7a0b\u5e8f\u4e2d\u8c03\u7528\" class=\"anchor\" href=\"https:\/\/byy3.com\/go\/?url=https:\/\/github.com\/houtianze\/bypy#%E7%9B%B4%E6%8E%A5%E5%9C%A8python%E7%A8%8B%E5%BA%8F%E4%B8%AD%E8%B0%83%E7%94%A8\" aria-hidden=\"true\" rel=\"nofollow\" ><\/a>\u76f4\u63a5\u5728Python\u7a0b\u5e8f\u4e2d\u8c03\u7528<\/h2>\n<div class=\"highlight highlight-source-python\">\n<pre><span class=\"pl-k\">from<\/span> <span class=\"pl-s1\">bypy<\/span> <span class=\"pl-k\">import<\/span> <span class=\"pl-v\">ByPy<\/span>\r\n<span class=\"pl-s1\">bp<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-v\">ByPy<\/span>()\r\n<span class=\"pl-s1\">bp<\/span>.<span class=\"pl-en\">list<\/span>() <span class=\"pl-c\"># or whatever instance methods of ByPy class<\/span><\/pre>\n<\/div>\n<h2><a id=\"user-content-\u7ecf\u9a8c\u5206\u4eab\" class=\"anchor\" href=\"https:\/\/byy3.com\/go\/?url=https:\/\/github.com\/houtianze\/bypy#%E7%BB%8F%E9%AA%8C%E5%88%86%E4%BA%AB\" aria-hidden=\"true\" rel=\"nofollow\" ><\/a>\u7ecf\u9a8c\u5206\u4eab<\/h2>\n<p>\u8bf7\u79fb\u6b65\u81f3<a href=\"https:\/\/byy3.com\/go\/?url=https:\/\/github.com\/houtianze\/bypy\/wiki\" rel=\"nofollow\" >wiki<\/a>\uff0c\u65b9\u4fbf\u5206\u4eab\/\u4ea4\u6d41\u3002<\/p>\n<h2><a id=\"user-content-\u6388\u6743\u8bb8\u53ef\" class=\"anchor\" href=\"https:\/\/byy3.com\/go\/?url=https:\/\/github.com\/houtianze\/bypy#%E6%8E%88%E6%9D%83%E8%AE%B8%E5%8F%AF\" aria-hidden=\"true\" rel=\"nofollow\" ><\/a>\u6388\u6743\u8bb8\u53ef<\/h2>\n<p>\u8bf7\u9605:\u00a0<a href=\"https:\/\/byy3.com\/go\/?url=https:\/\/github.com\/houtianze\/bypy\/blob\/master\/LICENSE\" rel=\"nofollow\" >LICENSE<\/a><\/p>\n<hr \/>\n<p>PCS API\u6587\u6863\uff08\u5df2\u5931\u6548\uff09:\u00a0<a href=\"https:\/\/byy3.com\/go\/?url=http:\/\/developer.baidu.com\/wiki\/index.php?title=docs\/pcs\/rest\/file_data_apis_list\" rel=\"nofollow\">http:\/\/developer.baidu.com\/wiki\/index.php?title=docs\/pcs\/rest\/file_data_apis_list<\/a>\u00a0(\u4ee5\u524d\u4fdd\u5b58\u7684\u79bb\u7ebf\u7248\uff1a\u00a0<a href=\"https:\/\/byy3.com\/go\/?url=https:\/\/github.com\/houtianze\/bypy\/blob\/master\/baidudoc\" rel=\"nofollow\" >baidudoc<\/a>\u00a0directory)<\/p>\n<hr \/>\n<h2><a id=\"user-content-introduction\" class=\"anchor\" href=\"https:\/\/byy3.com\/go\/?url=https:\/\/github.com\/houtianze\/bypy#introduction\" aria-hidden=\"true\" rel=\"nofollow\" ><\/a>Introduction<\/h2>\n<ul>\n<li>Latest feature: Multiprocessing added to directory upload \/ download \/ sync\uff08<code>--processes<\/code>\uff09<\/li>\n<\/ul>\n<hr \/>\n<p>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 storage service under Linux environment (console), e.g. Raspberry Pi.<\/p>\n<p><strong>Due to Baidu PC permission restrictions, this program can only access your\u00a0<code>\/apps\/bypy<\/code>\u00a0directory at Baidu PCS<\/strong><\/p>\n<p><strong>(Fixed)\u00a0<del>It's said the Baidu PCS API won't return more than 1000 items inside a directory ( #285 )\uff0cif this is true\uff0cyou won't be able to see \/ download some files if you have a directory with more than 1000 files on Baidu Cloud<\/del><\/strong><\/p>\n<p><strong>Features: Unicode \/ Chinese support; Retry on failures; Recursive down\/up-load; Directory comparison; Hash caching.<\/strong><\/p>\n<h2><a id=\"user-content-prerequisite\" class=\"anchor\" href=\"https:\/\/byy3.com\/go\/?url=https:\/\/github.com\/houtianze\/bypy#prerequisite\" aria-hidden=\"true\" rel=\"nofollow\" ><\/a>Prerequisite<\/h2>\n<p><strong>Important: You need to set you system locale encoding to UTF-8 for this to work (You can refer here:\u00a0<a href=\"https:\/\/byy3.com\/go\/?url=http:\/\/perlgeek.de\/en\/article\/set-up-a-clean-utf8-environment)\" rel=\"nofollow\">http:\/\/perlgeek.de\/en\/article\/set-up-a-clean-utf8-environment)<\/a><\/strong><\/p>\n<h2><a id=\"user-content-installation\" class=\"anchor\" href=\"https:\/\/byy3.com\/go\/?url=https:\/\/github.com\/houtianze\/bypy#installation\" aria-hidden=\"true\" rel=\"nofollow\" ><\/a>Installation<\/h2>\n<ul>\n<li><code>pip install bypy<\/code>\u00a0(Supports Python 2.7+, 3.3+)<\/li>\n<\/ul>\n<h2><a id=\"user-content-usage\" class=\"anchor\" href=\"https:\/\/byy3.com\/go\/?url=https:\/\/github.com\/houtianze\/bypy#usage\" aria-hidden=\"true\" rel=\"nofollow\" ><\/a>Usage<\/h2>\n<ul>\n<li>Standalone program\n<ul>\n<li>Simply run\u00a0<code>bypy<\/code>\u00a0(or\u00a0<code>python -m bypy<\/code>, or\u00a0<code>python3 -m bypy<\/code>\uff09 You will see all the commands and parameters it supports<\/li>\n<\/ul>\n<\/li>\n<li>As a package in your code\n<ul>\n<li><code>import bypy<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Simple GUI: Run\u00a0<code>bypygui<\/code><\/p>\n<h2><a id=\"user-content-getting-started\" class=\"anchor\" href=\"https:\/\/byy3.com\/go\/?url=https:\/\/github.com\/houtianze\/bypy#getting-started\" aria-hidden=\"true\" rel=\"nofollow\" ><\/a>Getting started<\/h2>\n<p>To get help and a list of available commands:<\/p>\n<div class=\"highlight highlight-source-shell\">\n<pre>bypy<\/pre>\n<\/div>\n<p>To authorize for first time use, run any commands e.g.\u00a0<code>bypy info<\/code>\u00a0and follow the instructions (login etc). This is a one-time requirement only.<\/p>\n<p>To get more details about certain command:<\/p>\n<div class=\"highlight highlight-source-shell\">\n<pre>bypy <span class=\"pl-c1\">help<\/span> <span class=\"pl-k\">&lt;<\/span>command<span class=\"pl-k\">&gt;<\/span><\/pre>\n<\/div>\n<p>List files at (App's) root directory at Baidu PCS:<\/p>\n<div class=\"highlight highlight-source-shell\">\n<pre>bypy list<\/pre>\n<\/div>\n<p>To sync up to the cloud (from the current directory):<\/p>\n<div class=\"highlight highlight-source-shell\">\n<pre>bypy syncup<\/pre>\n<\/div>\n<p>or<\/p>\n<div class=\"highlight highlight-source-shell\">\n<pre>bypy upload<\/pre>\n<\/div>\n<p>To sync down from the cloud (to the current directory):<\/p>\n<div class=\"highlight highlight-source-shell\">\n<pre>bypy syncdown<\/pre>\n<\/div>\n<p>or<\/p>\n<div class=\"highlight highlight-source-shell\">\n<pre>bypy downdir \/<\/pre>\n<\/div>\n<p><strong>To compare the current directory to (App's) root directory at Baidu PCS (which I think is very useful):<\/strong><\/p>\n<div class=\"highlight highlight-source-shell\">\n<pre>bypy compare<\/pre>\n<\/div>\n<p>To get more information about the commands, check the output of\u00a0<code>bypy<\/code>.<\/p>\n<h2><a id=\"user-content-debug\" class=\"anchor\" href=\"https:\/\/byy3.com\/go\/?url=https:\/\/github.com\/houtianze\/bypy#debug\" aria-hidden=\"true\" rel=\"nofollow\" ><\/a>Debug<\/h2>\n<ul>\n<li>Add in\u00a0<code>-v<\/code>\u00a0parameter, it will print more details about the progress.<\/li>\n<li>Add in\u00a0<code>-d<\/code>\u00a0parameter, it will print some debug messages.<\/li>\n<li>Add in\u00a0<code>-ddd<\/code>, it will display HTTP messages as well (<strong>Warning: A lot<\/strong>\uff09<\/li>\n<\/ul>\n<h2><a id=\"user-content-integration-test-15-30min\" class=\"anchor\" href=\"https:\/\/byy3.com\/go\/?url=https:\/\/github.com\/houtianze\/bypy#integration-test-15-30min\" aria-hidden=\"true\" rel=\"nofollow\" ><\/a>Integration Test (15-30min)<\/h2>\n<ul>\n<li>(In the project root directory) run:\u00a0<code>python -m bypy.test<\/code><\/li>\n<\/ul>\n<h2><a id=\"user-content-to-call-from-python-code\" class=\"anchor\" href=\"https:\/\/byy3.com\/go\/?url=https:\/\/github.com\/houtianze\/bypy#to-call-from-python-code\" aria-hidden=\"true\" rel=\"nofollow\" ><\/a>To call from Python code<\/h2>\n<div class=\"highlight highlight-source-python\">\n<pre><span class=\"pl-k\">from<\/span> <span class=\"pl-s1\">bypy<\/span> <span class=\"pl-k\">import<\/span> <span class=\"pl-v\">ByPy<\/span>\r\n<span class=\"pl-s1\">bp<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-v\">ByPy<\/span>()\r\n<span class=\"pl-s1\">bp<\/span>.<span class=\"pl-en\">list<\/span>() <span class=\"pl-c\"># or whatever instance methods of ByPy class<\/span><\/pre>\n<\/div>\n<h2><a id=\"user-content-tips--sharing\" class=\"anchor\" href=\"https:\/\/byy3.com\/go\/?url=https:\/\/github.com\/houtianze\/bypy#tips--sharing\" aria-hidden=\"true\" rel=\"nofollow\" ><\/a>Tips \/ Sharing<\/h2>\n<p>Please go to\u00a0<a href=\"https:\/\/byy3.com\/go\/?url=https:\/\/github.com\/houtianze\/bypy\/wiki\" rel=\"nofollow\" >wiki<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u89e3\u51b3\u65b9\u6848bypy\u4e00\u4e2apython\u5f00\u6e90\u7a0b\u5e8f \u6781\u7b80\u8bf4\u660e \u5b89\u88c5:\u00a0pip install bypy \u8fd0\u884c:\u00a0bypy [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,20],"tags":[26,353,145,352,142,143,144,209],"class_list":["post-620","post","type-post","status-publish","format-standard","hentry","category-linux","category-python","tag-linux","tag-python","tag-142","tag-143","tag-209"],"_links":{"self":[{"href":"https:\/\/byy3.com\/index.php?rest_route=\/wp\/v2\/posts\/620","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/byy3.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/byy3.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/byy3.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/byy3.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=620"}],"version-history":[{"count":0,"href":"https:\/\/byy3.com\/index.php?rest_route=\/wp\/v2\/posts\/620\/revisions"}],"wp:attachment":[{"href":"https:\/\/byy3.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=620"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/byy3.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=620"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/byy3.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=620"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}