Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/farfarfun/fundrive
网盘,支持蓝奏云、OSS、github、gitee
https://github.com/farfarfun/fundrive
baidu baiduyun gitee github lanzou oss pcs python
Last synced: 27 days ago
JSON representation
网盘,支持蓝奏云、OSS、github、gitee
- Host: GitHub
- URL: https://github.com/farfarfun/fundrive
- Owner: farfarfun
- License: apache-2.0
- Created: 2019-11-11T02:10:41.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-08-19T07:30:28.000Z (4 months ago)
- Last Synced: 2024-08-19T13:37:05.867Z (4 months ago)
- Topics: baidu, baiduyun, gitee, github, lanzou, oss, pcs, python
- Language: Python
- Homepage:
- Size: 12.5 MB
- Stars: 28
- Watchers: 1
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-hacking-lists - farfarfun/fundrive - 网盘,支持蓝奏云、OSS、github、gitee (Python)
README
## 1.支持列表
| 序号 | 网盘 | 支持内容 |
| :--: | :--------------- | :------------- |
| 1 | [蓝奏云](#3.1) | 上传/下载/删除 |
| 2 | [OSS](#3.2) | 上传/下载/删除 |
| 3 | [github](#3.3) | 上传/下载/删除 |
| 4 | [gitee](#3.4) | 上传/下载/删除 |
| 5 | [百度网盘](#3.5) | TODO |
| 6 | [阿里云盘](#3.6) | TODO |## 2.安装
```bash
pip install fundrive
```或者直接从 gitHub 安装
```bash
pip install git+https://github.com/farfarfun/fundrive.git
```或者直接从 gitee 安装
```bash
pip install git+https://gitee.com/farfarfun/fundrive.git
```3 使用说明
- 所有的 drive 都是继承基类,实现登录、上传、下载、删除
- 每个 drive 的函数返回没有做统计,使用需注意
- 部分 drive 需要安装额外的库,不装也行,直接使用时会尝试 import,import 失败会自动安装这是基类
```python
class DriveSystem:
def __init__(self, *args, **kwargs):
passdef login(self, *args, **kwargs) -> bool:
raise NotImplementedError()def mkdir(self, path, *args, **kwargs) -> bool:
raise NotImplementedError()def delete(self, *args, **kwargs) -> bool:
raise NotImplementedError()def get_file_list(self, *args, **kwargs) -> List[Dict[str, Any]]:
raise NotImplementedError()def get_dir_list(self, *args, **kwargs) -> List[Dict[str, Any]]:
raise NotImplementedError()def get_file_info(self, *args, **kwargs) -> Dict[str, Any]:
raise NotImplementedError()def get_dir_info(self, *args, **kwargs) -> Dict[str, Any]:
raise NotImplementedError()def download_file(self, dir_path="./cache", overwrite=False, *args, **kwargs) -> bool:
raise NotImplementedError()def download_dir(self, dir_path="./cache", overwrite=False, *args, **kwargs) -> bool:
raise NotImplementedError()def upload_file(self, file_path="./cache", overwrite=False, *args, **kwargs) -> bool:
raise NotImplementedError()def upload_dir(self, dir_path="./cache", overwrite=False, *args, **kwargs) -> bool:
raise NotImplementedError()
```3.1 蓝奏云
# 蓝奏云
额外安装lanzou底层api```bash
pip install git+https://github.com/Leon406/lanzou-gui.git --no-deps
```登录需要额外两个参数
3.2 OSS
额外安装oss的库OSS2```bash
pip install oss2
```登录需要参数
3.3 github
3.4 gitee
3.5 百度网盘
3.6 阿里云盘
#参考
百度云盘的 python-api,[官方 API](https://openapi.baidu.com/wiki/index.php?title=docs/pcs/rest/file_data_apis_list)
蓝奏云的 python-api [参考](https://github.com/zaxtyson/LanZouCloud-API)