Skip to main content

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 ValueError for invalid inputs
  • Handles empty participant lists
  • Supports flexible team creation strategies

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a new Pull Request

License

MIT License

Contact

Vineet Kumar Email: whyvineet@outlook.com

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

team_allocator-0.1.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

team_allocator-0.1.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

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

Hashes for team_allocator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7e6850c961105bd5a1fa18d96478fbf205f6f886439cde43a8e20ea20e1ab8f1
MD5 bd4623f21a6a584c14ba15e8f049da3f
BLAKE2b-256 d81fffbcac3e68f8521f86ca9f371e633490d5294459f41841238675df4588ea

See more details on using hashes here.

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

Hashes for team_allocator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2026f50cc300b9e7c66e484c0fafca509ee570cec96d60c6036b7b3882c6bc54
MD5 07d67e7bf8ad55fa894e3c02bc6d83fc
BLAKE2b-256 641c6bade1630ec2452b705d6639a8973f19579cb9fb87913763d6d2dcc2c47e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page