{"id":27404,"library":"smoldot-light","title":"smoldot-light","description":"Python bindings for the smoldot_light Rust crate, providing a lightweight WebAssembly-based Substrate/Polkadot light client. Current version 0.1.0, initial release.","status":"active","version":"0.1.0","language":"python","source_language":"en","source_url":"https://github.com/JAMdotTech/py-smoldot-light","tags":["substrate","polkadot","light-client","wasm","blockchain"],"install":[{"cmd":"pip install smoldot-light","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Used for type hints on Python <3.11","package":"typing_extensions","optional":true}],"imports":[{"note":"Main client class","symbol":"SmoldotLight","correct":"from smoldot_light import SmoldotLight"}],"quickstart":{"code":"from smoldot_light import SmoldotLight\n\nclient = SmoldotLight()\n# Example: connect to a Polkadot relay chain via a light client\nclient.add_chain('polkadot')\nprint(client.chains)","lang":"python","description":"Create a light client instance and add a chain."},"warnings":[{"fix":"Pin to exact version and expect breaking changes.","message":"The library is in early alpha (v0.1.0). API may change without notice. Not production-ready.","severity":"gotcha","affected_versions":"<=0.1.0"},{"fix":"Use locks or run in a single-threaded context.","message":"SmoldotLight is not thread-safe. Concurrent calls may cause undefined behavior.","severity":"gotcha","affected_versions":"<=0.1.0"},{"fix":"N/A","message":"No deprecations yet—library is at initial release.","severity":"deprecated","affected_versions":"all"},{"fix":"Use 'from smoldot_light import SmoldotLight'.","message":"Import path is `smoldot_light`, not `smoldot_light.client` or other. Incorrect imports will fail with ModuleNotFoundError.","severity":"breaking","affected_versions":"<=0.1.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run: pip install smoldot-light ; then import: import smoldot_light","cause":"Package name on PyPI is 'smoldot-light' (hyphen), but module name is 'smoldot_light' (underscore). Installing with hypen works but import uses underscore.","error":"ModuleNotFoundError: No module named 'smoldot_light'"},{"fix":"Use: from smoldot_light import SmoldotLight","cause":"Typo in class name or incorrect import. The class is 'SmoldotLight' (capital S, capital L).","error":"AttributeError: module 'smoldot_light' has no attribute 'SmoldotLight'"},{"fix":"Ensure you are on a supported platform (Linux x86_64, macOS). For Docker, use an image with glibc 2.28+.","cause":"Underlying Rust native library requires a Linux x86_64 or macOS environment. Might fail on unsupported platforms or containers without proper shared libraries.","error":"OSError: [Errno 38] Function not implemented"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}