pypackhelper


Namepypackhelper JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/Okymi-X/PyPackHelper
SummaryA comprehensive tool for Python package management
upload_time2025-08-18 17:25:47
maintainerNone
docs_urlNone
authorPyPackHelper Team
requires_python>=3.8
licenseMIT
keywords python packaging pypi cli development
VCS
bugtrack_url
requirements typer python-dotenv toml
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PyPackHelper

A comprehensive command-line tool for Python package management that simplifies creating, validating, versioning, and uploading Python packages to PyPI.

## 🚀 Features

- **Package Initialization**: Create new Python packages with proper structure
- **Code Validation**: Automated linting and testing with flake8, black, isort, mypy, and pytest
- **Version Management**: Semantic version bumping (major.minor.patch)
- **Automated Upload**: Upload to PyPI and TestPyPI with twine
- **GitHub Actions**: Generate CI/CD workflows
- **Environment Management**: Support for .env files and credentials

## 📦 Installation

```bash
pip install pypackhelper
```

For development features:
```bash
pip install pypackhelper[dev]
```

For all features:
```bash
pip install pypackhelper[full]
```

## 🛠️ Usage

### Initialize a New Package

```bash
pyph init mypackage --author "Your Name" --email "your@email.com"
```

Options:
- `--path, -p`: Target directory (default: current)
- `--author, -a`: Package author
- `--email, -e`: Author email  
- `--description, -d`: Package description
- `--license, -l`: License type (default: MIT)
- `--github-actions/--no-github-actions`: Generate GitHub Actions workflow

### Validate Package

```bash
pyph validate
```

Options:
- `--path, -p`: Package directory (default: current)
- `--lint-only`: Run only linting checks
- `--test-only`: Run only tests
- `--strict`: Strict validation mode

### Version Management

```bash
# Show current version
pyph version

# Bump version
pyph bump patch    # 1.0.0 -> 1.0.1
pyph bump minor    # 1.0.0 -> 1.1.0  
pyph bump major    # 1.0.0 -> 2.0.0
```

Options:
- `--path, -p`: Package directory (default: current)
- `--dry-run`: Show what would be changed without making changes

### Build Package

```bash
pyph build
```

Options:
- `--path, -p`: Package directory (default: current)
- `--clean/--no-clean`: Clean build directories before building

### Upload to PyPI

```bash
# Upload to TestPyPI (for testing)
pyph upload --test

# Upload to PyPI
pyph upload
```

Options:
- `--test`: Upload to TestPyPI instead of PyPI
- `--path, -p`: Package directory (default: current)
- `--skip-validation`: Skip validation before upload
- `--skip-build`: Skip building package
- `--clean/--no-clean`: Clean build directories after upload

### Clean Build Files

```bash
pyph clean
```

## ⚙️ Configuration

### Environment Variables

Create a `.env` file in your package root:

```env
# PyPI credentials
PYPI_USERNAME=__token__
PYPI_TOKEN=your_pypi_token_here

# TestPyPI credentials  
TESTPYPI_USERNAME=__token__
TESTPYPI_TOKEN=your_testpypi_token_here
```

### Package Structure Created

```
mypackage/
├── mypackage/
│   ├── __init__.py
│   ├── main.py
│   └── cli.py
├── tests/
│   ├── __init__.py
│   ├── conftest.py
│   └── test_main.py
├── .github/
│   └── workflows/
│       └── ci.yml
├── setup.py
├── pyproject.toml
├── requirements.txt
├── requirements-dev.txt
├── README.md
├── LICENSE
├── .gitignore
├── .env.example
└── setup.cfg
```

## 🔧 Development

### Setup Development Environment

```bash
# Clone the repository
git clone https://github.com/Okymi-X/PyPackHelper.git
cd PyPackHelper

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install in development mode
pip install -e ".[dev]"
```

### Running Tests

```bash
pytest
```

### Code Quality

