A PDM plugin to publish to PyPI

Related tags

Miscellaneouspypipdm
Overview

PDM Publish

ci pypi version code style: black checked with mypy

A PDM plugin to publish to PyPI

NOTE: Consider if you need this over using twine directly

Installation

If you installed pdm via pipx:

pipx inject pdm pdm-publish

or brew:

$(brew --prefix pdm)/libexec/bin/python -m pip install pdm-publish

or pip:

pip install --user pdm-publish

Usage

pdm-publish enables pdm to publish packages to PyPI by wrapping twine internally. For example, to build and publish:

# Using token auth
pdm publish --password token
# To test PyPI using basic auth
pdm publish -r testpypi -u username -P password
# To custom index
pdm publish -r https://custom.index.com/

Full usage:

$ pdm publish --help
Upload artifacts to a remote repository

Usage:

Options:
  -h, --help            show this help message and exit
  -v, --verbose         -v for detailed output and -vv for more detailed
  -g, --global          Use the global project, supply the project root with
                        `-p` option
  -p PROJECT_PATH, --project PROJECT_PATH
                        Specify another path as the project root, which
                        changes the base of pyproject.toml and __pypackages__
  -r REPOSITORY, --repository REPOSITORY
                        The repository name or url to publish the package to
                        [env var: PDM_PUBLISH_REPO]
  -u USERNAME, --username USERNAME
                        The username to access the repository [env var:
                        PDM_PUBLISH_USERNAME]
  -P PASSWORD, --password PASSWORD
                        The password to access the repository [env var:
                        PDM_PUBLISH_PASSWORD]
  --dry-run             Perform all actions except upload the package
  --no-build            Don't build the package before publishing

Configuration

Config Item Description Default Value Available in Project Env var
publish.repo PyPI repo name (pypi/testpypi) or url pypi True PDM_PUBLISH_REPO
publish.username PyPI username __token__ True PDM_PUBLISH_USERNAME
publish.password PyPI password True PDM_PUBLISH_PASSWORD

Links

You might also like...
A simple but flexible plugin system for Python.

PluginBase PluginBase is a module for Python that enables the development of flexible plugin systems in Python. Step 1: from pluginbase import PluginB

Poetry plugin to bundle projects into various formats

Poetry bundle plugin This package is a plugin that allows the bundling of Poetry projects into various formats. Installation The easiest way to instal

Simple card retirement plugin for Anki

Anki Retirement Addon Allow users to suspend, tag, delete, or move cards that reach a specific retirement interval Supports Anki version 2.1.45 Licens

A maubot plugin to invite users to Matrix rooms according to LDAP groups

LDAP Inviter Bot This is a maubot plugin that invites users to Matrix rooms according to their membership in LDAP groups.

Plugin to generate BOM + CPL files for JLCPCB
Plugin to generate BOM + CPL files for JLCPCB

KiCAD JLCPCB tools Plugin to generate all files necessary for JLCPCB board fabrication and assembly Gerber files Excellon files BOM file CPL file Furt

IDA Pro plugin that shows the comments in a database
IDA Pro plugin that shows the comments in a database

ShowComments A Simple IDA Pro plugin that shows the comments in a database Installation Copy the file showcomments.py to the plugins folder under IDA

Poetry workspace plugin for Python monorepos.

poetry-workspace-plugin Poetry workspace plugin for Python monorepos. Inspired by Yarn Workspaces. Adds a new subcommand group, poetry workspace, whic

A plugin for poetry that allows you to execute scripts defined in your pyproject.toml, just like you can in npm or pipenv

poetry-exec-plugin A plugin for poetry that allows you to execute scripts defined in your pyproject.toml, just like you can in npm or pipenv Installat

tox-gh is a tox plugin which helps running tox on GitHub Actions with multiple different Python versions on multiple workers in parallel

tox-gh is a tox plugin which helps running tox on GitHub Actions with multiple different Python versions on multiple workers in parallel. This project is inspired by tox-travis.

