Enasis Network Project Basics#

Documentation Welcome#

Welcome to the project documentation. Below you will find the most common functions and classes within the library, but you may click your way further into the project from there. You can also view the source code.

Project Badges#

class enbasics.badges.Badge(label: str, value: str, *, count: int | str | None = None, color: Literal['gray', 'red', 'yellow', 'green', 'teal', 'pink', 'blue'] | None = None, date: str | None = None)[source]#

Bases: object

Construct the badge image and output to the image file.

html: str#
write(output: str | Path) None[source]#

Ouput badge to the complete or relative filesystem path.

Parameters:

output – Where to write the generated badge image.

enbasics.badges.BadgeColors#

alias of Literal[‘gray’, ‘red’, ‘yellow’, ‘green’, ‘teal’, ‘pink’, ‘blue’]

Project Makefile#

enbasics.makefile.makefile(path: Path | str = 'Makefile', *, name: str | None = None, version: str | None = None, method: Literal['stdout', 'print'] = 'stdout', color: int | None = 7) None[source]#

Print the Makefile summary in the human friendly format.

Parameters:
  • path – Complete or relative path to the makefile.

  • name – Name of the project to show in the console.

  • version – Version of projects to show beside name.

  • method – Which method for standard output is used.

  • color – Optional color override default ANSI gray.

enbasics.makefile.makeout(string: str, prefix: Literal['text', 'base', 'more'] | None = None, method: Literal['stdout', 'print'] = 'stdout', color: int | None = 7) None[source]#

Print the ANSI colorized string to the standard output.

Note

This function is forgiving due to use with Makefile.

Parameters:
  • string – String processed using inline directives.

  • prefix – Determine if and which prefix prepended.

  • method – Which method for standard output is used.

  • color – Optional color override default ANSI gray.

enbasics.makefile.makeread(path: Path | str) str[source]#

Return the contents using the provided filesystem path.

Parameters:

path – Complete or relative path to the makefile.

Returns:

Contents using the provided filesystem path.