Skip to main content

🛠️ Tools Module Guide

This page is currently only available in Chinese. Please switch to 简体中文 for the full content.

🛠️ Tools Module Guide

The Tools module provides 10+ everyday utilities, including translation, QR code, password generation, etc.

Core Scenarios

Translation

import office
result = office.tools.transtools(to_lang='en', content='你好,世界!')
print(result) # Hello, World!

Generate QR Code

office.tools.qrcodetools(
url='https://www.python-office.com',
output='./qrcode.png'
)

Generate Random Password

password = office.tools.passwordtools(len=16)

URL to IP

ip = office.tools.url2ip(url='www.baidu.com')

Weather / Network Speed Test / WiFi Password

office.tools.weather()
office.tools.net_speed_test()
office.tools.pwd4wifi(len_pwd=8)

AI Article Generation

office.tools.create_article(theme='Python Office Automation', line_num=200)

Full API see Tools API Reference

AI 办公效率课
35 讲 AI 自动化办公实战课用 Python + AI 处理 Excel、Word、PDF、邮件等办公场景。
去学习