pynenc.app_info

Module Contents

Classes

AppInfo

Information about a Pynenc application instance.

API

class pynenc.app_info.AppInfo[source]

Information about a Pynenc application instance.

Stores metadata required for app discovery and re-instantiation.

Parameters:
  • app_id – Unique identifier for the application

  • module – Module path where the app is defined

  • config_values – Configuration values for app initialization

  • config_filepath – Path to configuration file, if any

  • module_filepath – Absolute file path of the module

  • app_variable – Name of the variable holding the app instance in the module

app_id: str

None

module: str

None

config_values: dict[str, Any] | None

None

config_filepath: str | None

None

module_filepath: str | None

None

app_variable: str | None

None

classmethod from_app(app: pynenc.app.Pynenc) pynenc.app_info.AppInfo[source]

Create AppInfo from a Pynenc app instance.

Captures necessary metadata for later re-instantiation.

Parameters:

app – The Pynenc app instance

Returns:

AppInfo containing app metadata

to_json() str[source]

Serialize AppInfo to JSON string.

Returns:

JSON representation of AppInfo

classmethod from_json(json_str: str) pynenc.app_info.AppInfo[source]

Deserialize AppInfo from JSON string.

Parameters:

json_str – JSON string representation of AppInfo

Returns:

AppInfo instance