https://github.com/zuidvolt/tomlify
quickly set up Python projects with a pre-configured pyproject.toml
https://github.com/zuidvolt/tomlify
pyproject-toml python python3
Last synced: 3 months ago
JSON representation
quickly set up Python projects with a pre-configured pyproject.toml
- Host: GitHub
- URL: https://github.com/zuidvolt/tomlify
- Owner: ZuidVolt
- License: apache-2.0
- Created: 2025-01-05T15:07:33.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-01-06T01:59:22.000Z (9 months ago)
- Last Synced: 2025-04-01T12:22:38.054Z (6 months ago)
- Topics: pyproject-toml, python, python3
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🛠️ Tomlify
A simple CLI tool to quickly set up Python projects with a pre-configured `pyproject.toml` file.
## 🌟 Features
- Quick setup of `pyproject.toml` with best practices
- Custom template support via command-line options
- Custom output directory support
- Automatic backup of existing configuration files
- Comprehensive error handling and permissions verification
- Pre-configured settings for popular tools:
- Ruff (linting)
- MyPy (type checking)
- PyRight (static type checking)
- coverage (test coverage analysis)
- radon (code complexity analysis)## 📦 Installation
Clone the repository and make the script executable:
```bash
git clone https://github.com/zuidvolt/tomlify.git
cd tomlify
chmod +x tomlify.py
```## 🚀 Usage
Basic usage - creates pyproject.toml in current directory:
```bash
/path/to/tomlify.py
```Using a custom template:
```bash
/path/to/tomlify.py -t /path/to/custom/template.toml
```Specifying an output directory:
```bash
/path/to/tomlify.py -o /path/to/project/directory
```You can also create an alias for the script in your `.bashrc` or `.zshrc` file:
```bash
alias tomlify='/path/to/tomlify.py'
```Command Line Options:
- `-t, --template`: Specify a custom template file path
- `-o, --output`: Specify the output directory for pyproject.tomlThe script will:
1. Verify permissions and file health
2. Create a new `pyproject.toml` if none exists
3. Prompt for confirmation before overwriting an existing file
4. Automatically create a backup of any existing configuration## 📝 License
This project is licensed under the Apache License, Version 2.0 with important additional terms, including specific commercial use conditions. Users are strongly advised to read the full [LICENSE](LICENSE) file carefully before using, modifying, or distributing this work. The additional terms contain crucial information about liability, data collection, indemnification, and commercial usage requirements that may significantly affect your rights and obligations.
## 🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.