Skip to main content

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

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


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.3.0.tar.gz (24.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fkin_anfu-0.3.0-py3-none-any.whl (27.9 kB view details)

Uploaded Python 3

File details

Details for the file fkin_anfu-0.3.0.tar.gz.

File metadata

  • Download URL: fkin_anfu-0.3.0.tar.gz
  • Upload date:
  • Size: 24.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for fkin_anfu-0.3.0.tar.gz
Algorithm Hash digest
SHA256 f7de0003ff954eca6ce88e2443017666f753588cf6fda64e63647f27f6f85664
MD5 c0a70594e5e1fa7a266c28dbcf4e5543
BLAKE2b-256 f77cd177a7aa99170abf91932e0f93826ee74d68e579db7923f2dd2bc96e3551

See more details on using hashes here.

File details

Details for the file fkin_anfu-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: fkin_anfu-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 27.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for fkin_anfu-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 806f342a40cb50e2960f31384aa4cd0ed7b7a412898d0cd695d37c8e4b0d4d96
MD5 da9e6e520cce78966cc86d55c78f5b6d
BLAKE2b-256 24331ca0bb8ae9f3298f0666edf65fc44007aa79f0279a887042724f88232350

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page