Skip to content

docs(v4): postgres and sqlite python updates#190

Merged
vdice merged 1 commit intomainfrom
docs/v4/py-postgres-sqlite-updates
Apr 13, 2026
Merged

docs(v4): postgres and sqlite python updates#190
vdice merged 1 commit intomainfrom
docs/v4/py-postgres-sqlite-updates

Conversation

@vdice
Copy link
Copy Markdown
Contributor

@vdice vdice commented Apr 10, 2026

Ref spinframework/spin-python-sdk#148

TODO:

  • fill in a few URLs once the above PR lands

@github-actions
Copy link
Copy Markdown

🚀 preview deployed successfully to Fermyon Cloud and available at https://spin-docs-pr-190-rt3oaa1u.fermyon.app

Copy link
Copy Markdown
Contributor

@itowlson itowlson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (once, as you say, the TBA URLs go in) - thanks!


> As seen in the example above, you can utilize the [collect](https://spinframework.github.io/spin-python-sdk/v4/util.html#spin_sdk.util.collect) method from the `util` package to handle the `StreamReader` and `FutureReader` pair, aggregating the resulting rows into memory.

* The `Connection` object doesn't surface the `close` function.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Components can't deterministically close a connection? (Oh is this to get around "what if they close it while the row stream is still being traversed" kind of thing?)

Copy link
Copy Markdown
Contributor Author

@vdice vdice Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, not quite sure of the genesis of this entry (predates the updated v4 docs) Ah, I see I swiped this from the pre-existing note in the sqlite guide. Remove/update both?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's true, then keep. If it's untrue, then remove. (My guess is copypasta from the Rust Connection object around the time we switched from "pass the address" to "methods on a resource".)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to say it is true insofar as neither the SDK nor the underlying WITs surface a close function. As to why they don't, I'm not sure on the details.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, perhaps because the connection resource doesn't, and you instead use resource drop functionality? Not a worry for now, let's review after 4.0 and figure out 1. if Spin is doing this correctly and 2. how to surface it in SDKs. Sorry for the noise.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created #195 to track.

Signed-off-by: Vaughn Dice <vdice@akamai.com>
@vdice vdice force-pushed the docs/v4/py-postgres-sqlite-updates branch from 5ec33ce to ef3a703 Compare April 13, 2026 17:12
@vdice vdice merged commit 6ae1d6a into main Apr 13, 2026
3 checks passed
@vdice vdice deleted the docs/v4/py-postgres-sqlite-updates branch April 13, 2026 20:03
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.

2 participants