API reference
python:astx:astx.packages.Package
class Package
Package(name: str = 'main', modules: list[Module] = [], packages: list[Package] = [], loc: SourceLocation = NO_SOURCE_LOCATION)
Source: packages/astx/src/astx/packages.py:125
AST class for Package.
Attributes
-
name — Name identifying this declaration.; Type: str
-
modules — Modules.; Type: list[Module]
-
packages — Packages.; Type: list[Package]
-
loc — Type: SourceLocation
-
kind — Type: ASTKind
-
comment — Type: str
-
parent — Type: Optional[ASTNodes]
-
ref — Type: str
-
nodes — Type: list[ASTType]
-
position — Type: int
Methods
-
__init__ — Initialize the AST instance.
-
__str__ — Return the string representation of the object.
-
get_struct — Return the AST structure of the object.