{"id":23424,"library":"chialisp-stdlib","title":"Chialisp Standard Library","description":"A standard library of Chialisp `.clib` files for use with the Chia blockchain. It provides common utility functions and macros for writing Chialisp smart contracts. Version 0.1.1 is the latest, but the library is in early development with an undefined release cadence.","status":"active","version":"0.1.1","language":"python","source_language":"en","source_url":"https://github.com/Chia-Network/chialisp-stdlib","tags":["chia","chialisp","blockchain","smart-contracts","standard-library","clib"],"install":[{"cmd":"pip install chialisp-stdlib","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required to compile Chialisp with standard library includes","package":"clvm-tools","optional":false}],"imports":[{"note":"","wrong":"","symbol":"load_clib","correct":"from chialisp_stdlib import load_clib"}],"quickstart":{"code":"from chialisp_stdlib import load_clib\n\n# Load a standard library file as a string\nstdlib_code = load_clib('condition_codes.clib')\nprint(stdlib_code[:100])\n\n# Alternatively, include during compilation (requires clvm_tools)\n# from clvm_tools import compile_clvm\n# compile_clvm('my_contract.clsp', include='./chialisp_stdlib')","lang":"python","description":"Import the library and load a .clib file as a string for use in your Chialisp compiler pipeline."},"warnings":[{"fix":"Pin to a specific version and watch the repository for updates.","message":"The library version 0.1.1 is very early and may have breaking changes in future releases.","severity":"deprecated","affected_versions":"all versions"},{"fix":"Install a Chialisp compiler (e.g., clvm-tools) and handle file inclusion in your build pipeline.","message":"The library only provides raw .clib file content as strings. It does not compile or execute Chialisp. You need clvm-tools or another compiler to use the loaded code.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `from chialisp_stdlib import ...` in your Python code.","message":"The package name uses a hyphen (chialisp-stdlib), but the import module uses an underscore (chialisp_stdlib).","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure you installed the package correctly: `pip install chialisp-stdlib`. Import with `from chialisp_stdlib import load_clib`.","cause":"The package is installed as 'chialisp-stdlib' but import uses underscore.","error":"ModuleNotFoundError: No module named 'chialisp_stdlib'"},{"fix":"Make sure you pass only the base filename (e.g., 'condition_codes.clib'), not a full path.","cause":"The load_clib function expects the filename without path; it searches inside the package data.","error":"FileNotFoundError: [Errno 2] No such file or directory: 'condition_codes.clib'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}