This template provides a complete setup for Python projects with automated GitHub repository creation and PyPI package publishing capabilities.
Project description
Python Project Template with GitHub and PyPI Integration
This template provides a complete setup for Python projects with automated GitHub repository creation and PyPI package publishing capabilities.
Key Features
- Automated GitHub repository setup
- PyPI package publishing workflow
- Code formatting with Black, Ruff, and isort
- Code quality checks with Flake8 and Pyright
- Test coverage with Pytest
- Project archiving functionality
- Comprehensive workflow automation
Core Scripts
prepare_environment.py
The main setup script that:
- Configures project structure
- Sets up GitHub repository
- Installs dependencies
- Creates necessary configuration files
Key components of the script:
- Package management functions
- GitHub repository setup
- Project file generation
- Version control initialization
Configuration Dictionary Structure
The script uses a comprehensive project_info dictionary that contains:
project_info = {
"templates": {
# File templates for pyproject.toml, setup.py, etc.
},
"classifiers": {
# PyPI project classifiers
},
"setup": {
"paths": {
# Project file paths configuration
},
"classifiers": {
# Project-specific classifiers
},
"version": "0.1.1",
"description": "",
"user_config": {
# User information
},
"urls": {
# Project URLs
},
"requirements": [
# Project dependencies
],
"nix_packages": [
# Nix environment packages
],
"required_packages": [
# Essential packages for setup
]
}
}
Other Utility Scripts
- pypi_upload.py: Handles PyPI package versioning and publishing
- create_zip.py: Creates project archives
Getting Started
-
Ensure environment variables are set:
- GITHUB_TOKEN
- REPLIT_TOKEN
- PYPI_TOKEN (for publishing)
-
Run the prepare environment script:
python scripts/prepare_environment.py -
Use the Tools menu in Replit to run workflows for:
- Code formatting
- Testing
- Package publishing
- Project archiving
Project Structure
├── scripts/ # Utility scripts
├── src/ # Source code
├── tests/ # Test files
├── logs/ # Log outputs
├── zip/ # Archive storage
└── assets/ # Project assets
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 gitpypi_3_12-0.1.8.tar.gz.
File metadata
- Download URL: gitpypi_3_12-0.1.8.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d37424a0e471174554ce467c3469383950e9380247b4b924b9bd2ab62c14ed65
|
|
| MD5 |
07f407fd10c95fb80237a0191c52a66c
|
|
| BLAKE2b-256 |
f96b939e5b350c2d503b9a2b7c148a14f8b98ad3bce644509ef61534bacfa537
|
File details
Details for the file GitPyPi_3.12-0.1.8-py3-none-any.whl.
File metadata
- Download URL: GitPyPi_3.12-0.1.8-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee4f599173509cda724716a6d8edf564a36564fae7347675b58e19a09dc44331
|
|
| MD5 |
746954b62eca0a60f13dfd5d19ea5494
|
|
| BLAKE2b-256 |
3e17def11749a29c5c57721c1ae190f6744ff5f4d65fa57f248671133d69e7a6
|