{"id":3207,"library":"param","title":"Param","description":"Param is a zero-dependency Python library that enables the creation of classes with rich, declarative attributes (Parameter objects) for runtime validation, documentation, and serialization. It also provides a suite of expressive and composable APIs for reactive programming, allowing automatic updates on attribute changes and the declaration of complex reactive dependencies. Param is currently at version 2.3.3 and maintains a frequent release cadence with minor and patch updates.","status":"active","version":"2.3.3","language":"en","source_language":"en","source_url":"https://github.com/holoviz/param","tags":["declarative","parameters","reactive programming","holoviz","validation"],"install":[{"cmd":"pip install param","lang":"bash","label":"Install latest version"}],"dependencies":[],"imports":[{"note":"Commonly used for accessing parameter types and decorators directly.","symbol":"param","correct":"import param"},{"note":"The base class for creating classes with declarative parameters.","symbol":"Parameterized","correct":"from param import Parameterized"}],"quickstart":{"code":"import param\n\nclass UserForm(param.Parameterized):\n    age = param.Integer(bounds=(0, None), doc='User age')\n    name = param.String(doc='User name')\n    submit = param.Event()\n\n    @param.depends('submit', watch=True)\n    def save_user_to_db(self):\n        print(f'Saving user to db: name={self.name}, age={self.age}')\n\nuser = UserForm(name='Alice', age=30)\nprint(f'Initial user name: {user.name}, age: {user.age}')\nuser.submit = True # Triggers save_user_to_db\n\nuser.name = 'Bob'\nuser.age = 25\nuser.submit = True # Triggers save_user_to_db with new values","lang":"python","description":"This quickstart demonstrates defining a `Parameterized` class with `Integer`, `String`, and `Event` parameters. It shows how to bind a method (`save_user_to_db`) to react to changes in the `submit` parameter using the `@param.depends` decorator. Changing parameter values and triggering the event causes the dependent method to execute."},"warnings":[{"fix":"Upgrade to Python 3.10+ and consult the changelog for specific API removals, updating your code accordingly. (e.g., https://github.com/holoviz/param/compare/v2.2.1...v2.3.0)","message":"Version 2.3.0 raised the minimum supported Python version to 3.10 and removed several previously deprecated APIs. Code running on older Python versions or relying on removed APIs will break.","severity":"breaking","affected_versions":">=2.3.0"},{"fix":"Review code for operations that previously emitted warnings from `param` and address them to avoid new errors. Consult the changelog for details on specific API removals and behavior changes. (e.g., https://github.com/holoviz/param/compare/v2.1.1...v2.2.0)","message":"Version 2.2.0 removed deprecated APIs and changed warnings for unsafe operations into errors. Code that previously received warnings but continued to function might now raise exceptions.","severity":"breaking","affected_versions":">=2.2.0"},{"fix":"No code fix is required, but be aware that IDEs will now display your class's own docstring for the `__init__` method, rather than a generic one from `param`.","message":"In version 2.3.2, the `Parameterized.__init__` docstring was removed because it shadowed user-defined class docstrings in IDEs like VSCode. While not breaking, developers relying on IDEs to show the `__init__` docstring might notice its absence.","severity":"gotcha","affected_versions":">=2.3.2"},{"fix":"Ensure that `edit_constant` is used as intended to prevent mutation of constant parameters. If you were implicitly relying on the old, incorrect behavior, adjust your logic to respect the constant nature of parameters.","message":"Version 2.3.1 fixed a regression in the `param.parameterized.edit_constant` context manager, which previously allowed class value mutation even when not constant. Users relying on this unintended behavior might see a change in mutation prevention.","severity":"gotcha","affected_versions":">=2.3.1"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}