@book

Overview

The @book decorator is used to identify a class as a Book.

Syntax

@book(*args, **kwargs)
class BookClass:
  	"""
    A sample book. 

    Author:
      Kognitos
    """
    # Book implementation here

Keyword Arguments

Argument
Type
Description

id

str

A unique identifier for the Book.

icon

str

Path to an icon representing the Book. If not provided, a default icon will be used.

name

str

The name of the Book. If not provided, the name will be inferred from the class name.

noun_phrase

str

The book noun phrase.

Default Icon

If an icon is not specified, this will be used as the default.

Example

@book(name="Twilio", icon="data/twilio.svg")
class TwilioBook:
  	"""
    The Twilio Book enables users to interact with the Twilio API.
    """
    ...

Last updated

Was this helpful?