Skip to main content

简介

我的工具

一.上传步骤:

1.生成 dist 目录用于上传

python setup.py sdist bdist_wheel

2.上传包到私有 pypi 源

cat ~/.pypirc
[distutils]
index-servers = pypi local

[pypi]
repository: https://www.python.org/pypi
username = __token__
password = 'xxxxxxxxxxx'

[local]
repository: http://localhost:3141
username: yehaiquan password: 12345678

3.上传到 local 仓库

twine upload dist/* -r local

4.测试是否上传

访问 http://localhost:3141/simple/

5.安装

pip search -i http://localhost:3141 wivw_demo #查找包 
pip install -i http://localhost:3141/simple wivw_demo #安装包 pip
install -U -i http://localhost:3141/simple wivw_demo #安装最新包

6.测试是否安装

import wivw_demo 
from wivw_demo import mytool 
wivw_demo.show()
mytool.mytest()

7.卸载包

pip uninstall wivw-demo

二.上传到 pypi 仓库

1.登陆个人pypi后台(如没有账号需要先注册)

https://pypi.org/manage/projects/

2.创建token.

登陆https://pypi.org/manage/account/,找到api token,添加一个新的token

3.配置token

cat ~/.pypirc
[pypi]
username: __token__
password: pypi-AgEIcHlwaS5vcmcCYxxzI0WuBg-zgyXxBO1r4ZW6hX450jdsw

用户名和密码也可以用自己的个人登陆账号,但不推荐,推荐用token方式验证.

4.上传包到pypi

twine check dist/*
twine upload dist/*

5.安装

pip install wivw-demo

6.测试是否安装

import wivw_demo 
from wivw_demo import mytool 

wivw_demo.show()
mytool.mytest()

7.卸载包

pip uninstall wivw-demo

完毕!

Metadata

Release files for wivw-demo 0.0.9

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

Source distribution (sdist)

Source distribution for wivw-demo 0.0.9
File Size Uploaded Provenance Actions
wivw_demo-0.0.9.tar.gz 2.9 kB Without provenance Details for wivw_demo-0.0.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wivw-demo 0.0.9
File Interpreter ABI Platform Actions
wivw_demo-0.0.9-py3-none-any.whl Python 3 none any Details for wivw_demo-0.0.9-py3-none-any.whl

Total release size: 5.7 kB

Release files / wivw_demo-0.0.9.tar.gz

Download URL wivw_demo-0.0.9.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4b34ecb5098437e74beb78d25410275b26d7a0b10ba59f2e83ce9c50ce397863
BLAKE2b-256 checksum
How to use checksums
54f3e68a9b782c6ce31848c4bb791dd9bfa9abf94a52e886bed578adb60e3392
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.2

Release files / wivw_demo-0.0.9-py3-none-any.whl

Download URL wivw_demo-0.0.9-py3-none-any.whl
Size 2.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1d5efe6abda3ef0db37f3cc7f60092fb432603ffe4f35457526a7b0bc0fd5b07
BLAKE2b-256 checksum
How to use checksums
8ca6cb393bd57c01cf85bdfd21ac1df397c0daf0ff21368402905c3464f22aad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.2

Security for wivw-demo 0.0.9

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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