standard

Package Contents

Functions

convert_camel_case_to_snake_case(name)
convert_camel_case_to_text_form(name)
_create_standard_configuration_models_py_(code,geometry_type,absolute_path,schema=None,primary_key_is_string=False) The simplest way to get a python file containing a database definition in sqlalchemy orm way. It will
create_tables_from_standard_configuration(configuration_yaml_path,section=”pyramid_oereb”,tables_only=False,sql_file=None) Creates all schemas which are defined in the passed yaml file: <section>.<plrs>.[<plr>.<code>]. The code
drop_tables_from_standard_configuration(configuration_yaml_path,section=”pyramid_oereb”) Drops all schemas which are defined in the passed yaml file: <section>.<plrs>.[<plr>.<code>]. The code
_create_standard_yaml_config_(name=”pyramid_oereb_standard.yml”,database=”postgresql://postgres:password@localhost/pyramid_oereb”) Creates the specified YAML file using a template. This YAML file contains the standard
convert_camel_case_to_snake_case(name)
convert_camel_case_to_text_form(name)
_create_standard_configuration_models_py_(code, geometry_type, absolute_path, schema=None, primary_key_is_string=False)
The simplest way to get a python file containing a database definition in sqlalchemy orm way. It will
contain all necessary definitions to produce an extract as the specification defines for the new topic.
Args:

code (str): The unique Code for the new model (see oereb specification for more details) geometry_type (str): A valid geometry type. absolute_path (str): The absolute Path where the genderated python file will be placed. It

must bewriteable by the user running this command.

schema (str): The schema name. If not specified, “name” will be used. primary_key_is_string (bool): The type of the primary key. You can use this to switch between STRING

type or INTEGER type. Standard is to INTEGER => False
create_tables_from_standard_configuration(configuration_yaml_path, section="pyramid_oereb", tables_only=False, sql_file=None)

Creates all schemas which are defined in the passed yaml file: <section>.<plrs>.[<plr>.<code>]. The code must be camel case. It will be transformed to snake case and used as schema name. Creates all tables inside the created schemas. This only affects the sqlalchemy models which are defined with the Base class from pyramid_oereb.standard.models.

Args:
configuration_yaml_path (str): The absolute path to the yaml file which contains the plr
definitions.

section (str): The section in yaml file where the plrs are configured in. Default is ‘pyramid_oereb’. tables_only (bool): True to skip creation of schema. Default is False. sql_file (file): the file to generate. Default is None (in the database).

drop_tables_from_standard_configuration(configuration_yaml_path, section="pyramid_oereb")

Drops all schemas which are defined in the passed yaml file: <section>.<plrs>.[<plr>.<code>]. The code must be camel case. It will be transformed to snake case and used as schema name. Drops all tables inside the created schemas.

Args:
configuration_yaml_path (str): The absolute path to the yaml file which contains the plr
definitions.

section (str): The section in yaml file where the plrs are configured in. Default is ‘pyramid_oereb’.

_create_standard_yaml_config_(name="pyramid_oereb_standard.yml", database="postgresql://postgres:password@localhost/pyramid_oereb")

Creates the specified YAML file using a template. This YAML file contains the standard configuration to run a oereb server out of the box.

Args:

(str): The name of the new file. Default database (str): The database connection string.Default:

‘postgresql://postgres:password@localhost/pyramid_oereb’