checkout package

Submodules

checkout.checkout module

class checkout.checkout.Library[source]

Bases: object

add_book(book)[source]

Adds a book to the library.

Parameters:

book (str) – The name of the book to add.

add_user(user)[source]

Adds a user to the library.

Parameters:

user (str) – The name of the user to add.

checkout_book(user_id, book_id)[source]

Checks out a book for a user.

Parameters:
  • user_id (str) – The ID of the user checking out the book.

  • book_id (str) – The ID of the book to check out.

list_books()[source]

Lists all books in the library.

list_users()[source]

Lists all users in the library.

return_book(user_id, book_id)[source]

Returns a book for a user.

Parameters:
  • user_id (str) – The ID of the user returning the book.

  • book_id (str) – The ID of the book to return.

Module contents