A flexible team allocation library
Project description
Team Allocator
A flexible Python library for creating random, balanced, and attribute-based team assignments.
Installation
pip install team_allocator
Features
- Random team generation
- Balanced team allocation with skill weighting
- Attribute-based team grouping
Usage Examples
Random Team Allocation
from team_allocator import TeamAllocator
# List of participants
participants = ['Alice', 'Bob', 'Charlie', 'David', 'Eve', 'Frank']
# Create teams of 3
random_teams = TeamAllocator.random_teams(participants, team_size=3)
# Create 2 teams
random_teams = TeamAllocator.random_teams(participants, num_teams=2)
Balanced Team Allocation
# Create balanced teams using skill weights
skill_weights = {
'Alice': 9.0,
'Bob': 7.5,
'Charlie': 8.0,
'David': 6.5,
'Eve': 7.0,
'Frank': 6.0
}
balanced_teams = TeamAllocator.balanced_teams(
list(skill_weights.keys()),
num_teams=2,
skill_weights=skill_weights
)
Attribute-Based Team Grouping
# Participants with different attributes
participants = [
{'name': 'Alice', 'role': 'Developer'},
{'name': 'Bob', 'role': 'Designer'},
{'name': 'Charlie', 'role': 'Developer'},
{'name': 'David', 'role': 'Tester'},
{'name': 'Eve', 'role': 'Designer'},
{'name': 'Frank', 'role': 'Tester'}
]
# Create teams with diverse roles
diverse_teams = TeamAllocator.group_by_attribute(
participants,
attribute='role',
num_teams=2
)
Methods
random_teams(participants, team_size=None, num_teams=None)
- Randomly distribute participants into teams
- Can specify either team size or number of teams
balanced_teams(participants, team_size=None, num_teams=None, skill_weights=None)
- Create teams with balanced distribution
- Optional skill weights for more strategic allocation
group_by_attribute(participants, attribute, num_teams)
- Group participants based on a specific attribute
- Ensures diverse teams across different characteristics
Error Handling
- Raises
ValueErrorfor invalid inputs - Handles empty participant lists
- Supports flexible team creation strategies
Contributing
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
License
MIT License
Contact
Vineet Kumar Email: whyvineet@outlook.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
team_allocator-0.1.0.tar.gz
(4.1 kB
view details)
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 team_allocator-0.1.0.tar.gz.
File metadata
- Download URL: team_allocator-0.1.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e6850c961105bd5a1fa18d96478fbf205f6f886439cde43a8e20ea20e1ab8f1
|
|
| MD5 |
bd4623f21a6a584c14ba15e8f049da3f
|
|
| BLAKE2b-256 |
d81fffbcac3e68f8521f86ca9f371e633490d5294459f41841238675df4588ea
|
File details
Details for the file team_allocator-0.1.0-py3-none-any.whl.
File metadata
- Download URL: team_allocator-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2026f50cc300b9e7c66e484c0fafca509ee570cec96d60c6036b7b3882c6bc54
|
|
| MD5 |
07d67e7bf8ad55fa894e3c02bc6d83fc
|
|
| BLAKE2b-256 |
641c6bade1630ec2452b705d6639a8973f19579cb9fb87913763d6d2dcc2c47e
|