inkcpp_py
index
/home/runner/work/inkcpp/inkcpp/build/inkcpp_py/inkcpp_py.cpython-312-x86_64-linux-gnu.so

Python bindings for InkCPP https://github.com/JBenda/inkcpp

 
Classes
       
pybind11_builtins.pybind11_object(builtins.object)
Choice
Globals
List
Runner
Snapshot
Story
Value

 
class Choice(pybind11_builtins.pybind11_object)
    
Method resolution order:
Choice
pybind11_builtins.pybind11_object
builtins.object

Methods defined here:
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
get_tag(...)
get_tag(self: inkcpp_py.Choice, arg0: int) -> str
 
Get tag at index
has_tags(...)
has_tags(self: inkcpp_py.Choice) -> bool
 
if choices is tagged?
num_tags(...)
num_tags(self: inkcpp_py.Choice) -> int
 
Number of tags assigned to choice
tags(...)
tags(self: inkcpp_py.Choice) -> List[str]
 
Get all current assinged tags
text(...)
text(self: inkcpp_py.Choice) -> str
 
Get choice printable content

Static methods inherited from pybind11_builtins.pybind11_object:
__new__(*args, **kwargs) class method of pybind11_builtins.pybind11_object
Create and return a new object.  See help(type) for accurate signature.

 
class Globals(pybind11_builtins.pybind11_object)
    
Method resolution order:
Globals
pybind11_builtins.pybind11_object
builtins.object

Methods defined here:
__getattr__(...)
__getattr__(self: inkcpp_py.Globals, arg0: str) -> ink::runtime::value
 
Access global varible if exists, if not throws an key_error
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__setattr__(...)
__setattr__(self: inkcpp_py.Globals, arg0: str, arg1: ink::runtime::value) -> None
create_snapshot(...)
create_snapshot(self: inkcpp_py.Globals) -> ink::runtime::snapshot
 
Creates a snapshot from the current state for later usage
observe(...)
observe(self: inkcpp_py.Globals, arg0: str, arg1: Callable[[ink::runtime::value, Optional[ink::runtime::value]], None]) -> None
 
Get a call with the new and old value (this could be None) each time the variable changes

Static methods inherited from pybind11_builtins.pybind11_object:
__new__(*args, **kwargs) class method of pybind11_builtins.pybind11_object
Create and return a new object.  See help(type) for accurate signature.

 
class List(pybind11_builtins.pybind11_object)
    Allows reading and editing inkcpp lists. !Only valid until next choose ore getline a runner referncing the corresponding global
 
 
Method resolution order:
List
pybind11_builtins.pybind11_object
builtins.object

Methods defined here:
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__iter__(...)
__iter__(self: inkcpp_py.List) -> Iterator
__str__(...)
__str__(self: inkcpp_py.List) -> str
add(...)
add(self: inkcpp_py.List, arg0: str) -> None
 
Add flag to list
contains(...)
contains(self: inkcpp_py.List, arg0: str) -> bool
 
Check if list contains the given flag
flags_from(...)
flags_from(self: inkcpp_py.List, arg0: str) -> Iterator
 
Rerutrns all flags contained in list from a list
remove(...)
remove(self: inkcpp_py.List, arg0: str) -> None
 
Remove flag from list

Data and other attributes defined here:
Flag = <class 'inkcpp_py.List.Flag'>
A list flag containing the name of the flag and the corresponding list

Static methods inherited from pybind11_builtins.pybind11_object:
__new__(*args, **kwargs) class method of pybind11_builtins.pybind11_object
Create and return a new object.  See help(type) for accurate signature.

 
class Runner(pybind11_builtins.pybind11_object)
    
Method resolution order:
Runner
pybind11_builtins.pybind11_object
builtins.object

Methods defined here:
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__iter__(...)
__iter__(self: inkcpp_py.Runner) -> Iterator
bind(...)
bind(self: inkcpp_py.Runner, function_name: str, function: Callable[[List[inkcpp_py.Value]], inkcpp_py.Value], lookaheadSafe: bool = False) -> None
 
Bind a function with return value
bind_void(...)
bind_void(self: inkcpp_py.Runner, function_name: str, function: Callable[[List[inkcpp_py.Value]], None], lookaheadSafe: bool = False) -> None
 
Bind function with void result
can_continue(...)
can_continue(self: inkcpp_py.Runner) -> bool
 
check if there is content left in story
choose(...)
choose(self: inkcpp_py.Runner, arg0: int) -> None
 
Select a choice to continue
create_snapshot(...)
create_snapshot(self: inkcpp_py.Runner) -> ink::runtime::snapshot
 
Creates a snapshot from the current state for later usage
get_choice(...)
get_choice(self: inkcpp_py.Runner, arg0: int) -> ink::runtime::choice
 
Get current choice at index
get_tag(...)
get_tag(self: inkcpp_py.Runner, arg0: int) -> str
 
Get Tag currently stored at position i
getall(...)
getall(self: inkcpp_py.Runner) -> str
 
execute getline and append until can_continue is false
getline(...)
getline(self: inkcpp_py.Runner) -> str
 
Get content of one output line
has_choices(...)
has_choices(self: inkcpp_py.Runner) -> bool
 
