{"id":24746,"library":"ty-types","title":"ty-types","description":"A CLI tool and JSON-RPC server that exposes Python type inference from the 'ty' library. It provides structured type descriptors, callable signature extraction, and support for generics, TypeVar bounds, and ParamSpec. Current version 0.0.31, updated frequently.","status":"active","version":"0.0.31","language":"python","source_language":"en","source_url":"https://github.com/openrewrite/ty-types","tags":["type-inference","cli","json-rpc","ty"],"install":[{"cmd":"pip install ty-types","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core type inference engine","package":"ty","optional":false}],"imports":[{"note":"Main type descriptor class.","wrong":null,"symbol":"TypeDescriptor","correct":"from ty_types import TypeDescriptor"},{"note":"The server is exported from the top-level package.","wrong":"from ty_types.server import TyTypesServer","symbol":"TyTypesServer","correct":"from ty_types import TyTypesServer"}],"quickstart":{"code":"from ty_types import TypeDescriptor\nimport os\n\n# Infer type of a Python expression\nexpr = '1 + 2'\n# Replace with actual source code or file path\ntd = TypeDescriptor(expr)\n# The descriptor will fetch type from 'ty' library\nprint(td)\n# For JSON-RPC server, use: python -m ty_types.server","lang":"python","description":"Quickstart: import TypeDescriptor and infer types. Also see CLI: `ty-types` command."},"warnings":[{"fix":"Replace any imports from `ty_types.ide_support` with `ty_types.direct_call`.","message":"The old `ide_support` module has been removed; use `direct_call` bindings instead.","severity":"deprecated","affected_versions":"<0.0.19"},{"fix":"Update consumers of serialized type data to expect `typeParameters` field always present (even if empty).","message":"Generic descriptors now always serialize type parameters; serialization format changed in 0.0.19.","severity":"breaking","affected_versions":">=0.0.19"},{"fix":"Ensure runtime environment matches Python version requirements in your project.","message":"The JSON-RPC server requires Python 3.8 or later; some advanced type features (like ParamSpec) need Python 3.10+.","severity":"gotcha","affected_versions":">=0.0.31"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Change import to `from ty_types.direct_call import ...` or use top-level exports.","cause":"The `ide_support` module was removed in v0.0.19, replaced by `direct_call`.","error":"ModuleNotFoundError: No module named 'ty_types.ide_support'"},{"fix":"Access `typeParameters` instead of `type_parameters` on serialized dict.","cause":"Serialization format changed; type parameters are now in `typeParameters` field.","error":"AttributeError: 'TypeDescriptor' object has no attribute 'type_parameters'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}