{ "info": { "author": "jarhill0", "author_email": "jarhill0@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "Santa\n=====\n\nA Python project to randomly pair Secret Santa gifters and recipients, following a set of constraints, and email\nthem, all without the operator seeing the assignments.\n\nRequirements\n------------\n\n- yagmail\n\nInstallation\n------------\n\nInstall with ``pip3 install santa`` or ``python3 -m pip install santa``. Precede either command with ``sudo`` if it\nfails due to insufficient permissions.\n\nUsage\n-----\n\n1. Create `Person` objects for all participants with their names and addresses:\n\n.. code-block:: python\n\n import santa\n\n john = santa.Person('John Doe', 'jdoe@example.com')\n sally = santa.Person('Sally Salamander', 'sally@mander.com')\n linus = santa.Person('Linus Torvalds', 'torvalds@transmeta.com')\n guido = santa.Person('Guido van Rossum', 'guido@python.org')\n\n2. Put them into a list:\n\n.. code-block:: python\n\n people = [john, sally, linus, guido]\n\n3. If any participants have restrictions on who they can give to (say, John and Sally are married and will be getting\n each other gifts regardless), create a dictionary with the giver as the key and the banned recipients in a list as the \n value:\n \n.. code-block:: python\n\n # not only are John and Sally married, but Sally hates Linus and will not get him a gift.\n restrictions = {john: [sally],\n sally: [john, linus]}\n\n4. Pass these into the function ``santa.run(person_list, invalid_links=None, *, message='', subject='Secret Santa')``. \n This will match people and send emails. If a match is not found, the program will raise ``santa.SolvingError``. If\n you haven't already `configured yagmail `_, it will prompt you for a username and password.\n\n.. code-block:: python\n\n santa.run(people, restrictions, message='Thank you for participating.')\n\n5. If there are any errors sending emails, they will be printed to the console in the form of a list of tuples of\n ``(gifter, recipient)``. You, the operator, must decide how to handle this.\n\nOptions\n-------\n\nBy default, santa will solve using the ``'loop'`` strategy, which results in a \"gifting loop.\" As of version 0.2,\nsanta can also solve with the method ``'draw'``, which simulates drawing tickets from a hat. This method will not\nnecessarily result in a loop, but it will be possible for \"pairs\" of two gifters giving to each other to occur.\n\nTo set a solving mode, pass it into ``santa.run()`` like so:\n\n.. code-block:: python\n\n santa.run(people, restrictions, solve_mode='loop')\n\nThe current list of solving modes is as follows:\n\n- ``'loop'`` (default)\n- ``'draw'``\n\nSanta also has options for output modes. By default, it will email recipients. But as of version 0.2, it also has the\noption to save output to text files in the current working directory. These can be attached to emails and sent\nwithout the operator having to find out who is assigned to whom.\n\nTo set an output mode, pass it into ``santa.run()`` like so:\n\n.. code-block:: python\n\n santa.run(people, restrictions, out_mode='text')\n\nThe current list of output modes is as follows:\n\n- ``'email'`` (default)\n- ``'text'``\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/jarhill0/santa/archive/0.2.2.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jarhill0/santa/", "keywords": "secret", "license": "", "maintainer": "", "maintainer_email": "", "name": "santa", "package_url": "https://pypi.org/project/santa/", "platform": "", "project_url": "https://pypi.org/project/santa/", "project_urls": { "Download": "https://github.com/jarhill0/santa/archive/0.2.2.tar.gz", "Homepage": "https://github.com/jarhill0/santa/" }, "release_url": "https://pypi.org/project/santa/0.2.2/", "requires_dist": null, "requires_python": "", "summary": "Assign a secret santa over email", "version": "0.2.2" }, "last_serial": 3363674, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "e970ef4913281d59fb039fdfd49d28a6", "sha256": "b7301a641486a765b0a672503c8ad310cfbdd2bc9c5282e70ed4f5eafcfbcf39" }, "downloads": -1, "filename": "santa-0.1.1.tar.gz", "has_sig": false, "md5_digest": "e970ef4913281d59fb039fdfd49d28a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1977, "upload_time": "2017-11-23T07:22:18", "url": "https://files.pythonhosted.org/packages/9e/b4/b3aadcaa94a10983b3c50ec43e4635785363dd9ff90fc93d0a0144c14a1c/santa-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "f5a300867af08e30b8757b68cb65f0ee", "sha256": "38583a7982b16eaa6c03c615bc0c0b32dd84dfd3e62967c5f9b1e7ff3a1d1661" }, "downloads": -1, "filename": "santa-0.1.2.tar.gz", "has_sig": false, "md5_digest": "f5a300867af08e30b8757b68cb65f0ee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2146, "upload_time": "2017-11-23T07:43:29", "url": "https://files.pythonhosted.org/packages/ad/71/74d0d08b8593c84fc432891d0176fef806af324c46ceddf6ca85d316a81e/santa-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "f8758d704f9a6aaf0067893cf23e984f", "sha256": "1f2bee0b417256aba7630890b7a63fb65ecba608f022962a947de6f3b44805f1" }, "downloads": -1, "filename": "santa-0.1.3.tar.gz", "has_sig": false, "md5_digest": "f8758d704f9a6aaf0067893cf23e984f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2191, "upload_time": "2017-11-23T08:14:02", "url": "https://files.pythonhosted.org/packages/fb/53/5a38d537429be73e8dbc6e76b1f0592a3bef8c678c6559c2f152d79a441a/santa-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "64b0bd56ee20ac704be3c4a87647a988", "sha256": "0920f7cd62533a8655767d7efbf3bf2ad9f238fd522c7046c44dbe023e5d0649" }, "downloads": -1, "filename": "santa-0.1.4.tar.gz", "has_sig": false, "md5_digest": "64b0bd56ee20ac704be3c4a87647a988", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2187, "upload_time": "2017-11-23T08:21:02", "url": "https://files.pythonhosted.org/packages/0f/16/1d5c68f13ee0c5ace57df0d1d4a86fece1bc75ca08c61b60c6bb39cef60c/santa-0.1.4.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "3b59fdd7b0694d660422256b76ffbdf4", "sha256": "b8ab1270629bf6a802941e0550779eb05d10c349e32788ea425b097dc828b272" }, "downloads": -1, "filename": "santa-0.2.0.tar.gz", "has_sig": false, "md5_digest": "3b59fdd7b0694d660422256b76ffbdf4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4010, "upload_time": "2017-11-25T23:36:37", "url": "https://files.pythonhosted.org/packages/aa/82/968d2e5e30b1f240e8c345dd7a60c7f04e512b80232b8fd95dfcb305ebf1/santa-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "58d32b4add4050d2115be465192f5f02", "sha256": "f4c7f23f73858ec515d3a0251db8346a29b7553e226c98fc7595dfebab398150" }, "downloads": -1, "filename": "santa-0.2.1.tar.gz", "has_sig": false, "md5_digest": "58d32b4add4050d2115be465192f5f02", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4024, "upload_time": "2017-11-25T23:42:24", "url": "https://files.pythonhosted.org/packages/74/39/41867409ddd29e3efbc2de93068b8d084abcd357376934bd21e0723de817/santa-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "0180ed8e0e90ceef46c03f7b6d5de0c9", "sha256": "a4b9296ddbeec066c2a7feecf284692fa4d758043023b4be9d4cdec2dff12e53" }, "downloads": -1, "filename": "santa-0.2.2.tar.gz", "has_sig": false, "md5_digest": "0180ed8e0e90ceef46c03f7b6d5de0c9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4024, "upload_time": "2017-11-26T00:03:49", "url": "https://files.pythonhosted.org/packages/22/e0/00ead82e76b5910fe38796c2aa99d99d137be7c61340e7122e9bc401d40d/santa-0.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0180ed8e0e90ceef46c03f7b6d5de0c9", "sha256": "a4b9296ddbeec066c2a7feecf284692fa4d758043023b4be9d4cdec2dff12e53" }, "downloads": -1, "filename": "santa-0.2.2.tar.gz", "has_sig": false, "md5_digest": "0180ed8e0e90ceef46c03f7b6d5de0c9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4024, "upload_time": "2017-11-26T00:03:49", "url": "https://files.pythonhosted.org/packages/22/e0/00ead82e76b5910fe38796c2aa99d99d137be7c61340e7122e9bc401d40d/santa-0.2.2.tar.gz" } ] }