"Store" is not exported from module "spin_sdk.key_value"

Open
#100 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python

Research direction

Start by inspecting the Python SDK definitions behind spin_sdk.key_value and spin_sdk.wit.imports.key_value, then reproduce the language-server diagnostic for the shown import. Compare that result with the componentize-py build command; done means the supported import is no longer reported as private while the app still builds successfully.

Written by the indexing model from the issue text.

Description

Using Spin KV in my Python app, I get the following error from my language server:

from spin_sdk.key_value import Store

Error:

Diagnostics:
"Store" is not exported from module "spin_sdk.key_value"
  Import from "spin_sdk.wit.imports.key_value" instead [reportPrivateImportUsage]

The app build successfully however:

Building component my-app with `componentize-py -w spin-http componentize app -o app.wasm`
Component built successfully
Finished building all Spin components
Dominant language
Python
Stars
48
Forks
15
Avg merge
2d 23h
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from spinframework/spin-python-sdk

All issues in spinframework/spin-python-sdk

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.