使用SpiderX模块
1. 在IDE中安装汉化和拼音插件
2. 导入模块并调用函数。
如:
#安装教程
#更新pip
#python -m pip install --upgrade pip
#可以设置pip镜像服务器
#pip config set global.index-url --site https://pypi.tuna.tsinghua.edu.cn/simple
#pip config set global.index-url --site https://pypi.doubanio.com/simple
#自动安装依赖库
#pip install spiderx
#自动安装可选依赖库
#pip install spiderx[all]
from spiderx import sx
# 获取本地IP地址
print(sx.获取_IP信息())
# 保存JSON文件
a = {'a': 1, 'b': 2, 'c': 3}
sx.保存JSON('a.json', a)
# 加载JSON文件
b = sx.加载JSON('a.json')
# 打印JSON文件
sx.打印_JSON(b)
Metadata
Release files for spiderx 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| spiderx-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / spiderx-2.0.0-py3-none-any.whl
| Download URL | spiderx-2.0.0-py3-none-any.whl |
|---|---|
| Size | 117.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
29bfbda01f4be39530f7f3c07bfd94bab15a249f1d72958ba79908c4a181736f
|
|
BLAKE2b-256 checksum How to use checksums |
37950cef4e69e6bb20dde23701e03ad6f8b10f3690dea1ca1767704f2f7dc2ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.19
|