{"id":23467,"library":"craft-store","title":"Craft Store","description":"Store bindings for Snaps and Charms, part of the Canonical craft tools ecosystem. Provides programmatic access to the Snap Store and Charmhub. Current version 3.3.0, requires Python >=3.10, actively maintained.","status":"active","version":"3.3.0","language":"python","source_language":"en","source_url":"https://github.com/canonical/craft-store","tags":["snap","charm","store","canonical","craft"],"install":[{"cmd":"pip install craft-store","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Used for data validation, migrated to v2 in 3.0.0","package":"pydantic","optional":false},{"reason":"Optional; used for credential storage. Version 25.0 is incompatible (see warnings).","package":"keyring","optional":true},{"reason":"HTTP client for API calls","package":"requests","optional":false}],"imports":[{"note":"StoreClient was moved to top-level in 3.0.0; old deep import may still work but is non-public.","wrong":"from craft_store.client import StoreClient","symbol":"StoreClient","correct":"from craft_store import StoreClient"},{"note":"Models submodule is available from top-level as well.","wrong":"from craft_store.models import ...","symbol":"models","correct":"from craft_store import models"},{"note":"Common pattern to catch specific store exceptions.","symbol":"errors","correct":"from craft_store import errors"}],"quickstart":{"code":"from craft_store import StoreClient\nclient = StoreClient(base_url='https://api.snapcraft.io/v2/', application_name='my-app')\n# Use client for store operations, e.g.:\n# client.upload_snap('/path/to/snap.snap', 'my-snap', 'stable')\nprint('Client initialized')","lang":"python","description":"Initialize StoreClient with base URL and application name. See docs for authentication details."},"warnings":[{"fix":"Upgrade Python environment to 3.10 or above.","message":"Minimum Python version changed to 3.10 in 3.0.0.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Update any Pydantic v1 patterns (e.g., .dict() -> .model_dump()).","message":"Migrated from Pydantic v1 to v2 in 3.0.0, which may break serialization for custom models.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Pin keyring to <25.0 or avoid using keyring-based credential storage.","message":"keyring v25.0 is known to be incompatible.","severity":"deprecated","affected_versions":"2.6.1 and earlier, but may affect later if using keyring"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'from craft_store import StoreClient'. Ensure you have at least version 3.0.0 and Python >=3.10.","cause":"Using wrong import path from older version or missing install.","error":"ImportError: cannot import name 'StoreClient' from 'craft_store'"},{"fix":"If using craft-store <3.0.0, use .dict() instead of .model_dump(). For >=3.0.0, ensure your code is compatible with Pydantic v2.","cause":"Code uses Pydantic v2 methods but craft-store 2.x uses Pydantic v1.","error":"pydantic.errors.PydanticUserError: `model_dump` is not available in Pydantic v1"},{"fix":"Unlock the keyring or use environment variable CRAFT_STORE_TOKEN to avoid keyring.","cause":"Keyring daemon is locked or inaccessible (e.g., GNOME Keyring without session).","error":"KeyringLocked: The keyring is locked."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}