{"library":"private-attribute-cpp","title":"private-attribute-cpp","description":"Provides a mechanism to define private attributes in C++ implementations exposed to Python via pybind11. Current version 1.4.11, released on PyPI. Development is active on GitHub.","language":"python","status":"active","last_verified":"Fri May 01","install":{"commands":["pip install private-attribute-cpp"],"cli":null},"imports":["from private_attribute_cpp import PrivateAttribute"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from private_attribute_cpp import PrivateAttribute\n\n# Define a class with a private attribute\nclass MyClass:\n    def __init__(self):\n        self.__private_attr = PrivateAttribute('private_value')\n\n    def get_private_attr(self):\n        return self.__private_attr\n\nobj = MyClass()\nprint(obj.get_private_attr())  # Access via method","lang":"python","description":"Shows how to use PrivateAttribute to define a private attribute in a Python class.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}