export package
Submodules
export.builder module
- class export.builder.BuildContext(project_path: 'str', output_path: 'str', platform: 'str', build_mode: 'str' = 'release', logger: 'any' = None, metadata: 'dict' = <factory>, cancelled: 'threading.Event' = <factory>)[source]
Bases:
object- build_mode: str = 'release'
- cancelled: Event
- logger: any = None
- metadata: dict
- output_path: str
- platform: str
- project_path: str
- class export.builder.BuildGraph[source]
Bases:
object- run(context: BuildContext)[source]
- class export.builder.DesktopExporter(build_mode: str = 'release', target_os: str = '')[source]
Bases:
Exporter- platform = 'desktop'
- exception export.builder.ExportCancelled[source]
Bases:
ExceptionRaised when the user cancels an in-progress export.
- class export.builder.Exporter(build_mode: str = 'release')[source]
Bases:
object- platform = 'generic'
- export.builder.HTML5Exporter
alias of
WebExporter
- class export.builder.MobileExporter(build_mode: str = 'release', output_format: str = 'apk')[source]
Bases:
Exporter- platform = 'mobile'
- class export.builder.ServerExporter(build_mode: str = 'release', target_os: str = '')[source]
Bases:
Exporter- export_with_pyinstaller(project_path: str, output_path: str)[source]
Build a standalone headless server executable using PyInstaller.
- platform = 'server'
- class export.builder.WebExporter(build_mode: str = 'release')[source]
Bases:
Exporter- platform = 'web'
- class export.builder.WebTemplatePart(plugin_name: str, section: str, content: str, priority: int = 100)[source]
Bases:
objectA named contribution to the pygbag HTML template from a plugin.
- content
- plugin_name
- priority
- section
- class export.builder.WebTemplateRegistry[source]
Bases:
objectCentral registry that plugins use to contribute template customizations. Multiple plugins can each add parts to named sections; the final template is assembled by merging all contributions sorted by priority.
- Supported sections:
head_styles – CSS injected inside <style> in <head> head_scripts – <script> blocks injected in <head> body_top – HTML inserted at the top of <body> body_bottom – HTML / <script> inserted at the bottom of <body> config_overrides – JavaScript object literals merged into the config block meta_tags – extra <meta> tags in <head>
- VALID_SECTIONS = {'body_bottom', 'body_top', 'config_overrides', 'head_scripts', 'head_styles', 'meta_tags'}
- build_template(project_config: dict, logo_url: str = None, bg_image_url: str = None) str[source]
Assemble the full pygbag custom.tmpl HTML from a base skeleton plus all registered plugin contributions. Returns the complete HTML string.
- classmethod instance() WebTemplateRegistry[source]