Check if there is at least one open choice at the moment.
has_tags(...)
has_tags(self: inkcpp_py.Runner) -> bool
 
Where there tags since last getline?
move_to(...)
move_to(self: inkcpp_py.Runner, arg0: str) -> bool
 
Moves execution pointer to start of container desrcipet by the path
num_choices(...)
num_choices(self: inkcpp_py.Runner) -> int
 
Number of current open choices
num_tags(...)
num_tags(self: inkcpp_py.Runner) -> int
 
Number of tags currently stored
tags(...)
tags(self: inkcpp_py.Runner) -> List[str]
 
Get all current assigned tags

Static methods inherited from pybind11_builtins.pybind11_object:
__new__(*args, **kwargs) class method of pybind11_builtins.pybind11_object
Create and return a new object.  See help(type) for accurate signature.

 
class Snapshot(pybind11_builtins.pybind11_object)
    Globals and all assoziatet runner stored for later restoration
 
 
Method resolution order:
Snapshot
pybind11_builtins.pybind11_object
builtins.object

Methods defined here:
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
from_file(...)
from_file(self: str) -> inkcpp_py.Snapshot
 
Load snapshot from file
num_runners(...)
num_runners(self: inkcpp_py.Snapshot) -> int
 
Number of different runners stored in snapshot
write_to_file(...)
write_to_file(self: inkcpp_py.Snapshot, arg0: str) -> None
 
Store snapshot in file

Static methods inherited from pybind11_builtins.pybind11_object:
__new__(*args, **kwargs) class method of pybind11_builtins.pybind11_object
Create and return a new object.  See help(type) for accurate signature.

 
class Story(pybind11_builtins.pybind11_object)
    
Method resolution order:
Story
pybind11_builtins.pybind11_object
builtins.object

Methods defined here:
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
from_file(...)
from_file(self: str) -> inkcpp_py.Story
 
Creates a new story from a .bin file
new_globals(...)
new_globals(self: inkcpp_py.Story) -> ink::runtime::globals_interface
 
creates new globals store for the current story
new_globals_from_snapshot(...)
new_globals_from_snapshot(self: inkcpp_py.Story, arg0: ink::runtime::snapshot) -> ink::runtime::globals_interface
new_runner(...)
new_runner(*args, **kwargs)
Overloaded function.
 
1. new_runner(self: inkcpp_py.Story) -> ink::runtime::runner_interface
 
2. new_runner(self: inkcpp_py.Story, arg0: ink::runtime::globals_interface) -> ink::runtime::runner_interface
 
creates a new runner for the current story
new_runner_from_snapshot(...)
new_runner_from_snapshot(*args, **kwargs)
Overloaded function.
 
1. new_runner_from_snapshot(self: inkcpp_py.Story, arg0: ink::runtime::snapshot, arg1: ink::runtime::globals_interface, arg2: int) -> ink::runtime::runner_interface
 
2. new_runner_from_snapshot(self: inkcpp_py.Story, arg0: ink::runtime::snapshot, arg1: ink::runtime::globals_interface) -> ink::runtime::runner_interface
 
3. new_runner_from_snapshot(self: inkcpp_py.Story, arg0: ink::runtime::snapshot) -> ink::runtime::runner_interface

Static methods inherited from pybind11_builtins.pybind11_object:
__new__(*args, **kwargs) class method of pybind11_builtins.pybind11_object
Create and return a new object.  See help(type) for accurate signature.

 
class Value(pybind11_builtins.pybind11_object)
    Value of a Ink Variable
 
 
Method resolution order:
Value
pybind11_builtins.pybind11_object
builtins.object

Methods defined here:
__init__(...)
__init__(*args, **kwargs)
Overloaded function.
 
1. __init__(self: inkcpp_py.Value) -> None
 
2. __init__(self: inkcpp_py.Value, arg0: bool) -> None
 
3. __init__(self: inkcpp_py.Value, arg0: int, arg1: ink::runtime::value::Type) -> None
 
4. __init__(self: inkcpp_py.Value, arg0: int) -> None
 
5. __init__(self: inkcpp_py.Value, arg0: float) -> None
 
6. __init__(self: inkcpp_py.Value, arg0: inkcpp_py.List) -> None
 
7. __init__(self: inkcpp_py.Value, arg0: str) -> None
__str__(...)
__str__(self: inkcpp_py.Value) -> str
as_list(...)
as_list(self: inkcpp_py.Value) -> inkcpp_py.List

Readonly properties defined here:
type
Type contained in value

Data and other attributes defined here:
Bool = <Type.Bool: 0>
Float = <Type.Float: 4>
Int32 = <Type.Int32: 2>
List = <Type.List: 5>
String = <Type.String: 3>
Type = <class 'inkcpp_py.Value.Type'>
Uint32 = <Type.Uint32: 1>

Static methods inherited from pybind11_builtins.pybind11_object:
__new__(*args, **kwargs) class method of pybind11_builtins.pybind11_object
Create and return a new object.  See help(type) for accurate signature.

 
Functions
       
compile_json(...) method of builtins.PyCapsule instance
compile_json(arg0: str, arg1: str) -> None
 
Converts a story.json file to a story.bin file used by inkcpp