Comments
  • Github Action fails due to getpass.py

    Github Action fails due to getpass.py

    When trying to use a Github Action to publish to Pypi.org, I receive the following error:

    Run pdm publish -u __token__ -p ***
    /opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/getpass.py:91: GetPassWarning: Can not control echo on the terminal.
    Password:
      passwd = fallback_getpass(prompt, stream)
    Warning: Password input may be echoed.
     [Abort]: 
    Add '-v' to see the detailed traceback
    Error: Process completed with exit code 1.
    
    opened by garysb 0
  • _Py_HashRandomization_Init fails on windows

    _Py_HashRandomization_Init fails on windows

    Running the generated command manually (without non-interactive, of course) works fine, invoking thru pdm-publish raises the following error,

     - Adding scikit_bio_parasail-0.0.1.dist-info/RECORD
    Built wheel at C:/Users/andre/source/scikit-bio-parasail/dist\scikit_bio_parasail-0.0.1-py3-none-any.whl
    Publish failed
    Fatal Python error: _Py_HashRandomization_Init: failed to get random numbers to initialize Python
    Python runtime state: preinitialized
    
    
    Traceback (most recent call last):
      File "C:\Users\andre\scoop\apps\python\current\lib\runpy.py", line 196, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "C:\Users\andre\scoop\apps\python\current\lib\runpy.py", line 86, in _run_code
        exec(code, run_globals)
      File "C:\Users\andre\scoop\apps\pdm\current\venv\Scripts\pdm.exe\__main__.py", line 7, in <module>
      File "C:\Users\andre\scoop\apps\pdm\1.13.6\venv\lib\site-packages\pdm\core.py", line 233, in main
        return Core().main(args)
      File "C:\Users\andre\scoop\apps\pdm\1.13.6\venv\lib\site-packages\pdm\core.py", line 168, in main
        raise cast(Exception, err).with_traceback(traceback)
      File "C:\Users\andre\scoop\apps\pdm\1.13.6\venv\lib\site-packages\pdm\core.py", line 163, in main
        f(options.project, options)
      File "C:\Users\andre\scoop\apps\pdm\1.13.6\venv\lib\site-packages\pdm_publish\command.py", line 74, in handle
        publisher.publish(
      File "C:\Users\andre\scoop\apps\pdm\1.13.6\venv\lib\site-packages\pdm_publish\core.py", line 49, in publish
        resp.check_returncode()
      File "C:\Users\andre\scoop\apps\python\current\lib\subprocess.py", line 456, in check_returncode
        raise CalledProcessError(self.returncode, self.args, self.stdout,
    subprocess.CalledProcessError: Command '['C:\\Users\\andre\\scoop\\apps\\pdm\\1.13.6\\venv\\Scripts\\python.exe', '-m', 'twine', 'upload', '--non-interactive', '--repository', 'pypi', '--username', '__token__', 'C:\\Users\\andre\\source\\scikit-bio-parasail\\dist\\scikit_bio_parasail-0.0.1-py3-none-any.whl', 'C:\\Users\\andre\\source\\scikit-bio-parasail\\dist\\scikit-bio-parasail-0.0.1.tar.gz']' returned non-zero exit status 1.
    
    
    opened by theAeon 1
Releases(v0.2.1)
Owner
Branch Vincent
Branch Vincent
北大选课网2021年春季验证码识别

北大选课网验证码识别 2021 年春季学期 Powered by Elector Quartet (@Rabbit, @xmcp, @SpiritedAwayCN, @gzz) 数据集描述 最初的数据集为 5130 张人工标记的验证码,之后利用早期训练好的模型在选课网上进行自动验证 (自举),又收集

Rabbit 27 Sep 17, 2022
Msgpack serialization/deserialization library for Python, written in Rust using PyO3 and rust-msgpack. Reboot of orjson. msgpack.org[Python]

ormsgpack ormsgpack is a fast msgpack library for Python. It is a fork/reboot of orjson It serializes faster than msgpack-python and deserializes a bi

Aviram Hassan 139 Dec 30, 2022
Repositório do programa ConstruDelas - Trilha Python - Módulos 1 e 2

ConstruDelas - Introdução ao Python Nome: Visão Geral Bem vinda ao repositório do curso ConstruDelas, módulo de Introdução ao Python. Aqui vamos mante

WoMakersCode 8 Oct 14, 2022
Installer, package manager, build wrapper and version manager for Piccolo

Piccl Installer, package manager, build wrapper and version manager for Piccolo

1 Dec 19, 2021
Allows you to purge all reply comments left by a user on a YouTube channel or video.

YouTube Spammer Purge Allows you to purge all reply comments left by a user on a YouTube channel or video. Purpose Recently, there has been a massive

4.3k Jan 09, 2023
Async timeit - Async version of python's timeit

Async Timeit Replica of default python timeit module with small changes to allow

Raghava G Dhanya 3 Apr 13, 2022
Cylinder volume calculator features the calculations of the volume of a Right /oblique full cylinder

Cylinder-Volume-Calculator Cylinder volume calculator features the calculations of the volume of a Right /oblique full cylinder. Size : 10.5 mb compat

Abhijeet 4 Nov 07, 2022
Python with the scientific stack, compiled to WebAssembly.

Pyodide may be used in any context where you want to run Python inside a web browser.

9.5k Jan 09, 2023
Write complicated anonymous functions other than lambdas in Python.

lambdex allows you to write multi-line anonymous function expression (called a lambdex) in an idiomatic manner.

Xie Jingyi 71 May 19, 2022
Yet another Airflow plugin using CLI command as RESTful api, supports Airflow v2.X.

中文版文档 Airflow Extended API Plugin Airflow Extended API, which export airflow CLI command as REST-ful API to extend the ability of airflow official API

Eric Cao 106 Nov 09, 2022
A demo Piccolo app - a movie database!

PyMDb Welcome to the Python Movie Database! Built using Piccolo, Piccolo Admin, and FastAPI. Created for a presentation given at PyData Global 2021. R

11 Oct 16, 2022
PwnDatas-DB-Project(PDDP)

PwnDatas-DB-Project PwnDatas-DB-Project(PDDP) 安裝依賴: pip3 install pymediawiki 使用: cd /opt git https://github.com/JustYoomoon/PwnDatas-DB-Project.git c

21 Jul 16, 2021
Programmatic interface to Synapse services for Python

A Python client for Sage Bionetworks' Synapse, a collaborative, open-source research platform that allows teams to share data, track analyses, and collaborate

Sage Bionetworks 54 Dec 23, 2022
Modeval (or Modular Eval) is a modular and secure string evaluation library that can be used to create custom parsers or interpreters.

modeval Modeval (or Modular Eval) is a modular and secure string evaluation library that can be used to create custom parsers or interpreters. Basic U

2 Jan 01, 2022
This code can help you with auto update for-TV-advertisements in the store.

Auto-update-files-for-TV-advertisements-in-the-store This code can help you with auto update for-TV-advertisements in the store. It was write for Rasp

Max 2 Feb 20, 2022
management tool for systemd-nspawn containers

nspctl nspctl, management tool for systemd-nspawn containers. Why nspctl? There are different tools for systemd-nspawn containers. You can use native

Emre Eryilmaz 5 Nov 27, 2022
Inacap - Programa para pasar las notas de inacap a una hoja de cálculo rápidamente.

Inacap Programa en python para obtener varios datos académicos desde inacap y subirlos directamente a una hoja de cálculo. Cómo funciona Primero que n

Gabriel Barrientos 0 Jul 28, 2022
Return-Parity-MDP - Towards Return Parity in Markov Decision Processes

Towards Return Parity in Markov Decision Processes Code for the AISTATS 2022 pap

Jianfeng Chi 3 Nov 27, 2022
navigation_commander is a ROS package to command the robot to navigate autonomously to each table for food delivery inside a hotel.

navigation_commander navigation_commander is a ROS package to command the robot to navigate autonomously to each table for food delivery inside a hote

ALEENA LENTIN 9 Nov 08, 2021
ChieriBot,词云API版,用于统计群友说过的怪话

wordCloud_API 词云API版,用于统计群友说过的怪话,基于wordCloud 消息储存在mysql数据库中.数据表结构见table.sql 为啥要做成API:这玩意太吃性能了,如果和Bot放在同一个服务器,可能会影响到bot的正常运行 你服务器性能够用的话就当我在放屁 依赖包 pip i

chinosk 7 Mar 20, 2022