Skip to main content

a template for build python package to upload pypi repository bu using pdm

Project description

pypi_pdm_template

a template for build python package to upload pypi repository bu using pdm

init project

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

pdm init
pdm config --local  pypi.url "https://pypi.tuna.tsinghua.edu.cn/simple"
# pdm config --local pypi.url "https://test.pypi.org/simple"
# pdm config pypi.url https://pypi.tuna.tsinghua.edu.cn/simple
# pdm config pypi.extra.url "https://extra.pypi.org/simple"
pdm config --local pypi.extra.url "https://test.pypi.org/simple"

pdm add -dG test pytest pytest-cov
pdm add -dG lint pylint flake8 mypy
pdm add -dG format yapf isort black
pdm add -dG docs 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

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.password "my-pypi-token"

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

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

pypi_pdm_template-0.1.6.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.

pypi_pdm_template-0.1.6-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file pypi_pdm_template-0.1.6.tar.gz.

File metadata

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

File hashes

Hashes for pypi_pdm_template-0.1.6.tar.gz
Algorithm Hash digest
SHA256 c1a6bf86a19e022bfdc01e2354f9d1c110f5d368aa678ac486624216e3c6703b
MD5 f71d412d332ecf2f2278d552076861a5
BLAKE2b-256 c9ebb3eca39f4b5431f0c7aa300b027b567872562ef025f55c88fb76ee0e6845

See more details on using hashes here.

File details

Details for the file pypi_pdm_template-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for pypi_pdm_template-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a57c62e8705ea38cdffed55e34578a394cced565e71c5269be0ab84127895620
MD5 097133d7fd371d6fc9d71a7a8fc51f9d
BLAKE2b-256 462bbf14a400ff515abfae366afefde3e17a2ad00d795815c295cb77c59660ae

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