Library¶
- class guppylang.library.GuppyLibrary(members: list[DefId])[source]¶
A collection of Guppy definitions that can be compiled together into a linkable unit exposing a public interface. Libraries can be created using static factory methods on this class.
from guppylang.library import GuppyLibrary @guppy def foo() -> int: return 42 @guppy def bar() -> int: return 7 # Compilable collection containing `foo` and `bar`. lib = GuppyLibrary.from_members(foo, bar)
- classmethod from_members(*members: GuppyDefinition) Self[source]¶