symupy.abstractions package

Submodules

symupy.abstractions.command module

Abstract Command

This module implements a general metaclass for a command.

class symupy.abstractions.command.AbsCommand[source]

Bases: object

Abstract command class

abstract property description

Command brief description

abstract execute()[source]

Standard launcher

abstract property names

Command name

symupy.abstractions.observer module

Abstract Observer

This module implements a general metaclass of the observer.

class symupy.abstractions.observer.AbsObserver[source]

Bases: object

abstract update(value)[source]

Local update method to retrieve subject data

symupy.abstractions.reader module

class symupy.abstractions.reader.AbstractNetworkReader[source]

Bases: abc.ABC

Abstraction of Network Reader

abstract get_network()[source]
class symupy.abstractions.reader.AbstractTrafficDataReader[source]

Bases: abc.ABC

Abstraction of Traffic Data Reader.

In order to be able to read trip and OD in VisuNet, you must declare the methods:

get_path(self, id) -> Path get_OD(self, *args, **kwargs) -> list[Path]

_ext

Description of attribute _ext.

Type

type

symupy.abstractions.subject module

Abstract Subject

This module implements a general metaclass of the subject/publisher of information.

class symupy.abstractions.subject.AbsSubject[source]

Bases: object

abstract classmethod attach(observer, channel, callback)[source]

Attach a new observer

abstract classmethod detach(observer, channel)[source]

Detach an existing observer

abstract classmethod dispatch(channel)[source]

Notify all observers by calling update method

Module contents

Abstractions

This package contains implementations related to generic abstractions regularly implemented via metaclasses in order to provide generic software pattern behaviors.