traitlets
Traitlets Python configuration system
Install
traitlets on PyPI
pip
pip install traitletsuv
uv add traitletspoetry
poetry add traitletsPackage facts
| License | BSD 3-Clause License - Copyright (c) 2001-, IPython Development Team All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 10 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: traitlets-5.16.1-py3-none-any.whl
Keywords: Interactive, Interpreter, Shell, Web
About traitlets
from the package's own PyPI description — quoted content, verbatim
Traitlets
Tests (image) Documentation Status (image) Tidelift (image)
| home | https://github.com/ipython/traitlets |
| pypi-repo | https://pypi.org/project/traitlets/ |
| docs | https://traitlets.readthedocs.io/ |
| license | Modified BSD License |
Traitlets is a pure Python library enabling:
- the enforcement of strong typing for attributes of Python objects (typed attributes are called "traits");
- dynamically calculated default values;
- automatic validation and coercion of trait attributes when attempting a change;
- registering for receiving notifications when trait values change;
- reading configuring values from files or from command line...
Read as markdown · JSON record · Source repository · Homepage · Docs
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
Traitlets provides typed attributes for Python objects with automatic validation, coercion, dynamic defaults, and change notifications—a lightweight pure-Python alternative to the Enthought traits library that powers IPython and Jupyter configuration.
Installation is straightforward with no runtime dependencies; the package is actively maintained with a recent release 10 days ago and strong upstream support from the IPython/Jupyter ecosystem.
BSD 3-Clause (permissive) license allows commercial and private use with minimal restrictions; you must retain copyright notices and the license text in distributions.
Usage
pip install traitlets
from traitlets import HasTraits, Unicode, Integer, observe
class Example(HasTraits):
name = Unicode()
count = Integer(0)
@observe('count')
def _count_changed(self, change):
print(f"{change['name']} changed to {change['new']}")
obj = Example(name='test', count=5)
Requires Python 3.10 or later.
Verdict: Traitlets is a mature, actively maintained library with zero known vulnerabilities, no external dependencies, and permissive licensing. It is well-suited for projects requiring declarative attribute typing and validation, particularly those integrating with IPython or Jupyter ecosystems.
Similar packages
permissive · top 1,000 on PyPI
jupyter-clientpermissive · top 1,000 on PyPI
notebook-shimpermissive · top 1,000 on PyPI
ipykernelpermissive · top 1,000 on PyPI
jupyter-server-terminalspermissive · top 1,000 on PyPI
nbconvertpermissive · top 1,000 on PyPI
ipywidgetspermissive · top 1,000 on PyPI
jupyter-serverpermissive · top 1,000 on PyPI
jupyterlab-serverpermissive · top 1,000 on PyPI
widgetsnbextensionpermissive · top 1,000 on PyPI