You are viewing an older version (5.14.3). Go to latest (5.15.0)
{ } Raw JSON

bundles / traitlets 5.14.3 / traitlets / traitlets / HasTraits / class_traits

classmethod

traitlets.traitlets:HasTraits.class_traits

source: /traitlets/traitlets.py :1775

Summary

Get a dict of all the traits of this class. The dictionary is keyed on the name and the values are the TraitType objects.

Extended Summary

This method is just like the traits method, but is unbound.

The TraitTypes returned don't know anything about the values that the various HasTrait's instances are holding.

The metadata kwargs allow functions to be passed in which filter traits based on metadata values. The functions should take a single value as an argument and return a boolean. If any function returns False, then the trait is not included in the output. If a metadata key doesn't exist, None will be passed to the function.

Aliases

  • traitlets.HasTraits.class_traits