deriva.config package

Submodules

deriva.config.acl_config module

class deriva.config.acl_config.ACLSpec(specdict)[source]

Bases: deriva.config.base_config.BaseSpec

validate()[source]
class deriva.config.acl_config.ACLSpecList(dictlist=None)[source]

Bases: deriva.config.base_config.BaseSpecList

class deriva.config.acl_config.AclCLI[source]

Bases: deriva.config.base_config.ConfigBaseCLI

class deriva.config.acl_config.AclConfig(server, catalog_id, config_file, credentials, schema_name=None, table_name=None, verbose=False)[source]

Bases: object

ACL_TYPES = ['catalog_acl', 'schema_acls', 'table_acls', 'column_acls', 'foreign_key_acls']
GC_NAME = 'groups'
GLOBUS_PREFIX = 'https://auth.globus.org/'
NC_NAME = 'name'
ROBOT_PREFIX_FORMAT = 'https://{server}/webauthn_robot/'
add_node_acl(node, acl_name)[source]
add_node_acl_binding(node, table_node, binding_name)[source]
apply_acls()[source]
create_or_validate_group_table()[source]
create_or_validate_schema(schema_name)[source]
create_table(schema_name, table_name, table_spec, comment=None)[source]
dumps()[source]

Dump a serialized (string) representation of the config.

expand_acl_binding(binding, table_node)[source]
expand_acl_definition(acl_name)[source]
expand_acl_definitions()[source]
expand_group(group_name)[source]
expand_groups()[source]
expand_projection(proj, table_node)[source]
expand_projection_column(col_name, table_node)[source]
get_group(group_name)[source]
make_speclist(name)[source]
save_groups()[source]
set_acls()[source]
set_catalog_acls(catalog)[source]
set_column_acls(column, table)[source]
set_fkey_acls(fkey, table)[source]
set_node_acl(node, spec)[source]
set_node_acl_bindings(node, table_node, binding_list, invalidate_list)[source]
set_schema_acls(schema)[source]
set_table_acls(table)[source]
validate_globus_group(group)[source]
validate_group(group)[source]
validate_webauthn_robot(group)[source]
exception deriva.config.acl_config.NoForeignKeyError[source]

Bases: ValueError

class deriva.config.acl_config.Table(d)[source]

Bases: deriva.core.utils.core_utils.AttrDict

ERMREST_DEFAULT_COLS = ['RID', 'RCB', 'RMB', 'RCT', 'RMT']
find_keys()[source]
getBaseEntityURL()[source]
getColumn(name)[source]
getDefaultCols(add_ermrest_defaults=True)[source]
getRow(catalog, row, filters)[source]
getRowFilter(row)[source]
insertRows(catalog, rows)[source]
row_has_key(row, key)[source]
updateRow(catalog, row)[source]
upsertRow(catalog, row)[source]
upsertRows(catalog, rows)[source]
deriva.config.acl_config.main()[source]

deriva.config.annotation_config module

class deriva.config.annotation_config.AttrConfig(server, catalog_id, config_file, credentials, verbose=False, schema_name=None, table_name=None)[source]

Bases: object

apply_annotations()[source]
find_best_column_specs(schema_name, table_name, column_name)[source]
find_best_fkey_specs(fkey)[source]
find_best_schema_specs(schema_name)[source]
find_best_table_specs(schema_name, table_name)[source]
find_corresponding_fkey(table, base_fkey)[source]
find_named_column(table, column_name)[source]
find_named_schema(catalog, schema_name)[source]
find_named_table(schema, table_name)[source]
make_speclist(name)[source]
node_name(node)[source]
set_attributes()[source]
set_catalog_annotations()[source]
set_column_annotations(column, saved_column)[source]
set_fkey_annotations(fkey, saved_fkey)[source]
set_node_annotations(node, specs, saved_node)[source]
set_schema_annotations(schema, saved_schema)[source]
set_table_annotations(table, saved_table)[source]
class deriva.config.annotation_config.AttrSpec(specdict, managed_annotations, ignore_unmanaged, ignored_annotations)[source]

Bases: deriva.config.base_config.BaseSpec

validate_annotation()[source]
class deriva.config.annotation_config.AttrSpecList(known_attrs, specdict, strict=False)[source]

Bases: deriva.config.base_config.BaseSpecList

SPEC_TYPES = ['catalog_annotations', 'schema_annotations', 'table_annotations', 'column_annotations', 'foreign_key_annotations']
add_list(dictlist)[source]
annotation_list(orig_list)[source]
exception deriva.config.annotation_config.NoForeignKeyError[source]

Bases: ValueError

deriva.config.annotation_config.main()[source]

deriva.config.base_config module

class deriva.config.base_config.BaseSpec(specdict, speclist, spectype, validate_node_types_only=False)[source]

Bases: dict

ATTRIBUTE_TYPES = ['schema', 'table', 'column', 'foreign_key']
column_entry_matches(schema_name, table_name, column_name, exact=False, key=None)[source]
config_format()[source]
foreign_key_entry_matches(table_schema_name, table_name, fkey_schema_name, fkey_name, exact=False, key=None)[source]
get_pattern(base)[source]
has_node_key(key)[source]
is_exact_spec()[source]
is_node_spec()[source]
classmethod make_pat_name(base)[source]
matches(base, value, exact=False, key=None)[source]
schema_entry_matches(schema_name, exact=False, key=None)[source]
set_keys()[source]
table_entry_matches(schema_name, table_name, exact=False, key=None)[source]
validate()[source]
validate_node_types()[source]
class deriva.config.base_config.BaseSpecList(type, dictlist=None, strict=True)[source]

Bases: object

add_list(dictlist)[source]
add_spec(spec)[source]
find_best_column_spec(schema_name, table_name, column_name, key=None)[source]
find_best_foreign_key_name_spec(table_schema_name, table_name, fkey_schema_name, fkey_name, key)[source]
find_best_foreign_key_spec(table_schema_name, table_name, names, key=None)[source]
find_best_schema_spec(schema_name, key=None)[source]
find_best_single_foreign_key_spec(schema_name, table_name, fkey_name, key=None)[source]
find_best_table_spec(schema_name, table_name, key=None)[source]
find_catalog_spec(key)[source]
get_specs()[source]
class deriva.config.base_config.ConfigBaseCLI(description, epilog, version)[source]

Bases: deriva.core.base_cli.BaseCLI

classmethod check_schema_table_args(args)[source]
classmethod get_schema_arg_list(args)[source]
classmethod get_table_arg(args)[source]
class deriva.config.base_config.ConfigUtil[source]

Bases: object

classmethod find_toplevel_node(catalog_config, schema_name, table_name)[source]

deriva.config.dump_catalog_annotations module

class deriva.config.dump_catalog_annotations.Annotations(server, catalog, credentials, config)[source]

Bases: object

add_catalog_annotations(catalog)[source]
add_column_annotations(table, column)[source]
add_foreign_key_annotations(fkey)[source]
add_schema_annotations(schema)[source]
add_table_annotations(table)[source]
check_consolidation(matches, value)[source]
consolidated_column_annotation(annotation)[source]
consolidated_foreign_key_annotation(annotation)[source]
consolidated_schema_annotation(annotation)[source]
consolidated_table_annotation(annotation)[source]
dumps()[source]
find_relevant_annotations(annotations)[source]
munge_specs(annotation_list)[source]
types_list()[source]
deriva.config.dump_catalog_annotations.main()[source]

Module contents