agoras.common package

The agoras.common package provides low-level utilities, logging, and shared constants used throughout the Agoras ecosystem.

Package Overview

This package is the foundation layer of Agoras with no external dependencies beyond Python’s standard library. It provides:

  • Version and metadata information

  • Logging infrastructure

  • URL manipulation utilities

  • Web scraping utilities

agoras.common package

agoras.common.version module

Version and metadata information for Agoras.

agoras.common.logger module

Logging infrastructure for Agoras.

agoras.core.logger is the global application logging module.

All modules use the same global logging object. No messages will be emitted until the logger is started.

class agoras.common.logger.ControlableLogger(name='')[source]

Bases: Logger

This class represents a logger object that can be started and stopped.

It has a start method which allows you to specify a logging level. The stop method halts output.

disabled

Attribute disabled (boolean): Stores the current status of the logger.

formatstring

Attribute formatstring (string): Stores the string that will be used to format the logger output.

loglevel(level='INFO')[source]

Set the log level for this logger.

Messages less than the given priority level will be ignored. The default level is ‘INFO’, which conforms to the *nix convention that a successful run should produce no diagnostic output. Available levels and their suggested meanings:

  • NOTSET: all messages are processed.

  • DEBUG: output useful for developers.

  • INFO: trace normal program flow, especially external

    interactions.

  • WARNING: an abnormal condition was detected that might need

    attention.

  • ERROR: an error was detected but execution continued.

  • CRITICAL: an error was detected and execution was halted.

Parameters:

level – a string containing the desired logging level.

Added in version 0.1.0.

start(filename=None)[source]

Start logging with this logger.

Until the logger is started, no messages will be emitted. This applies to all loggers with the same name and any child loggers.

Added in version 0.1.0.

stop()[source]

Stop logging with this logger.

Remove available handlers and set disabled attribute to True.

Added in version 0.1.0.

agoras.common.utils module

Utility functions for URL manipulation and web scraping.