Registry / serialization / param
library2.4.1pypypi✓ verified 23d ago

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.

pip install param
INSTALL
IMPORT
SIG · PARAM
P
param
serializationpythonv2.4.1
Install
1.7s avg
Import
128ms
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.4.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.132s · 18.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.7s · import 0.124s · 19MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

param
import param
Commonly used for accessing parameter types and decorators directly.
Parameterized
from param import Parameterized
The base class for creating classes with declarative parameters.

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.

import param class UserForm(param.Parameterized): age = param.Integer(bounds=(0, None), doc='User age') name = param.String(doc='User name') submit = param.Event() @param.depends('submit', watch=True) def save_user_to_db(self): print(f'Saving user to db: name={self.name}, age={self.age}') user = UserForm(name='Alice', age=30) print(f'Initial user name: {user.name}, age: {user.age}') user.submit = True # Triggers save_user_to_db user.name = 'Bob' user.age = 25 user.submit = True # Triggers save_user_to_db with new values
Debug
Known issues
breakingVersion 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.
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)
affects: >=2.3.0
breakingVersion 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.
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)
affects: >=2.2.0
gotchaIn 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.
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`.
affects: >=2.3.2
gotchaVersion 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.
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.
affects: >=2.3.1
Errors
Common errors & fixes
TypeError: List parameter 'L.ls' items must be instances of <class 'str'>, not <class 'int'>.
This error occurs when you attempt to assign a list containing items of an incorrect type to a `param.List` parameter that has a specified `item_type`.
fix
Ensure that all items in the list you are assigning conform to the `item_type` defined for the `param.List` parameter.
AttributeError: 'DataFrame' object has no attribute 'param'
This error typically arises when attempting to access the `.param` attribute on a standard Pandas DataFrame object, which is not a `param.Parameterized` object. The `.param` attribute is specific to classes that inherit from `param.Parameterized`.
fix
Ensure that the object you are interacting with is an instance of a `param.Parameterized` class or a Param-aware DataFrame (e.g., from Panel or other HoloViz libraries that integrate with Param), or use standard Pandas DataFrame methods if not intending to use Param's features. If using with Panel, ensure you are using `pn.pane.DataFrame` or `param.DataFrame` if available and applicable, rather than raw `pd.DataFrame`.
param.depends(on_init=True) does not execute without watch=True
When using the `@param.depends` decorator with `on_init=True` to trigger a method on initialization, the method will not execute unless `watch=True` is also explicitly set. `on_init=True` merely marks it for potential initialization execution, while `watch=True` enables the active monitoring and execution.
fix
To ensure a method decorated with `@param.depends` runs on initialization, you must include both `on_init=True` and `watch=True` in the decorator arguments.
ModuleNotFoundError: No module named 'param'
This error means that the Python interpreter cannot find the 'param' library. This usually happens if the library is not installed in the active Python environment or if there's a typo in the import statement.
fix
Install the 'param' library using pip: `pip install param`.
Upgrade
Version history
2.4.1latest on PyPI · released Jun 9, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources
param — pip install param · libregistry