skillfed

traittypes

Scipy trait types

traittypes v0.2.3 1.4M downloads/30d#4,007 on PyPI
Permissive license BSD AGING released

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 traittypes

uv

uv add traittypes

poetry

poetry add traittypes

Installing 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

Intended Audience :: DevelopersIntended Audience :: Science/ResearchIntended Audience :: System AdministratorsLicense :: OSI Approved :: BSD LicenseProgramming Language :: PythonProgramming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6

Tags

trait types scientific computingtraitlets extensions scipycustom attribute validationscientific data typestrait validation framework
scientific-computingtype-validation

More Scientific/Engineering packages