Skip to main content
`Ctrl`+`K`

# fishbowlpy package

## Subpackages

- fishbowlpy.utils package
  - Submodules
  - fishbowlpy.utils.logger module
    - `getLogger()`
  - Module contents

## Submodules

## fishbowlpy.browserdriver module

class fishbowlpy.browserdriver.BrowserDriver(driver_type=DriverType.CHROME_DRIVER, driver_path: str | None = None)

  Bases: `object`

  get_default_driver(driver_type) → ChromiumDriver
  get_driver() → ChromiumDriver

## fishbowlpy.config module

## fishbowlpy.drivertype module

class fishbowlpy.drivertype.DriverType(value)

  Bases: `Enum`

  An enumeration.

  CHROME_DRIVER = 1
  EDGE_DRIVER = 2

## fishbowlpy.filedownloader module

fishbowlpy.filedownloader.download_file(url, filepath)

## fishbowlpy.fishbowlapi module

class fishbowlpy.fishbowlapi.FishBowlAPI(session_key: str)

  Bases: `object`

  get_bowl_details(bowl_name)
  get_comments()
  get_posts(bowl_name: str, sort: str | None = None, start: int | None = None, count: int | None = None)
  get_posts_by_bowl_id(bowl_id, sort: str | None = None, start: int | None = None, count: int | None = None)

## fishbowlpy.fishbowlclient module

class fishbowlpy.fishbowlclient.FishBowlClient(**kwargs)

  Bases: `object`

  This class is used to interact with the FishBowlApp. This class provides the interface with the ability to configure the required configuration like driver paths, session key etc.

  Parameters:

    - login_manager(FishBowlLoginManager) -- An instance of the FishBowlLoginManager class.

    - fishbowl_api(FishBowlAPI) -- An instance of the FishBowlAPI class.

    - driver_type(DriverType) -- An instance of the DriverType class.

    - **kwargs --

      Any other keyword arguments.

  Returns:

    None

  Basic Usage: >>> from fishbowlpy.fishbowlclient import FishBowlClient >>> client = FishBowlClient() >>> client.get_bowls_names() >>> client.get_posts(bowl_name='fishbowl')

  Copyright:

    3. 2024 MIT Licensed

  get_bowls_names()

    This is a placeholder method that will be used to get the names of the subscribed bowls

  get_posts(bowl_name: str)

    This method returns the posts in the bowl_name in json format.

    :param bowl_nameBowl name from where to get the posts.

    Returns:

      Posts in json format.

  refresh_session()

    This is a placeholder method that will be used to refresh the session

## fishbowlpy.fishbowldatatypes module

class fishbowlpy.fishbowldatatypes.FishBowlResponse

  Bases: `object`

  data = None
  headers = None

## fishbowlpy.fishbowlloginmanager module

class fishbowlpy.fishbowlloginmanager.FishBowlLoginManager(session_key: str | None = None, session_expiry: float | None = None, login_popup: bool = True, driver_type: str = DriverType.CHROME_DRIVER, driver_path: str | None = None)

  Bases: `object`

  get_session_key() → str

    Returns the session key

    Returns:

      str: Session key for current session

  load_session(file='E:\\Workspace\\fishbowlpy\\source\\..\\src\\fishbowlpy\\tmp\\session\\session_data.json') → bool
  login(driver_type: str = DriverType.CHROME_DRIVER, driver_path: str | None = None)

    Fishbowl client logs in by either reading previous session or by manually logging in.

    Args:

      driver_type (str, optional): Provide the driver type. Defaults to DriverType.CHROME_DRIVER.

  save_session_data()

    Saves the session data into a json file for future login attempts

  set_session_key(session_key=None, session_expiry=None)

    Sets the session key and session expiry

    Args:

      session_key (str, optional): The session key from cookie. Defaults to None. session_expiry (int, optional): The epoch time when session expires. Defaults to None.

## fishbowlpy.urlmanager module

class fishbowlpy.urlmanager.FishbowlURLManager

  Bases: `object`

  get_bowl_details_url(bowl_name)
  get_cert_path()
  get_headers(session_key)
  get_posts_url(bowl_id, sort: str = 'byDate', start: int = 0, count: int = 20)

## Module contents