Skip to content

fix: import for State, for using State Schema, is missing in streamsync highlevel import#370

Merged
ramedina86 merged 1 commit intowriter:devfrom
FabienArcellier:369/state-import-is-missing
Apr 2, 2024
Merged

fix: import for State, for using State Schema, is missing in streamsync highlevel import#370
ramedina86 merged 1 commit intowriter:devfrom
FabienArcellier:369/state-import-is-missing

Conversation

@FabienArcellier
Copy link
Contributor

@FabienArcellier FabienArcellier commented Apr 1, 2024

fix #369

You have to write ss.core.State instead of ss.State

import streamsync as ss

class MyappSchema(ss.core.State):
    title: str

class AppSchema(ss.StreamsyncState):
    my_app: MyappSchema
    counter: int

initial_state = ss.init_state({
    "counter": 0,
    "my_app": {
        "title": "Nested value"
    }
}, schema=AppSchema)

@ramedina86 ramedina86 merged commit f40bda6 into writer:dev Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

import for State, for using State Schema, is missing in streamsync highlevel import

2 participants