Metadata-Version: 2.4
Name: versupy
Version: 0.1.0
Summary: A Python library for creating and managing tournament brackets
Author: Elijah Wilts
License: MIT
Project-URL: Homepage, https://github.com/yourusername/versupy
Project-URL: Bug Reports, https://github.com/yourusername/versupy/issues
Project-URL: Source, https://github.com/yourusername/versupy
Keywords: tournament,bracket,competition,sports,gaming
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Games/Entertainment
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Dynamic: license-file

# VersuPy

A comprehensive Python library for creating and managing tournament brackets with automated match handling.

## Features

- 🏆 **Multiple Tournament Formats**: Single elimination, double elimination, round robin, and Swiss system
- 🎯 **Clean API**: Easy-to-use interface for tournament management
- 📊 **Result Tracking**: Comprehensive match and tournament result tracking
- 🧪 **Well Tested**: Extensive test coverage for all tournament formats
- 🔧 **Type Safe**: Full type hint support for better development experience

## Installation

```bash
pip install versupy
```

## Quick Start

```python
from versupy import Tournament

# Create a single elimination tournament
competitors = ["Alice", "Bob", "Charlie", "David"]
tournament = Tournament(competitors, style="single")

# Get current round matches
matches = tournament.get_current_round_matches()

# Set match winners
for match in matches:
    tournament.set_winner(match, match.competitor_a)  # Alice and Charlie win

# Advance to next round
tournament.advance_to_next_round()

# Check if tournament is complete
if tournament.is_tournament_over():
    champion = tournament.get_champion()
    print(f"Tournament winner: {champion.name}")
```

## Tournament Formats

### Single Elimination
```python
tournament = Tournament(competitors, style="single")
```

### Double Elimination
```python
tournament = Tournament(competitors, style="double")
```

### Round Robin
```python
tournament = Tournament(competitors, style="round_robin")
```

### Swiss System
```python
tournament = Tournament(competitors, style="swiss")
```

## API Reference

### Tournament Class

- `get_current_round_matches()` - Get matches for the current round
- `set_winner(match, winner)` - Set the winner of a match
- `advance_to_next_round()` - Progress to the next round
- `is_tournament_over()` - Check if tournament is complete
- `get_champion()` - Get the tournament winner
- `get_results()` - Get all match results

### Match Class

- `set_winner(competitor)` - Set match winner
- `get_winner()` - Get match winner
- `get_loser()` - Get match loser

### Competitor Class

- `name` - Competitor name
- `wins` - Number of wins
- `matches` - List of matches played

## Examples

See the `examples/` directory for more detailed usage examples.

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

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