Skip to main content

No project description provided

Project description

SecretSantaSolver

Introduction

We all know the pain of secret santas in the family. Not only will you eventually need to come up with a creative and personal gift for you loved ones, one has to first actually find a way to assign your future recipient. This often involves many rounds of discussions, scribbling down notes, drawing your own name and thus, frustration. But fear no more. With SecretSantaSolver, you can easily do these assignments in a quick and fun way!

Installation

SecretSantaSolver comes with no dependencies. The recommended way to install SecretSantaSolver is via the pip command

pip  install SecretSantaSolver

Alternatively, you can also install from the github source using poetry

git clone 
cd secretsantasolver
poetry install 

Usage

The main (and only) class is SecretSantaSolver You need to pass in the names of the persons involved. To enable you to also hand over the data, you can export the assigned pairs using the export method. This will write a .txt file per name to the provided path. Each file contains their secret santa, that you can send over via mail or other means.

import SecretSantaSolver 

names = [
    "Alex",
    "Jack",
    "Jill
]

santasolver = SecretSantaSolver.SecretSantaSolver(names = names)
santasolver.assign()
santasolver.export("path/to/folder")

If you want to prevent partners being the secretsanta of each other, you can also pass in the names of their partners and set the prohibit_partners flag to True:

names = [
    "Alex",
    "Jack",
    "Jill
]

partners = [
    "Jill",
    "",
    "Alex"
]

santasolver = SecretSantaSolver.SecretSantaSolver(names = names, partners = partners)
santasolver.assign(prohibit_partners = True)
santasolver.export("path/to/folder")

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

secretsantasolver-0.1.0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

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

secretsantasolver-0.1.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file secretsantasolver-0.1.0.tar.gz.

File metadata

  • Download URL: secretsantasolver-0.1.0.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.1 CPython/3.7.11 Linux/5.15.0-46-generic

File hashes

Hashes for secretsantasolver-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8d388bdde3ff575862fbcb41c4057e1e34a301aaa2a69e2f5e2dabcfd2a34792
MD5 fe05c5c533f46c289d98b64e2e843d62
BLAKE2b-256 0ad21ae9b157321d69a880480cbe1b1a0a490ae2b092f7f344fd78c0774db402

See more details on using hashes here.

File details

Details for the file secretsantasolver-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: secretsantasolver-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.1 CPython/3.7.11 Linux/5.15.0-46-generic

File hashes

Hashes for secretsantasolver-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 362631e8a69d422a62a7fd52f00d964aa4715f870ecbf9b486a1a065ba0af1ab
MD5 24c220f6bb7d9cd50376d9c9b917efe6
BLAKE2b-256 c60c30959d3d3ff7c102b7bd1c2b05572df3d2ac16830e55d87028190ec54d6c

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