```bash
# Format code
black pyph/
isort pyph/

# Lint code
flake8 pyph/

# Type checking
mypy pyph/
```

## 📋 Requirements

- Python 3.8+
- Dependencies automatically managed

### Optional Dependencies

For full functionality, install:
- `build`: For building packages
- `twine`: For uploading to PyPI
- `flake8`: For linting
- `black`: For code formatting
- `isort`: For import sorting
- `mypy`: For type checking
- `pytest`: For testing

## 🤝 Contributing

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

## 📄 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## 🙏 Acknowledgments

- [Typer](https://typer.tiangolo.com/) for the excellent CLI framework
- [setuptools](https://setuptools.pypa.io/) and [build](https://build.pypa.io/) for packaging
- [twine](https://twine.readthedocs.io/) for PyPI uploads
- The Python packaging community

## 📞 Support

- 🐛 [Report Issues](https://github.com/Okymi-X/PyPackHelper/issues)
- 💡 [Request Features](https://github.com/Okymi-X/PyPackHelper/issues)
- 📖 [Documentation](https://github.com/Okymi-X/PyPackHelper#readme)

---

Made with ❤️ for the Python community

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Okymi-X/PyPackHelper",
    "name": "pypackhelper",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "python, packaging, pypi, cli, development",
    "author": "PyPackHelper Team",
    "author_email": "PyPackHelper Team <contact@pypackhelper.dev>",
    "download_url": "https://files.pythonhosted.org/packages/7b/71/2d9ea361755eca4a24fdb0c689c6b058dc7e66c28d8ef0d9d320b6732611/pypackhelper-0.1.0.tar.gz",
    "platform": null,
    "description": "# PyPackHelper\r\n\r\nA comprehensive command-line tool for Python package management that simplifies creating, validating, versioning, and uploading Python packages to PyPI.\r\n\r\n## \ud83d\ude80 Features\r\n\r\n- **Package Initialization**: Create new Python packages with proper structure\r\n- **Code Validation**: Automated linting and testing with flake8, black, isort, mypy, and pytest\r\n- **Version Management**: Semantic version bumping (major.minor.patch)\r\n- **Automated Upload**: Upload to PyPI and TestPyPI with twine\r\n- **GitHub Actions**: Generate CI/CD workflows\r\n- **Environment Management**: Support for .env files and credentials\r\n\r\n## \ud83d\udce6 Installation\r\n\r\n```bash\r\npip install pypackhelper\r\n```\r\n\r\nFor development features:\r\n```bash\r\npip install pypackhelper[dev]\r\n```\r\n\r\nFor all features:\r\n```bash\r\npip install pypackhelper[full]\r\n```\r\n\r\n## \ud83d\udee0\ufe0f Usage\r\n\r\n### Initialize a New Package\r\n\r\n```bash\r\npyph init mypackage --author \"Your Name\" --email \"your@email.com\"\r\n```\r\n\r\nOptions:\r\n- `--path, -p`: Target directory (default: current)\r\n- `--author, -a`: Package author\r\n- `--email, -e`: Author email  \r\n- `--description, -d`: Package description\r\n- `--license, -l`: License type (default: MIT)\r\n- `--github-actions/--no-github-actions`: Generate GitHub Actions workflow\r\n\r\n### Validate Package\r\n\r\n```bash\r\npyph validate\r\n```\r\n\r\nOptions:\r\n- `--path, -p`: Package directory (default: current)\r\n- `--lint-only`: Run only linting checks\r\n- `--test-only`: Run only tests\r\n- `--strict`: Strict validation mode\r\n\r\n### Version Management\r\n\r\n```bash\r\n# Show current version\r\npyph version\r\n\r\n# Bump version\r\npyph bump patch    # 1.0.0 -> 1.0.1\r\npyph bump minor    # 1.0.0 -> 1.1.0  \r\npyph bump major    # 1.0.0 -> 2.0.0\r\n```\r\n\r\nOptions:\r\n- `--path, -p`: Package directory (default: current)\r\n- `--dry-run`: Show what would be changed without making changes\r\n\r\n### Build Package\r\n\r\n```bash\r\npyph build\r\n```\r\n\r\nOptions:\r\n- `--path, -p`: Package directory (default: current)\r\n- `--clean/--no-clean`: Clean build directories before building\r\n\r\n### Upload to PyPI\r\n\r\n```bash\r\n# Upload to TestPyPI (for testing)\r\npyph upload --test\r\n\r\n# Upload to PyPI\r\npyph upload\r\n```\r\n\r\nOptions:\r\n- `--test`: Upload to TestPyPI instead of PyPI\r\n- `--path, -p`: Package directory (default: current)\r\n- `--skip-validation`: Skip validation before upload\r\n- `--skip-build`: Skip building package\r\n- `--clean/--no-clean`: Clean build directories after upload\r\n\r\n### Clean Build Files\r\n\r\n```bash\r\npyph clean\r\n```\r\n\r\n## \u2699\ufe0f Configuration\r\n\r\n### Environment Variables\r\n\r\nCreate a `.env` file in your package root:\r\n\r\n```env\r\n# PyPI credentials\r\nPYPI_USERNAME=__token__\r\nPYPI_TOKEN=your_pypi_token_here\r\n\r\n# TestPyPI credentials  \r\nTESTPYPI_USERNAME=__token__\r\nTESTPYPI_TOKEN=your_testpypi_token_here\r\n```\r\n\r\n### Package Structure Created\r\n\r\n```\r\nmypackage/\r\n\u251c\u2500\u2500 mypackage/\r\n\u2502   \u251c\u2500\u2500 __init__.py\r\n\u2502   \u251c\u2500\u2500 main.py\r\n\u2502   \u2514\u2500\u2500 cli.py\r\n\u251c\u2500\u2500 tests/\r\n\u2502   \u251c\u2500\u2500 __init__.py\r\n\u2502   \u251c\u2500\u2500 conftest.py\r\n\u2502   \u2514\u2500\u2500 test_main.py\r\n\u251c\u2500\u2500 .github/\r\n\u2502   \u2514\u2500\u2500 workflows/\r\n\u2502       \u2514\u2500\u2500 ci.yml\r\n\u251c\u2500\u2500 setup.py\r\n\u251c\u2500\u2500 pyproject.toml\r\n\u251c\u2500\u2500 requirements.txt\r\n\u251c\u2500\u2500 requirements-dev.txt\r\n\u251c\u2500\u2500 README.md\r\n\u251c\u2500\u2500 LICENSE\r\n\u251c\u2500\u2500 .gitignore\r\n\u251c\u2500\u2500 .env.example\r\n\u2514\u2500\u2500 setup.cfg\r\n```\r\n\r\n## \ud83d\udd27 Development\r\n\r\n### Setup Development Environment\r\n\r\n```bash\r\n# Clone the repository\r\ngit clone https://github.com/Okymi-X/PyPackHelper.git\r\ncd PyPackHelper\r\n\r\n# Create virtual environment\r\npython -m venv venv\r\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\r\n\r\n# Install in development mode\r\npip install -e \".[dev]\"\r\n```\r\n\r\n### Running Tests\r\n\r\n```bash\r\npytest\r\n```\r\n\r\n### Code Quality\r\n\r\n```bash\r\n# Format code\r\nblack pyph/\r\nisort pyph/\r\n\r\n# Lint code\r\nflake8 pyph/\r\n\r\n# Type checking\r\nmypy pyph/\r\n```\r\n\r\n## \ud83d\udccb Requirements\r\n\r\n- Python 3.8+\r\n- Dependencies automatically managed\r\n\r\n### Optional Dependencies\r\n\r\nFor full functionality, install:\r\n- `build`: For building packages\r\n- `twine`: For uploading to PyPI\r\n- `flake8`: For linting\r\n- `black`: For code formatting\r\n- `isort`: For import sorting\r\n- `mypy`: For type checking\r\n- `pytest`: For testing\r\n\r\n## \ud83e\udd1d Contributing\r\n\r\n1. Fork the repository\r\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\r\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\r\n4. Push to the branch (`git push origin feature/amazing-feature`)\r\n5. Open a Pull Request\r\n\r\n## \ud83d\udcc4 License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\n## \ud83d\ude4f Acknowledgments\r\n\r\n- [Typer](https://typer.tiangolo.com/) for the excellent CLI framework\r\n- [setuptools](https://setuptools.pypa.io/) and [build](https://build.pypa.io/) for packaging\r\n- [twine](https://twine.readthedocs.io/) for PyPI uploads\r\n- The Python packaging community\r\n\r\n## \ud83d\udcde Support\r\n\r\n- \ud83d\udc1b [Report Issues](https://github.com/Okymi-X/PyPackHelper/issues)\r\n- \ud83d\udca1 [Request Features](https://github.com/Okymi-X/PyPackHelper/issues)\r\n- \ud83d\udcd6 [Documentation](https://github.com/Okymi-X/PyPackHelper#readme)\r\n\r\n---\r\n\r\nMade with \u2764\ufe0f for the Python community\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A comprehensive tool for Python package management",
    "version": "0.1.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/Okymi-X/PyPackHelper/issues",
        "Documentation": "https://github.com/Okymi-X/PyPackHelper#readme",
        "Homepage": "https://github.com/Okymi-X/PyPackHelper",
        "Repository": "https://github.com/Okymi-X/PyPackHelper.git"
    },
    "split_keywords": [
        "python",
        " packaging",
        " pypi",
        " cli",
        " development"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d524828b66e239db45f1b01bb6cd4261b61d28fe820a6faf624dfd6a236fed48",
                "md5": "5c8ce14ec71905000a641c78c2bba8e3",
                "sha256": "f80d85ca89e7093e5ef94a28a167dea62c2ddc8e8d13795a61d3bd143c292312"
            },
            "downloads": -1,
            "filename": "pypackhelper-0.1.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5c8ce14ec71905000a641c78c2bba8e3",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.8",
            "size": 21916,
            "upload_time": "2025-08-18T17:25:45",
            "upload_time_iso_8601": "2025-08-18T17:25:45.575160Z",
            "url": "https://files.pythonhosted.org/packages/d5/24/828b66e239db45f1b01bb6cd4261b61d28fe820a6faf624dfd6a236fed48/pypackhelper-0.1.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7b712d9ea361755eca4a24fdb0c689c6b058dc7e66c28d8ef0d9d320b6732611",
                "md5": "a2063453cf6218c2e1da09bad2fb2a3c",
                "sha256": "b81483df599da10707c841c480dfe2c8e8057002a12907dc16f94b531e104cda"
            },
            "downloads": -1,
            "filename": "pypackhelper-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a2063453cf6218c2e1da09bad2fb2a3c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 27152,
            "upload_time": "2025-08-18T17:25:47",
            "upload_time_iso_8601": "2025-08-18T17:25:47.277865Z",
            "url": "https://files.pythonhosted.org/packages/7b/71/2d9ea361755eca4a24fdb0c689c6b058dc7e66c28d8ef0d9d320b6732611/pypackhelper-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-18 17:25:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Okymi-X",
    "github_project": "PyPackHelper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "typer",
            "specs": [
                [
                    ">=",
                    "0.9.0"
                ]
            ]
        },
        {
            "name": "python-dotenv",
            "specs": [
                [
                    ">=",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "toml",
            "specs": [
                [
                    ">=",
                    "0.10.2"
                ]
            ]
        }
    ],
    "lcname": "pypackhelper"
}
        
Elapsed time: 0.57581s