ingrunTools
JsonToolsDjango
适配 django 的 http 返回 json 数据
from ingrunTools.JsonToolsDjango import get_user_info, get_user_info
# get_json_models(ser, data, code, msg)
# 栗子:
class get_user_info(APIView):
user = User.object.get(pk=1)
return get_json_models(UserSerializer, user, 1, '查询用户信息成功')
# {'code':1, msg: '查询用户信息成功', data: {'id':1, 'username': 'ingrun'} }
# get_json_success(msg)
# 栗子:
class get_user_info(APIView):
user = User.object.get(pk=1)
return get_json_success('查询用户信息成功')
# {'code':1, msg: '查询用户信息成功', data: '' }
RandomTools
生成随机数的工具
# get_random_list(max, length, min) 返回一个包含随机不重复整数的列表
# get_random_data_list(li, length) 随机返回一个列表的一部分 不重复
# 栗子:
a = get_random_list(10, 5, -10)
print(a)
print(get_random_data_list(a, 3))
# [10, -1, 9, 0, -5]
# [-1, 10, 9]
Metadata
Release files for ingrunTools 1.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ingrunTools-1.0.6.tar.gz | 3.4 kB | Without provenance | Details for ingrunTools-1.0.6.tar.gz |
Release files / ingrunTools-1.0.6.tar.gz
| Download URL | ingrunTools-1.0.6.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bfaf34494b6a7969d84343749e1a8b14bf834dd4d1e67f11504761495fe12d69
|
|
BLAKE2b-256 checksum How to use checksums |
01a2700acd6aebdef63df3259394034d8d367447c72d0b3077586978cb170726
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.6
|
Security for ingrunTools 1.0.6
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.