Skip to main content

A friendly CLI tool to check and publish Python packages to TestPyPI/PyPI

Project description

KX-Publish-PyPI Logo

๐Ÿš€ KX-Publish-PyPI

The Professional CLI Tool for Python Package Publishing

PyPI version Python 3.9+ License: MIT Build Status GitHub stars

โšก Publish Python packages to PyPI in under 30 seconds! โšก

Version 1.0.0 | Author: ABUELTAYEF Khader | Python 3.9+


๐ŸŽฏ Why Choose KX-Publish-PyPI?

Feature KX-Publish-PyPI Traditional Methods
Setup Time โšก 30 seconds โฐ 30+ minutes
Security ๐Ÿ” System keyring ๐Ÿ“ Plain text files
User Experience ๐ŸŽจ Rich CLI + Progress bars ๐Ÿ“Ÿ Basic terminal output
Error Handling ๐Ÿ›ก๏ธ Smart validation โŒ Manual debugging
Version Management ๐Ÿ“ˆ Intelligent bumping ๐Ÿ”ข Manual editing
Build Backend Support ๐Ÿ› ๏ธ All modern backends โš™๏ธ Limited support

๐Ÿ’ป Installation

โšก Quick Install

pip install kx-publish-pypi

โœ… Verify Installation

kx-publish-pypi --version

๐ŸŽฌ Installation Demo

Installation & Version Check Demo

๐Ÿ’ป Account Setup & Token Generation

๐Ÿ”‘ Get Started with PyPI Publishing

1. Create PyPI Account

  1. ๐ŸŒ Visit pypi.org
  2. ๐Ÿ“ Click "Register" in the top right
  3. โœ‰๏ธ Fill out the registration form
  4. โœ… Verify your email address

2. Create TestPyPI Account

  1. ๐ŸŒ Visit test.pypi.org
  2. ๐Ÿ“ Click "Register" in the top right
  3. โœ‰๏ธ Fill out the registration form
  4. โœ… Verify your email address

3. Generate API Tokens

For PyPI Production:

  1. ๐Ÿ”‘ Log in to pypi.org
  2. โš™๏ธ Go to Account Settings โ†’ API tokens
  3. โž• Click "Add API token"
  4. ๐Ÿท๏ธ Give it a name (e.g., "kx-publish-pypi")
  5. ๐Ÿ’พ Copy & Save the token (you won't see it again!)

For TestPyPI:

  1. ๐Ÿ”‘ Log in to test.pypi.org
  2. โš™๏ธ Go to Account Settings โ†’ API tokens
  3. โž• Click "Add API token"
  4. ๐Ÿท๏ธ Give it a name (e.g., "kx-publish-pypi-test")
  5. ๐Ÿ’พ Copy & Save the token

4. Store Tokens Securely

Use the CLI to store your tokens securely:

kx-publish-pypi setup-tokens

This will prompt you to enter your TestPyPI and PyPI tokens, which will be stored in your system's keyring.

๐Ÿ’ก Pro Tip: You can also store tokens directly during the guided workflow:

kx-publish-pypi run

๐Ÿš€ Quick Start

Choose Your Publishing Journey

๐ŸŽฏ Option 1: Complete Guided Workflow (Recommended)

kx-publish-pypi run
โœจ One command handles everything: checks, tokens, version bump, build, and publish

๐Ÿ› ๏ธ Option 2: Individual Commands

# ๐Ÿ” Pre-flight check your package
kx-publish-pypi check

# ๐Ÿ” Setup API tokens securely
kx-publish-pypi setup-tokens

# ๐Ÿ“ˆ Bump version (patch/minor/major)
kx-publish-pypi bump patch

# ๐Ÿงช Publish to TestPyPI first
kx-publish-pypi publish-test

# ๐Ÿš€ Publish to production PyPI
kx-publish-pypi publish-prod

โœจ Key Features

๐ŸŽจ Rich Interface Rich, colorful output with progress bars
๐Ÿ” Smart Pre-checks Validates package structure and configuration
๐Ÿ” Secure Token Storage Uses system keyring for API tokens
๐Ÿ“ฆ Enhanced Version Detection Supports all modern Python build backends
๐Ÿ”ฅ Interactive Workflow Guided experience from check to publish
๐Ÿ“ˆ Version Management Intelligent version bumping
๐Ÿ› ๏ธ Build Integration Works with setuptools, flit, hatchling, etc.

๐Ÿ—๏ธ Supported Build Backends

Backend Status Version Detection
setuptools โœ… Full Support __version__ files
poetry โœ… Full Support pyproject.toml
flit โœ… Full Support pyproject.toml
hatchling โœ… Full Support pyproject.toml
pdm โœ… Full Support pyproject.toml
scikit-build โœ… Full Support Custom detection

๐Ÿš€ Programmatic API

from kx_publish_pypi import detect_package_version
from pathlib import Path

# Enhanced version detection
result = detect_package_version(Path("."))
if result.version_info:
    print(f"๐Ÿ“ฆ Version: {result.version_info.version}")
    print(f"๐Ÿ”ง Method: {result.version_info.method}")

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guide for details.

๐Ÿ› Found a Bug?


๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐ŸŒ Connect with Us

๐Ÿš€ Powered by KhaderX | ๐Ÿ‘จโ€๐Ÿ’ป Founder: ABUELTAYEF Khader

GitHub Website PyPI

โญ If you find this tool useful, please star this repo!

GitHub stars
KX-Publish-PyPI Logo

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

kx_publish_pypi-1.0.1.tar.gz (27.0 kB view details)

Uploaded Source

Built Distribution

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

kx_publish_pypi-1.0.1-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

Details for the file kx_publish_pypi-1.0.1.tar.gz.

File metadata

  • Download URL: kx_publish_pypi-1.0.1.tar.gz
  • Upload date:
  • Size: 27.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for kx_publish_pypi-1.0.1.tar.gz
Algorithm Hash digest
SHA256 53d9a945fe798e555fb905748c7ca1f5ab69b76bd633cca0acdcf9a134c44c3c
MD5 830078230e3af1cf5a8fb27934910df9
BLAKE2b-256 79885353529fb9f4747d080f833c2b349c9146ba89c60addf4445265201a464b

See more details on using hashes here.

File details

Details for the file kx_publish_pypi-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for kx_publish_pypi-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 11c89494dee2c317ac9fcbae77dfb147b7cc10ec2251e22a09804e79a6b5636b
MD5 c5dd0cfeaa2b274e2f673aebc499a188
BLAKE2b-256 1001ec59d3915c4ab5322da75b5e408eaa7a3670574c6f1808c4dbaf58bd2f06

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