pyechonext.docsgen package

Submodules

pyechonext.docsgen.document module

class pyechonext.docsgen.document.DocumentFolder(name: str, project_root_dir: str, sections: List[DocumentSection])[source]

Bases: object

This class describes a document folder.

__init__(name: str, project_root_dir: str, sections: List[DocumentSection])[source]

Constructs a new instance.

Parameters:
  • name (str) – The name

  • project_root_dir (str) – The project root dir

  • sections (List[DocumentSection]) – The sections

class pyechonext.docsgen.document.DocumentManager(project_name: str, short_project_introduction: str, project_description: str, repo_author: str, repo_name: str, project_root_dir: str, folders: List[DocumentFolder])[source]

Bases: object

This class describes a document manager.

__init__(project_name: str, short_project_introduction: str, project_description: str, repo_author: str, repo_name: str, project_root_dir: str, folders: List[DocumentFolder])[source]

Constructs a new instance.

Parameters:
  • project_name (str) – The project name

  • project_description (str) – The project description

  • project_root_dir (str) – The project root dir

  • folders (List[DocumentFolder]) – The folders

generate_pages()[source]

Generate pages of sections in folders

generate_readme()[source]

Generate readme file

class pyechonext.docsgen.document.DocumentSection(title: str, introduction: str, content: Dict[str, Any])[source]

Bases: ABC

This abstract metaclass describes a documentation section.

__init__(title: str, introduction: str, content: Dict[str, Any])[source]

Constructs a new instance.

Parameters:
  • title (str) – The title

  • introduction (str) – The introduction

  • content ({ type_description }) – The content

get_filename() str[source]

Gets the filename.

Returns:

The filename.

Return type:

str

get_markdown_page() List[str][source]

Gets the page in markdown formatting

Returns:

The markdown page.

Return type:

List[str]

Links a new section.

Parameters:

linked_section (DocumentSection) – The linked section

Links a new subsection.

Parameters:

linked_subsection (DocumentSubsection) – The linked subsection

modify_content(new_content: Dict[str, Any])[source]

Modify section content

Parameters:

new_content (Dict[str, Any]) – The new content

modify_description(new_description: str)[source]

Modify section description

Parameters:

new_description (str) – The new description

modify_title(new_title: str)[source]

Modify section title

Parameters:

new_title (str) – The new title

class pyechonext.docsgen.document.DocumentSubsection(title: str, content: Dict[str, Any], main_section: DocumentSection)[source]

Bases: ABC

This class describes a document subsection.

__init__(title: str, content: Dict[str, Any], main_section: DocumentSection)[source]

Constructs a new instance.

Parameters:
  • title (str) – The title

  • content (str) – The content

  • main_section (DocumentSection) – The main section

set_new_main_section(new_main_section: DocumentSection)[source]

Sets the new main section.

Parameters:

new_main_section (DocumentSection) – The new main section

class pyechonext.docsgen.document.InitiationSection(title: str, introduction: str, content: Dict[str, Any])[source]

Bases: DocumentSection

This class describes an initiation section.

__init__(title: str, introduction: str, content: Dict[str, Any])[source]

Constructs a new instance.

Parameters:
  • title (str) – The title

  • introduction (str) – The introduction

  • content (Dict[str, Any]) – The content

class pyechonext.docsgen.document.ProjectManager(project_name: str, short_project_introduction: str, project_description: str, repo_author: str, repo_name: str, project_root_dir: str, project_template: ProjectTemplate, folders: List[DocumentFolder], sections: List[DocumentSection], github: bool = True)[source]

Bases: object

This class describes a project manager.

__init__(project_name: str, short_project_introduction: str, project_description: str, repo_author: str, repo_name: str, project_root_dir: str, project_template: ProjectTemplate, folders: List[DocumentFolder], sections: List[DocumentSection], github: bool = True)[source]

Constructs a new instance.

Parameters:
  • project_name (str) – The project name

  • project_description (str) – The project description

  • repo_author (str) – The repo author

  • repo_name (str) – The repo name

  • project_root_dir (str) – The project root dir

  • project_template (ProjectTemplate) – The project template

  • folders (List[DocumentFolder]) – The folders

  • sections (List[DocumentSection]) – The sections

add_directory_to_structure(dir_name: str, files: List[str])[source]

Adds a directory to structure.

Parameters:
  • dir_name (str) – The dir name

  • files (List[str]) – The files

process_project(skip_readme: bool = False)[source]

Process project creation

class pyechonext.docsgen.document.ProjectStructureGenerator(project_root_dir: str, project_template: ProjectTemplate)[source]

Bases: object

This class describes a project structure generator.

__init__(project_root_dir: str, project_template: ProjectTemplate)[source]

Constructs a new instance.

Parameters:
  • project_root_dir (str) – The project root dir

  • project_template (ProjectTemplate) – The project template

add_directory(dir_name: str, dir_files: List[str])[source]

Adds a directory.

Parameters:
  • dir_name (str) – The dir name

  • dir_files (List[str]) – The dir files

generate_structure()[source]

Generate project file structure

class pyechonext.docsgen.document.ProjectTemplate(*values)[source]

Bases: Enum

BASE = 0
CPP = 1
PYTHON = 2
class pyechonext.docsgen.document.RoutesSubsection(title: str, content: Dict[str, Any], main_section: DocumentSection)[source]

Bases: DocumentSubsection

This class describes a routes section.

__init__(title: str, content: Dict[str, Any], main_section: DocumentSection)[source]

Constructs a new instance.

Parameters:
  • title (str) – The title

  • content (str) – The content

  • main_section (DocumentSection) – The main section

pyechonext.docsgen.projgen module

class pyechonext.docsgen.projgen.ProjDocumentation(echonext_app: EchoNext)[source]

Bases: object

This class describes an api documentation.

__init__(echonext_app: EchoNext)[source]

Constructs a new instance.

Parameters:

echonext_app (EchoNext) – The echonext application

documentate_route(page_path: str, return_type: Any, params: dict, methods: list, extra: dict = {}) Callable[source]

Add routed page to documentation

Parameters:
  • page_path (str) – The page path

  • return_type (Any) – The return type

  • params (dict) – The parameters

  • methods (list) – The methods

  • extra (dict) – The extra

Returns:

wrapper handler

Return type:

Callable

generate_documentation()[source]

Generate documentation

Module contents