# uproot.classname_encode

Defined in [uproot.model](https://github.com/scikit-hep/uproot/blob/f1299d71fa4f435b1901386346c8a42adbd72642/src/uproot/model.py) on [line 211](https://github.com/scikit-hep/uproot/blob/f1299d71fa4f435b1901386346c8a42adbd72642/src/uproot/model.py#L211).

### uproot.model.classname_encode(classname, version=None, unknown=False)

Converts a C++ (decoded) classname, such as `Some::Thing` into a Python
classname (encoded), such as `Model_Some_3a3a_Thing`.

If `version` is a number such as `2`, the Python name is suffixed by
version, such as `Model_Some_3a3a_Thing_v2`.

If `unknown` is True, the `Model_` prefix becomes `Unknown_`.

C++ classnames can include namespace delimiters (`::`) and template
arguments (`<` and `>`), which have to be translated into
`[A-Za-z_][A-Za-z0-9_]*` for Python. Non-conforming characters and also
underscores are translated to their hexadecimal equivalents and surrounded
by underscores. Additionally, Python models of C++ classes are prepended
with `Model_` (or `Unknown_` if a streamer isn’t found).
