Skip to main content

A python package template to upload to pypi

Project description

pptg

python package template for publish to pypi

mkdir pptg
cd pptg
pdm init

init project

pip install pdm --upgrade
pipx install pdm --upgrade

pdm init
pdm run python -m ensurepip
pdm run python.exe -m pip install --upgrade pip

pdm add -dG test pytest pytest-cov pytest-mock coverage
pdm add -dG lint ruff mypy
pdm add -dG fmt ruff
pdm add -dG docs mkdocs
pdm add -dG all pytest pytest-cov pytest-mock coverage ruff mypy mkdocs
pdm plugin add pdm-publish

pdm list
pdm list --graph
pdm list pytest --graph

# 更新所有的 dev 依赖
pdm update -d

# 更新 dev 依赖下某个分组的某个包
pdm update -dG test pytest

如果你的依赖包有设置分组,还可以指定分组进行更新

pdm update -G format -G docs
也可以指定分组更新分组里的某个包

pdm update -G format yapf

init existed project

pdm install
pdm run python -m ensurepip
pdm run python.exe -m pip install --upgrade pip

publish package

config_path: "C:\Users\lgf\AppData\Local\pdm\pdm\config.toml"

pdm config repository.pypi.username "__token__"
pdm config repository.pypi.password "my-pypi-token"

pdm config repository.testpypi.username "__token__"
pdm config repository.testpypi.url "https://test.pypi.org/legacy/"
pdm config repository.testpypi.password "my-testpypi-token"

pdm config repository.company.url "https://pypi.company.org/legacy/"
pdm config repository.company.ca_certs "/path/to/custom-cacerts.pem"

pdm config -d repository.testpypi.username
pdm config -d repository.testpypi.username
pdm config -d repository.testpypi.username

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

pptg-0.0.1.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

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

pptg-0.0.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file pptg-0.0.1.tar.gz.

File metadata

  • Download URL: pptg-0.0.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for pptg-0.0.1.tar.gz
Algorithm Hash digest
SHA256 276d305bb292f774fa4d5490e7e4f3118a15a745c465ca100ced67fe5c86ecb9
MD5 eddbcae94514bd32ba9dd5774f4475d4
BLAKE2b-256 86392f0e04550e6d878e7692f10da36fdc7e8fd8fe056bef11541e35e9822056

See more details on using hashes here.

File details

Details for the file pptg-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pptg-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for pptg-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0630e1efe30f21c7ec9da99cfef194095e340e7d62e0a974f0099c56d3676868
MD5 f9d36bd55a3ca5c5f4d281d5965cee7d
BLAKE2b-256 7af8c010711a8f309ec5f20ce4d6598ff2ba27e0220a5c9b47f121197883ca35

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