{"id":27230,"library":"pccm","title":"PCCM - Python C++ Code Manager","description":"PCCM is a Python library for generating C++ code from Python class definitions, enabling seamless interoperability between Python and C++. It is currently at version 0.4.16, with moderate release cadence targeting Python >=3.6.","status":"active","version":"0.4.16","language":"python","source_language":"en","source_url":"https://github.com/FindDefinition/PCCM","tags":["c++","code-generation","interop","python-to-cpp"],"install":[{"cmd":"pip install pccm","lang":"bash","label":"Install via pip"}],"dependencies":[],"imports":[{"note":"The correct symbol is ClassBuilder, not a submodule.","wrong":"from pccm import builder","symbol":"ClassBuilder","correct":"from pccm import ClassBuilder"},{"note":"PccmClass is exported directly from pccm, not a nested module.","wrong":"from pccm.core import PccmClass","symbol":"PccmClass","correct":"from pccm import PccmClass"}],"quickstart":{"code":"from pccm import ClassBuilder, PccmClass\n\nclass MyClass(PccmClass):\n    def __init__(self):\n        super().__init__()\n        self.add_public_method('hello', [])\n\nbuilder = ClassBuilder()\nbuilder.add_class(MyClass)\ncpp_code = builder.build()\nprint(cpp_code)\n","lang":"python","description":"Define a PCCM class, add it to a builder, and generate C++ code."},"warnings":[{"fix":"Replace add_method with add_public_method (or add_private_method for private).","message":"Version 0.4.x changed the API for method registration: use add_public_method instead of add_method.","severity":"breaking","affected_versions":">=0.4.0"},{"fix":"Write the returned string to a file manually if needed.","message":"ClassBuilder.build() returns a string, not a file. Users often expect it to write to disk.","severity":"gotcha","affected_versions":"all"},{"fix":"Replace add_property with add_getter_setter.","message":"Deprecated method 'add_property' is removed in 0.4.x; use 'add_getter_setter' instead.","severity":"deprecated","affected_versions":">=0.4.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 pccm' in the correct Python environment.","cause":"Library not installed or installed in wrong environment.","error":"ModuleNotFoundError: No module named 'pccm'"},{"fix":"Update pccm to latest version: 'pip install --upgrade pccm' and use correct import: from pccm import ClassBuilder","cause":"Incorrect import or older version of pccm (<0.4.0) does not have ClassBuilder.","error":"AttributeError: module 'pccm' has no attribute 'ClassBuilder'"},{"fix":"Provide method name: self.add_public_method('method_name', arg_types)","cause":"Missing method name argument.","error":"TypeError: add_public_method() missing 1 required positional argument: 'name'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}