Welcome to python-party-pack’s documentation!

Combining a basic yet fun Python project with Sphinx Docs, Coverage.py, and some other tools, plus some notes on good practices. This is a jump start to get involved with the party fun of Document Driven Development (DDD) and Test Driven Development (TDD).

Contents:

Reference: Party

exception party.DontHaveThatDrink[source]

This is thrown when someone asks for a drink not supplied.

exception party.EveryoneHasPartyHat[source]

This is thrown when everyone has managed to get their hat on.

exception party.OutOfThatDrink[source]

This is thrown when someone asks for a drink whose supply has been exhausted.

class party.Party(attendees=None, **kwargs)[source]

A programmatic representation of a party. Accepts the following parameters:

  • attendees (numeric)
  • beers (numeric)
  • sangrias (numeric)
  • wines (numeric)
  • lemonades (numeric)

Note

If you don’t supply a value for any of the parameters, the Party will act like all parties do and these parameter will show up in random quantities.

drink(substance_name)[source]

Drink an available substances specified in VALID_DRINKS constant

inventory()[source]

Display an inventory of guests and available drinks

put_hat_on_attendee()[source]

Put a hat on an attendee

party.random_party()[source]

Use this function to hold a completely party.

Indices and tables