Network Security Automation Toolkit
Project description
fkin_anfu
安全服务效率工具
usage
cd fkin_anfu
python -m venv .venv
source .venv/bin/activate
依赖安装
pip install pip-tools
# 生成生产依赖
pip-compile requirements.in --output-file=requirements.txt
# 生成开发依赖(含测试工具)
pip-compile requirements-dev.in --output-file=requirements-dev.txt
pip install -r requirements.txt
pip install -r requirements-dev.txt
提交代码
使用pre-commit做代码风格检查, 已封装为_shortcut_action.sh简便执行;
# 安装1次
pip install pre-commit
pre-commit install
# 手动触发check
pre-commit run --all-files
git diff # 确认无自动修改残留
# 手动添加文件修改
git add .
git commit -m "fix(XXXX): code quality passed by pre-commit"
# 手动执行test
pytest
pytest tests/utils/test_log_utils.py
#维护VERSION与CHANGELOG
cat fkin_anfu/__init__.py | grep -i '__version__'
cat pyproject.toml | grep -i 'version'
cat CHANGELOG.md
build pip 包
# 安装build、package工具,只需要安装一次
pip install build twine
# 确保清理旧的构建缓存
rm -rf dist/ build/ *.egg-info
# 执行build
python -m build
上传pip包
先创建PyPi的配置文件,提供API_TOKEN,只需提供一次
touch ~/.pypirc
#like this:
[pypi]
username = __token__
password = pypi-Abcd....p
# 正式上传pip包
python -m twine upload dist/*
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
fkin_anfu-0.4.2.tar.gz
(33.6 kB
view details)
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
fkin_anfu-0.4.2-py3-none-any.whl
(41.6 kB
view details)
File details
Details for the file fkin_anfu-0.4.2.tar.gz.
File metadata
- Download URL: fkin_anfu-0.4.2.tar.gz
- Upload date:
- Size: 33.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcb7b3728ce3157fb119e021dc3bb037c1d20a883a845632eb73ed4071ed21e4
|
|
| MD5 |
e10530ab6320d406d0fac2dcbf274756
|
|
| BLAKE2b-256 |
588acf8fe20e28b00e17bde82a859985b1cea0a9d2c3607fa5e7ac992a7eb6f9
|
File details
Details for the file fkin_anfu-0.4.2-py3-none-any.whl.
File metadata
- Download URL: fkin_anfu-0.4.2-py3-none-any.whl
- Upload date:
- Size: 41.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79cd25cfd6769f7812c3d421d578f9717d09412e0d0c29685edc13f545a5688e
|
|
| MD5 |
20c86063eff867bf0c6cc1b5624e83d4
|
|
| BLAKE2b-256 |
b9a81b8f9b9e3bbd32876f82729af4c9a2d0c86c4a1172aa5ad21610fcda992f
|