Skip to content

Class: PythonInterpreter

Local in-process Python REPL (dspy.PythonInterpreter).

URI: dspy:PythonInterpreter

 classDiagram
    class PythonInterpreter
    click PythonInterpreter href "../PythonInterpreter/"
      Interpreter <|-- PythonInterpreter
        click Interpreter href "../Interpreter/"

      PythonInterpreter : description

      PythonInterpreter : enable_env_vars

      PythonInterpreter : enable_network_access

      PythonInterpreter : enable_read_paths

      PythonInterpreter : enable_write_paths

      PythonInterpreter : id

      PythonInterpreter : interpreter_kind

      PythonInterpreter : name

      PythonInterpreter : sync_files

Inheritance

Slots

Name Cardinality and Range Description Inheritance
interpreter_kind 1
String
Concrete code interpreter implementation (matches an InterpreterKind valu... Interpreter
enable_read_paths *
String
Interpreter
enable_write_paths *
String
Interpreter
enable_env_vars *
String
Interpreter
enable_network_access 0..1
Boolean
Interpreter
sync_files 0..1
Boolean
Interpreter
id 1
Identifier
Stable opaque identifier for an instance NamedThing
name 0..1
String
Short human-readable name NamedThing
description 0..1
String
Free-form description NamedThing

In Subsets

Identifier and Mapping Information

Annotations

property value
dspy_source_paths ['dspy/primitives/python_interpreter.py']
dspy_source_urls ['https://github.com/stanfordnlp/dspy/blob/main/dspy/primitives/python_interpreter.py']

Schema Source

Mappings

Mapping Type Mapped Value
self dspy:PythonInterpreter
native dspy:PythonInterpreter
related uco_tool:CompilerType

LinkML Source

Direct

name: PythonInterpreter
annotations:
  dspy_source_paths:
    tag: dspy_source_paths
    value:
    - dspy/primitives/python_interpreter.py
  dspy_source_urls:
    tag: dspy_source_urls
    value:
    - https://github.com/stanfordnlp/dspy/blob/main/dspy/primitives/python_interpreter.py
description: Local in-process Python REPL (``dspy.PythonInterpreter``).
in_subset:
- modules
from_schema: https://w3id.org/lmodel/dspy
related_mappings:
- uco_tool:CompilerType
is_a: Interpreter
slot_usage:
  interpreter_kind:
    name: interpreter_kind
    ifabsent: string(python)
    equals_string: python

Induced

name: PythonInterpreter
annotations:
  dspy_source_paths:
    tag: dspy_source_paths
    value:
    - dspy/primitives/python_interpreter.py
  dspy_source_urls:
    tag: dspy_source_urls
    value:
    - https://github.com/stanfordnlp/dspy/blob/main/dspy/primitives/python_interpreter.py
description: Local in-process Python REPL (``dspy.PythonInterpreter``).
in_subset:
- modules
from_schema: https://w3id.org/lmodel/dspy
related_mappings:
- uco_tool:CompilerType
is_a: Interpreter
slot_usage:
  interpreter_kind:
    name: interpreter_kind
    ifabsent: string(python)
    equals_string: python
attributes:
  interpreter_kind:
    name: interpreter_kind
    description: Concrete code interpreter implementation (matches an ``InterpreterKind``
      value).
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    ifabsent: string(python)
    owner: PythonInterpreter
    domain_of:
    - ProgramOfThought
    - CodeAct
    - Interpreter
    range: string
    required: true
    equals_string: python
  enable_read_paths:
    name: enable_read_paths
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    owner: PythonInterpreter
    domain_of:
    - Interpreter
    range: string
    multivalued: true
  enable_write_paths:
    name: enable_write_paths
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    owner: PythonInterpreter
    domain_of:
    - Interpreter
    range: string
    multivalued: true
  enable_env_vars:
    name: enable_env_vars
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    owner: PythonInterpreter
    domain_of:
    - Interpreter
    range: string
    multivalued: true
  enable_network_access:
    name: enable_network_access
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    ifabsent: boolean(False)
    owner: PythonInterpreter
    domain_of:
    - Interpreter
    range: boolean
  sync_files:
    name: sync_files
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    ifabsent: boolean(False)
    owner: PythonInterpreter
    domain_of:
    - Interpreter
    range: boolean
  id:
    name: id
    description: Stable opaque identifier for an instance.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    slot_uri: schema:identifier
    identifier: true
    owner: PythonInterpreter
    domain_of:
    - NamedThing
    range: Identifier
    required: true
  name:
    name: name
    description: Short human-readable name.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    slot_uri: rdfs:label
    owner: PythonInterpreter
    domain_of:
    - NamedThing
    - LMToolCallPart
    - LMMessage
    - LMToolSpec
    range: string
  description:
    name: description
    description: Free-form description.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    slot_uri: dct:description
    owner: PythonInterpreter
    domain_of:
    - NamedThing
    - LMToolSpec
    range: string