On this page
kindof
Prev: enforce-type | Up: projects | Next: builtouts
Rel: wispsy, Foundation, enforce-type
Ref: wispsy on GitHub
Tags: #public #wispsy #project #foundation #tier/core
Role
Small, typed runtime object inspection (inspect) for Python 3.9+ (0.1.0, zero runtime deps)—exposing type, fields, methods, signatures, annotations, and a recursive JSON-compatible schema without serializing an object's values directly.
Install
python -m pip install kindof
Quickstart
from kindof import inspect
class User:
name: str
active: bool = True
def greet(self, punctuation: str = "!") -> str:
return f"{self.name}{punctuation}"
user = User()
user.name = "Ada"
result = inspect(user)
assert result.methods["greet"].signature == "(self, punctuation: str = '!') -> str"
assert result.schema["properties"]["name"] == {"type": "string"}
When to Reach for It
- Describing Python objects into stable metadata or JSON-compatible schemas for diagnostics, tooling, or capability contracts.
Gotchas & Pitfalls
- Metadata only, never values:
inspect()deliberately omits runtime attribute values to keep schemas safe and deterministic—it is not a JSON data serializer. - Recursive cycle handling: Self-referential types are bounded in the recursive
schemaoutput, so check schema refs rather than assuming a flat acyclic dict. - Wide Python floor (
>=3.9): Designed to stay compatible back to Python 3.9 with zero runtime deps—avoid relying on Python 3.14-only annotation features if targeting older runtimes.
Pairs With
- enforce-type — Pairs runtime type enforcement with structured inspection.
- function-sequence — Complements JSON-structured progress and execution output.
Metadata
type: project-card
slug: kindof
org: wispsy
repo: wispsy/kindof
package: kindof
version: 0.1.0
requires_python: ">=3.9"
layer: foundation
topic: wispsy-foundation
status: active
language: python
source_docs: README.md, docs/
Linked from
Related notes
- wiki/projects/builtouts Linked here; links to this page; shared tags: #foundation, #project, #tier, #wispsy
- wiki/projects/enforce-type Linked here; links to this page; shared tags: #foundation, #project, #tier, #wispsy
- wiki/stack/foundation Linked here; links to this page; shared tags: #foundation, #tier, #wispsy
- wiki/projects Linked here; links to this page; shared tags: #wispsy
- wiki/projects/function-sequence Linked here; shared tags: #project, #tier, #wispsy
- wiki/choosing links to this page; shared tags: #tier, #wispsy
- wiki/compatibility links to this page; shared tags: #tier, #wispsy
- wiki/orgs/wispsy Linked here; shared tags: #tier, #wispsy
- tuts/third_party/python3/wispsy links to this page; shared tags: #tier
- wiki/projects/astree shared tags: #foundation, #project, #tier, #wispsy