traittypes
Scipy trait types
What it is and what it does
traittypes extends the traitlets validation framework with custom attribute types designed for scientific computing workflows. It sits on top of traitlets, which provides a system for declaring typed, validated attributes on Python classes; traittypes adds domain-specific types that are commonly needed in scientific and numerical work.
The package is typically used within interactive environments or frameworks that rely on traitlets for configuration and attribute management—such as Jupyter, IPython, or scientific applications. It allows developers to declare attributes with scientific semantics (arrays, matrices, etc.) that automatically validate and coerce input data, reducing boilerplate validation code in scientific applications.
Use it for:
- Define validated array or matrix attributes in scientific model classes without manual type-checking.
- Build interactive scientific tools in Jupyter or IPython that need type-safe numerical data attributes.
- Extend traitlets-based frameworks with scipy-aware attribute types for data science workflows.
- Create configuration classes for scientific applications that require validated numerical inputs.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides custom trait types for scientific computing, extending the traitlets validation framework with domain-specific attribute types.
Yes, if you are already using traitlets in a scientific computing context and need validated scientific data types. The low install friction and permissive license make it a safe addition. However, the aging maintenance status (296 days since last release) means you should verify that the trait types you need are already implemented and stable; expect no active development or rapid responses to issues.
Install
traittypes on PyPI
pip
pip install traittypesuv
uv add traittypespoetry
poetry add traittypesInstalling traittypes
Before you install
Low install friction with a single dependency on traitlets. Maintenance status is aging—last release was 296 days ago—so expect no active development or rapid bug fixes.
License in practice
BSD license is permissive, allowing commercial and private use with minimal restrictions; attribution required.
Quickstart
pip install traittypes
from traittypes import Array
from traitlets import HasTraits
class Model(HasTraits):
data = Array()
Verify before relying
- Specific trait types provided (e.g., Array, DataFrame) and their exact signatures are not detailed in the fact sheet.
- Whether scipy is an optional or required runtime dependency beyond traitlets is unclear.
- Current maintenance status and whether the package is actively maintained or in maintenance-only mode.
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — traitlets |
| Maintenance | aging — 296 days since the last release |
| First released | |
| Downloads | 1,355,272/month — #4,007 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: traittypes-0.2.3-py2.py3-none-any.whl
Keywords: Interactive, Interpreter, Shell, Web
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
traitletsTraitlets provides typed attributes for Python…
permissive · top 1,000 on PyPI
pydantic-extra-typesProvides additional type validators and…
permissive · top 1,000 on PyPI
os-traitsos-traits provides a standardized catalog of…
permissive · top 15,000 on PyPI
scikit-miscscikit-misc provides miscellaneous tools for…
permissive · top 15,000 on PyPI
scipy-stubsProvides type stubs for the entire SciPy…
permissive · top 5,000 on PyPI
simsimdSimSIMD provides SIMD-optimized kernels for…
permissive · top 5,000 on PyPI
matscipyMatscipy provides domain-specific computational…
copyleft · top 15,000 on PyPI
spark-sklearnDistributes scikit-learn model training and…
permissive · top 15,000 on PyPI