Skip to main content

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)

响应结果 img.png

更新日志

  • 0.0.1: 初始化代码包
    • 提供 return_time_helloworld() 函数可供调用

代码包更新步骤

  1. 修改 setup.py 文件
  2. 执行测试命令: python setup.py deploy
  3. 执行打包命令: python3 setup.py sdist
  4. 执行上传命令, 使用 twine 工具: twine upload dist/*

Metadata

Release files for basepkgtest 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for basepkgtest 0.0.3
File Size Uploaded Provenance
basepkgtest-0.0.3.tar.gz 3.0 kB Without provenance Details

Release files / basepkgtest-0.0.3.tar.gz

Download URL basepkgtest-0.0.3.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
31a6a652d0d6700d7e866a5d1e3dcda74df24c627639eb90ba61d0b1266d96b8
BLAKE2b-256 checksum
How to use checksums
3c10b86482c65df8eb440cd109aab38ece0e764f0ecfc53d89abc1eda43d5b05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Security for basepkgtest 0.0.3

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.

Release history Release notifications | RSS feed

This release

0.0.3 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page