datacatalog.identifiers.abaco package

Submodules

datacatalog.identifiers.abaco.actorid module

datacatalog.identifiers.abaco.actorid.generate()[source]
datacatalog.identifiers.abaco.actorid.validate(text_string, permissive=False)[source]

Validate whether a string is a hashid

Parameters:
  • text_string (str) – the value to validate
  • permissive (bool, optional) – whether to return false or raise Exception on failure
Raises:

ValueError – The passed value was not a Hashid and permissive was False

Returns:

Whether the passed value is a Hashid

Return type:

bool

Warning

This is better for opt-in classification than formal valdiation as there are several edge cases than can render a false negative.

datacatalog.identifiers.abaco.actorid.mock()[source]

Create a Hashid that will not validate

This is useful for testing.

Returns:The new Hashid
Return type:str
datacatalog.identifiers.abaco.actorid.get_schemas()[source]

datacatalog.identifiers.abaco.examples module

datacatalog.identifiers.abaco.execid module

datacatalog.identifiers.abaco.execid.generate()[source]
datacatalog.identifiers.abaco.execid.validate(text_string, permissive=False)[source]

Validate whether a string is a hashid

Parameters:
  • text_string (str) – the value to validate
  • permissive (bool, optional) – whether to return false or raise Exception on failure
Raises:

ValueError – The passed value was not a Hashid and permissive was False

Returns:

Whether the passed value is a Hashid

Return type:

bool

Warning

This is better for opt-in classification than formal valdiation as there are several edge cases than can render a false negative.

datacatalog.identifiers.abaco.execid.mock()[source]

Create a Hashid that will not validate

This is useful for testing.

Returns:The new Hashid
Return type:str
datacatalog.identifiers.abaco.execid.get_schemas()[source]

datacatalog.identifiers.abaco.hashid module

datacatalog.identifiers.abaco.hashid.generate()[source]
datacatalog.identifiers.abaco.hashid.validate(text_string, permissive=False)[source]

Validate whether a string is a hashid

Parameters:
  • text_string (str) – the value to validate
  • permissive (bool, optional) – whether to return false or raise Exception on failure
Raises:

ValueError – The passed value was not a Hashid and permissive was False

Returns:

Whether the passed value is a Hashid

Return type:

bool

Warning

This is better for opt-in classification than formal valdiation as there are several edge cases than can render a false negative.

datacatalog.identifiers.abaco.hashid.mock()[source]

Create a Hashid that will not validate

This is useful for testing.

Returns:The new Hashid
Return type:str
class datacatalog.identifiers.abaco.hashid.IdentifierSchema(**kwargs)[source]

Bases: datacatalog.jsonschemas.schema.JSONSchemaBaseObject

class datacatalog.identifiers.abaco.hashid.JSONSchemaCollection[source]

Bases: dict

Collection of JSON schemas indexed by basename(schema filename)

datacatalog.identifiers.abaco.nonceid module

datacatalog.identifiers.abaco.nonceid.generate()[source]
datacatalog.identifiers.abaco.nonceid.validate(text_string, permissive=False)[source]

Validate whether a string is an Abaco nonce

Parameters:
  • text_string (str) – the value to validate
  • permissive (bool, optional) – whether to return false or raise Exception on failure
Raises:

ValueError – The passed value was not a Nonce and permissive was False

Returns:

Whether the passed value is a Nonce

Return type:

bool

Warning

This is better for opt-in classification than formal valdiation as there are several edge cases than can render a false negative.

datacatalog.identifiers.abaco.nonceid.mock()[source]
datacatalog.identifiers.abaco.nonceid.get_schemas()[source]

datacatalog.identifiers.abaco.schemas module

datacatalog.identifiers.abaco.schemas.get_schemas()[source]

Discovery and return known JSON schemas

Returns:JSONSchemaCollection - Collection of schemas, keyed by name