The api_search.py module#
Summary#
One searchable PyAEDT API object. |
|
Lazily built, thread-safe BM25 index over the installed PyAEDT sources. |
Split text into lowercase tokens, breaking camelCase and snake_case words. |
|
Return the process-wide PyAEDT API index (built lazily on first search). |
Description#
Offline search over the PyAEDT API.
The index is built by statically parsing (ast) the installed
ansys.aedt.core package, so nothing is imported or executed. Each public
class, method, property, and function becomes one entry holding its signature,
docstring, and the native AEDT API calls it relies on. Native calls are
collected from two sources:
The
Referencesdocstring section (for example>>> oModule.AssignRadiation).Calls in the function body on AEDT COM objects (for example
self.oeditor.CreateBox(...)).
This makes it possible to search in both directions: from a PyAEDT concept to the method that implements it, and from a native AEDT scripting call to the PyAEDT method that wraps it.
Ranking uses BM25 over weighted name, native, summary, and docstring tokens, plus boosts for exact name or native method matches.
Module detail#
- api_search.tokenize(text: str) list[str]#
Split text into lowercase tokens, breaking camelCase and snake_case words.
Full identifiers are also kept as single tokens (for example
CreateBoxyieldscreate,boxandcreatebox) so exact native names match.
- api_search.get_api_index() PyAEDTApiIndex#
Return the process-wide PyAEDT API index (built lazily on first search).
- api_search.DOCS_BASE_URL = 'https://aedt.docs.pyansys.com/version/stable'#
- api_search.PYAEDT_PACKAGE = 'ansys.aedt.core'#
- api_search.SearchScope#
- api_search.EntryKind#