## IdentityAlgorithmRegistry


Central registry of all known identity algorithms.


Usage

``` python
IdentityAlgorithmRegistry()
```


## Methods

| Name | Description |
|----|----|
| [get()](#get) | Get a registered identity algorithm by name. |
| [register()](#register) | Create and register an identity algorithm. |

------------------------------------------------------------------------


#### get()


Get a registered identity algorithm by name.


Usage

``` python
get(name)
```


##### Raises


`KeyError`  
If no algorithm named [name](PropertyKindRow.md#autostorage.PropertyKindRow.name) is registered.


------------------------------------------------------------------------


#### register()


Create and register an identity algorithm.


Usage

``` python
register(name, kind, identity_fn, *, parent=None, orders=None)
```


Register algorithms before opening a [Database](Database.md#autostorage.Database), which mirrors them into its `identity_algorithm` table.


##### Parameters


`name: str`  
Unique algorithm name.

`kind: IdentityKind`  
Category of identity produced.

`identity_fn: IdentityProtocol`  
Function generating the identity string of a geometry.

`parent: IdentityAlgorithm | None = None`  
Algorithm whose identity selects `other_geos`. If given, `identity_fn` receives one geometry per existing identity value among the stationary points that share the parent identity.

`orders: Iterable[int] | None = None`  
Stationary point orders the algorithm applies to. `None` if it applies to any order.


##### Raises


`ValueError`  
If an algorithm named [name](PropertyKindRow.md#autostorage.PropertyKindRow.name) is already registered, or `orders` isn't a subset of the parent's orders.
