A friendly CLI tool to check and publish Python packages to TestPyPI/PyPI
Project description
KX-Publish-PyPI
The Professional CLI Tool for Python Package Publishing
โก Publish Python packages to PyPI in under 30 seconds! โก
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
๐ป Account Setup & Token Generation
๐ Get Started with PyPI Publishing
1. Create PyPI Account
- ๐ Visit pypi.org
- ๐ Click "Register" in the top right
- โ๏ธ Fill out the registration form
- โ Verify your email address
2. Create TestPyPI Account
- ๐ Visit test.pypi.org
- ๐ Click "Register" in the top right
- โ๏ธ Fill out the registration form
- โ Verify your email address
3. Generate API Tokens
For PyPI Production:
- ๐ Log in to pypi.org
- โ๏ธ Go to Account Settings โ API tokens
- โ Click "Add API token"
- ๐ท๏ธ Give it a name (e.g., "kx-publish-pypi")
- ๐พ Copy & Save the token (you won't see it again!)
For TestPyPI:
- ๐ Log in to test.pypi.org
- โ๏ธ Go to Account Settings โ API tokens
- โ Click "Add API token"
- ๐ท๏ธ Give it a name (e.g., "kx-publish-pypi-test")
- ๐พ 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
๐ ๏ธ 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?
- ๐ Open an Issue
- ๐ก Suggest a Feature
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Connect with Us
๐ Powered by KhaderX | ๐จโ๐ป Founder: ABUELTAYEF Khader
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kx_publish_pypi-1.0.3.tar.gz.
File metadata
- Download URL: kx_publish_pypi-1.0.3.tar.gz
- Upload date:
- Size: 26.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae018aa829e3b9e273a2a22f0866e9a2f43c716c75d75e6501bad7e9aaa2b46a
|
|
| MD5 |
25f14ea35d90d5c97efd68fc21ed9057
|
|
| BLAKE2b-256 |
afbe32a6118eec7dad312ead02185de6135f72ab53d4ad5b7f44f9770a6c6c26
|
File details
Details for the file kx_publish_pypi-1.0.3-py3-none-any.whl.
File metadata
- Download URL: kx_publish_pypi-1.0.3-py3-none-any.whl
- Upload date:
- Size: 26.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec8b231925de7f5d6c8409998b7fe433cda693e7d0e4adc424fce43b9d5a039b
|
|
| MD5 |
84e789db4e92751aa4a34cf6e4908560
|
|
| BLAKE2b-256 |
4f4daa6a19ad249b41b2edd99594081e6efb19ad8ecbc0b8259a33c887dccc51
|