一个 lg 上传的测试代码包, 可以被其他任何人进行引入使用。
Project description
py-base-pkg 包描述
- 作者是:LG。一个 lg 上传的测试代码包, 可以被其他任何人进行引入使用。
- 支持系统:支持多个操作系统进行使用, 如: windows, linux, mac 等等。
示例代码
# This is a sample Python script.
import time
def print_hi(name):
# Use a breakpoint in the code line below to debug your script.
print(f'Hi, 我的 LG 基础包代码 print_hi 函数 {name}') # Press Ctrl+F8 to toggle the breakpoint.
def return_time_helloworld() -> str:
'''
定义函数, 用于生成与当前时间相关的字符串, 如返回: '2026-02-21 20:16:16 hello world.'
:return:
'''
return time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) + ' hello world.'
if __name__ == '__main__':
print_hi('lgd')
s = return_time_helloworld()
print(s)
响应结果
更新日志
- 0.0.1: 初始化代码包
- 提供
return_time_helloworld()函数可供调用
- 提供
代码包更新步骤
- 修改
setup.py文件 - 执行测试命令:
python setup.py deploy - 执行打包命令:
python3 setup.py sdist - 执行上传命令, 使用
twine工具: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
basepkgtest-0.0.2.tar.gz
(3.0 kB
view details)
File details
Details for the file basepkgtest-0.0.2.tar.gz.
File metadata
- Download URL: basepkgtest-0.0.2.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8344baca28970ad22e7700034f343b489f975d23aa0a1c28c97966e366282cd6
|
|
| MD5 |
72242d58df34fc2bfabd3657b8c3a597
|
|
| BLAKE2b-256 |
99aacfcefb02fb673fedf3ff5b15b05cba26df11115b1ba4fdb167f58d17181b
|