Help Topics for context


Sample CLI

gway release changes

References

Signature

(*, files=None, staged=False, context=3, max_bytes=200000, clip=False)

Docstring

Returns a unified diff of all recent textual changes in the git repo. - Shows added/removed lines (ignores binary files). - Includes unstaged (working directory) by default. Use staged=True to see only staged. - 'files': Optionally filter by path(s) or file glob(s). - 'context': Number of context lines in the diff (default 3). - 'max_bytes': Truncate diff if too large (default 200,000).


Sample CLI

gway ocpp.evcs simulate-cp

Signature

(cp_idx, host, ws_port, rfid, cp_path, duration, session_count)

Docstring

Simulate a single CP session (possibly many times if session_count>1).

Sample CLI

gway web.app current-endpoint

References

Signature

()

Docstring

Return the canonical endpoint path for the current request (the project route prefix). Falls back to gw.context['current_endpoint'], or None.

Sample CLI

gway web.app setup

References

Signature

(*, app=None, project='web.site', path=None, home: str = None, views: str = 'view', apis: str =
'api', static='static', shared='shared', css='global', js='global', auth_required=False,
engine='bottle')

Docstring

Setup Bottle web application with symmetrical static/shared public folders. Only one project per app. CSS/JS params are used as the only static includes.


Sample CLI

gway web.server is-local

References

Signature

(request=None, host=None)

Docstring

Returns True if the active HTTP request originates from the same machine that the server is running on (i.e., local request). Supports both Bottle and FastAPI (ASGI/WSGI). Args: request: Optionally, the request object (Bottle, Starlette, or FastAPI Request). host: Optionally, the bound host (for override or testing). Returns: bool: True if request is from localhost, else False.




Sample CLI

gway run-recipe

References

Signature

(*script: str, **context)

Docstring

Run commands parsed from a .gwr file, falling back to the 'recipes/' resource bundle. Recipes are gway scripts composed of one command per line with optional comments.