Skip to content

Installation

Requirements

  • Python 3.7 or higher

Basic Install

pip install ucon

Optional Extras

ucon provides optional dependencies for specific use cases:

Pydantic Integration

For API validation and JSON serialization with Pydantic v2:

pip install ucon[pydantic]

MCP Server

For AI agent integration (Claude Desktop, Claude Code, Cursor, etc.):

pip install ucon[mcp]

Python 3.10+

The MCP extra requires Python 3.10 or higher.

Multiple Extras

Install multiple extras at once:

pip install ucon[pydantic,mcp]

Verify Installation

>>> from ucon import units
>>> print(units.meter(5))
<5 m>

Development Install

For contributing or local development:

git clone https://github.com/withtwoemms/ucon.git
cd ucon
make venv
source .ucon-3.12/bin/activate

Run the test suite:

make test