介绍
PyNAS是一个以Python的Updog的库为基础,制作而来的库 ###安装 1. pip安装(推荐) pip install PyNAS 2. 源码安装(推荐) Github:
git clone https://github.com/WindowsRegedit/PyNAS.git cd PyNAS python setup.py install
Gitee:
git clone https://gitee.com/shwufan/nas.git cd nas python setup.py install
安装包安装
从https://github.com/WindowsRegedit/PyNAS/releases或https://gitee.com/shwufan/nas/releases下载安装包 然后自行安装......
easy_install安装(不推荐)(即将弃用) easy_install PyNAS
用法
GUI窗口启动:
1. nas-gui 2. python -m PyNAS
命令行启动
usage: nas [-h] [-d DIRECTORY] [-p PORT] [-usr USERNAME [USERNAME ...]] [-pwd PASSWORD [PASSWORD ...]] [-v]
[-host HOST] [-c CONFIG] [-f] [-fp FTP_PORT] [-se SECRET] [-s] [-st SSL_TYPE] [-ce CERT] [-k KEY]
nas服务器启动工具
选择性参数:
-h, --help 显示帮助信息
-d DIRECTORY, --directory DIRECTORY
根目录,默认当前路径
-p PORT, --port PORT 服务端口,默认为80
-usr USERNAME [USERNAME ...], --username USERNAME [USERNAME ...]
用户名列表,默认为admin
-pwd PASSWORD [PASSWORD ...], --password PASSWORD [PASSWORD ...]
密码列表(注意要和用户名列表相同长度),默认为admin
-v, --version Python NAS 版本
-host HOST, --host HOST
服务IP,默认为0.0.0.0
-c CONFIG, --config CONFIG
配置文件位置,默认没有,注意此文件会覆盖所有命令行配置
-f, --ftp 是否开启FTP服务(默认关闭)
-fp FTP_PORT, --ftp_port FTP_PORT
FTP服务开启端口(当-f被指定时)(默认2121)
-se SECRET, --secret SECRET
运行网盘时的加密字符串(默认有的)
-s, --ssl 是否开启SSL(默认关闭)
-st SSL_TYPE, --ssl_type SSL_TYPE
在开启SSL的情况下使用哪种方式(自动/手动)自动的话参数里加auto,手动的话参数里加custom(默认自动)
-ce CERT, --cert CERT
在选择手动并开启SSL的情况下使用的证书(比如cert.pem)
-k KEY, --key KEY 在选择手动并开启SSL的情况下使用的密钥(比如key.pem)
配置文件同理(注意是json格式,并且要用全拼)。
例如:
一个叫做conf.json的文件:
{"key": "1234567", "ssl_type": "auto"}
PyNAS 2022.4.15版本更新内容
使用装饰器优化GUI
PyNAS 2022.4.15版本已知问题
在某些设备上路径的第一个字符有可能会丢失(求pr)
Metadata
Release files for PyNAS 2022.4.15
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| PyNAS-2022.4.15-py3.9.egg | Legacy Egg format | - | - | Details |
| PyNAS-2022.4.15-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.8 MB
Release files / PyNAS-2022.4.15-py3.9.egg
| Download URL | PyNAS-2022.4.15-py3.9.egg |
|---|---|
| Size | 4.4 MB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
88520eed55a856e2158d52dd3f5b044e07c99cb71bdea797695c379cae0b2818
|
|
BLAKE2b-256 checksum How to use checksums |
757e9b9df80c288a22a11fe80491aba15efe1996bc37ea0e93bca645e533b524
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.9
|
Release files / PyNAS-2022.4.15-py3-none-any.whl
| Download URL | PyNAS-2022.4.15-py3-none-any.whl |
|---|---|
| Size | 4.4 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
589493bb5057131b4dd6c76c6dcc19869a9f1c2fb64f86d1f1223d0aa6fdb859
|
|
BLAKE2b-256 checksum How to use checksums |
6d71979e7447c63ed20375190ddbfde275b78d9d553cf71701c162a0bf1bc67e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.9
|
Security for PyNAS 2022.4.15
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.