pysak 是一个简单、强大、干净的python公共函数库。
Project description
🍉 pysak 是一个简单、强大、干净的python公共函数库。
安装
依赖库
pip install -r requirements.txt -i https://pypi.douban.com/simple/
快速上手
导入
import pysak as sak
API
basic
1、json转dict
2、dict转json
file
1、dict存入本地json文件
2、json文件内容转dict
3、将字符串存入本地文件
4、移除某个目录下特定文件类型的文件名前缀(默认所有类型文件)
img
1、保存远程URL图片到本地
path
1、检测目录/文件是否存在
2、创建目录(若路径不存在,则递归创建,若存在则不执行)
time
1、获取当前时刻指定长度的时间戳 10位~17位
2、获取当前 DateTime(默认format="%Y-%m-%d %H:%M:%S")
user_agent
1、获取随机UserAgent
许可证
MIT
一些小技巧
pip指定源安装
#阿里源
pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
#豆瓣
pip install -r requirements.txt -i https://pypi.douban.com/simple/
#清华大学
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/
导出当前项目依赖
pip freeze > requirements.txt
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pysak-0.2.0.tar.gz.
File metadata
- Download URL: pysak-0.2.0.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec82a4f78c6f84bbaaeaf0e72caf40373fd736856fb08386d62b289f11b73cf5
|
|
| MD5 |
778dd5131abaddb015cd999fad35b80d
|
|
| BLAKE2b-256 |
6704c6fcffc29f6254bfb493f3782cfa0dfa6ae18ec2ee475acc7a60153a0bc6
|
File details
Details for the file pysak-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pysak-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b73e3d9552f23976f54fe572c52dbec3ddb241e7fcf18967a7f463bf88e847b
|
|
| MD5 |
a361213ac6e624eef0f6efb3cf190813
|
|
| BLAKE2b-256 |
2935408db29b57fc8b9c3c328bcdcef984604dd62897f2d7ab8c0b80030275cf
|