new database

Model Variable

class toardb.variables.models.Variable(**kwargs)[source]

Bases: sqlalchemy.orm.decl_api._DynamicAttributesType, sqlalchemy.inspection.Inspectable[sqlalchemy.orm.mapper.Mapper[Any]]

Table “public.variables”

Column

Type

Collation

Nullable

Default

id

integer

not null

nextval(‘variables_id_seq’::regclass)

name

character varying(32)

not null

longname

character varying(128)

not null

displayname

character varying(128)

not null

cf_standardname

character varying(128)

not null

units

character varying(64)

not null

chemical_formula

character varying(128)

not null

Indexes:

“variables_pkey” PRIMARY KEY, btree (id) “variables_name_key” UNIQUE CONSTRAINT, btree (name) “variables_name_9bc98a13_like” btree (name varchar_pattern_ops)

Referenced by:

TABLE “timeseries” CONSTRAINT “timeseries_variable_id_dd9603f5_fk_variables_id” FOREIGN KEY (variable_id) REFERENCES variables(id) DEFERRABLE INITIALLY DEFERRED

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id
name
longname
displayname
cf_standardname
units
chemical_formula
timeseries
metadata: MetaData = MetaData()
registry: RegistryType = <sqlalchemy.orm.decl_api.registry object>

Model Stationmeta

class StationmetaGlobalService (Base)

class toardb.stationmeta.models_global_services.StationmetaGlobalService(**kwargs)[source]

Bases: sqlalchemy.orm.decl_api._DynamicAttributesType, sqlalchemy.inspection.Inspectable[sqlalchemy.orm.mapper.Mapper[Any]]

Table “public.stationmeta_global_services”

Column

Type

Collation

Nullable

Default

variable_name

character varying(64)

not null

service_url

character varying(200)

not null

Indexes:

“stationmeta_global_services_service_url_key” UNIQUE CONSTRAINT, btree (service_url) “stationmeta_global_services_service_url_c8ee80c5_like” btree (service_url varchar_pattern_ops)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

variable_name
service_url
metadata: MetaData = MetaData()
registry: RegistryType = <sqlalchemy.orm.decl_api.registry object>

class StationmetaAnnotation (Base)

class toardb.stationmeta.models_annotation.StationmetaAnnotation(**kwargs)[source]

Bases: sqlalchemy.orm.decl_api._DynamicAttributesType, sqlalchemy.inspection.Inspectable[sqlalchemy.orm.mapper.Mapper[Any]]

Table “public.stationmeta_annotations”

Column

Type

Collation

Nullable

Default

id

integer

not null

nextval(‘stationmeta_annotations_id_seq’::regclass)

kind

integer

not null

0

text

text

not null

date_added

timestamp with time zone

not null

approved

boolean

not null

contributor_id

integer

not null

Indexes:

“stationmeta_annotations_pkey” PRIMARY KEY, btree (id) “stationmeta_annotations_contributor_id_a5009820” btree (contributor_id)

Check constraints:

“stationmeta_annotations_kind_check” CHECK (kind >= 0)

Foreign-key constraints:

“stationmeta_annotations_contributor_id_a5009820_fk_auth_user_id” FOREIGN KEY (contributor_id) REFERENCES auth_user(id) DEFERRABLE INITIALLY DEFERRED “stationmeta_annotations_kind_fk_ak_vocabulary_enum_val” FOREIGN KEY (kind) REFERENCES ak_vocabulary(enum_val)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id
kind
text
date_added
approved
contributor_id
station
metadata: MetaData = MetaData()
registry: RegistryType = <sqlalchemy.orm.decl_api.registry object>

class StationmetaRole (Base)

class toardb.stationmeta.models_role.StationmetaRole(**kwargs)[source]

Bases: sqlalchemy.orm.decl_api._DynamicAttributesType, sqlalchemy.inspection.Inspectable[sqlalchemy.orm.mapper.Mapper[Any]]

Table “public.stationmeta_roles”

Column

Type

Collation

Nullable

Default

id

integer

not null

nextval(‘stationmeta_roles_id_seq’::regclass)

role

integer

not null

status

integer

not null

contact_id

integer

not null

Indexes:

“stationmeta_roles_pkey” PRIMARY KEY, btree (id) “stationmeta_roles_contact_id_3bd9c160” btree (contact_id)

Check constraints:

“stationmeta_roles_role_check” CHECK (role >= 0) “stationmeta_roles_status_check” CHECK (status >= 0)

Foreign-key constraints:

“stationmeta_roles_contact_id_3bd9c160_fk_contacts_id” FOREIGN KEY (contact_id) REFERENCES contacts(id) DEFERRABLE INITIALLY DEFERRED “stationmeta_roles_role_fk_rc_vocabulary_enum_val” FOREIGN KEY (role) REFERENCES rc_vocabulary(enum_val) “stationmeta_roles_status_fk_rs_vocabulary_enum_val” FOREIGN KEY (status) REFERENCES rs_vocabulary(enum_val)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id
role
status
contact_id
contact
station
metadata: MetaData = MetaData()
registry: RegistryType = <sqlalchemy.orm.decl_api.registry object>

Model Contact

class Contact(Base)

class toardb.contacts.models.Contact(**kwargs)[source]

Bases: sqlalchemy.orm.decl_api._DynamicAttributesType, sqlalchemy.inspection.Inspectable[sqlalchemy.orm.mapper.Mapper[Any]]

Table “public.contacts”

Column

Type

Collation

Nullable

Default

id

integer

not null

nextval(‘contacts_id_seq’::regclass)

person_id

integer

organisation_id

integer

Indexes:

“contacts_pkey” PRIMARY KEY, btree (id) “contacts_person_id_organisation_id” UNIQUE CONSTRAINT, btree (person_id, organisation_id)

Foreign-key constraints:

“contacts_organisation_id_fkey” FOREIGN KEY (organisation_id) REFERENCES organisations(id) “contacts_person_id_fkey” FOREIGN KEY (person_id) REFERENCES persons(id)

Referenced by:

TABLE “stationmeta_roles” CONSTRAINT “stationmeta_roles_contact_id_fk_contacts_id” FOREIGN KEY (contact_id) REFERENCES contacts(id) DEFERRABLE INITIALLY DEFERRED TABLE “timeseries_roles” CONSTRAINT “timeseries_roles_contact_id_fk_contacts_id” FOREIGN KEY (contact_id) REFERENCES contacts(id) DEFERRABLE INITIALLY DEFERRED

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id
person_id
organisation_id
organisation
person
metadata: MetaData = MetaData()
registry: RegistryType = <sqlalchemy.orm.decl_api.registry object>

class Organisation (Base)

class toardb.contacts.models_organisation.Organisation(**kwargs)[source]

Bases: sqlalchemy.orm.decl_api._DynamicAttributesType, sqlalchemy.inspection.Inspectable[sqlalchemy.orm.mapper.Mapper[Any]]

Table “public.organisations”

Column

Type

Collation

Nullable

Default

id

integer

not null

nextval(‘organisations_id_seq’::regclass)

name

character varying(32)

not null

longname

character varying(256)

not null

kind

integer

not null

city

character varying(64)

not null

postcode

character varying(16)

not null

street_address

character varying(128)

not null

country

integer

not null

-1

homepage

character varying(200)

not null

contact_url

character varying(200)

not null

‘’

attribution

character varying(3000)

not null

‘’

Indexes:

“organisations_pkey” PRIMARY KEY, btree (id)

Check constraints:

“organisations_kind_check” CHECK (kind >= 0)

Foreign-key constraints:

“organisations_kind_fk_ok_vocabulary_enum_val” FOREIGN KEY (kind) REFERENCES ok_vocabulary(enum_val) “organisations_country_fk_cn_vocabulary_enum_val” FOREIGN KEY (country) REFERENCES cn_vocabulary(enum_val)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id
name
longname
kind
city
postcode
street_address
country
homepage
contact_url
attribution
metadata: MetaData = MetaData()
registry: RegistryType = <sqlalchemy.orm.decl_api.registry object>

class Person (Base)

class toardb.contacts.models_person.Person(**kwargs)[source]

Bases: sqlalchemy.orm.decl_api._DynamicAttributesType, sqlalchemy.inspection.Inspectable[sqlalchemy.orm.mapper.Mapper[Any]]

Table “public.persons”

Column

Type

Collation

Nullable

Default

id

integer

not null

nextval(‘persons_id_seq’::regclass)

name

character varying(64)

not null

email

character varying(128)

not null

phone

character varying(32)

not null

‘’::character varying

orcid

character varying(19)

not null

‘0000-0002-0309-8010’::character varying

isprivate

boolean

not null

false

Indexes:

“persons_pkey” PRIMARY KEY, btree (id) “persons_name_email” UNIQUE CONSTRAINT, btree (name, email)

Referenced by:

TABLE “station_roles” CONSTRAINT “station_roles_person_id_3bd9c160_fk_persons_id” FOREIGN KEY (person_id) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED TABLE “timeseries_roles” CONSTRAINT “timeseries_roles_person_id_3e26200e_fk_persons_id” FOREIGN KEY (person_id) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id
name
email
phone
orcid
isprivate
metadata: MetaData = MetaData()
registry: RegistryType = <sqlalchemy.orm.decl_api.registry object>

Model Timeseries

class TimeseriesAnnotation(Base)

class toardb.timeseries.models_annotation.TimeseriesAnnotation(**kwargs)[source]

Bases: sqlalchemy.orm.decl_api._DynamicAttributesType, sqlalchemy.inspection.Inspectable[sqlalchemy.orm.mapper.Mapper[Any]]

Table “public.timeseries_annotations”

Column

Type

Collation

Nullable

Default

id

integer

not null

nextval(‘timeseries_annotations_id_seq’::regclass)

kind

integer

not null

text

text

not null

date_added

timestamp with time zone

not null

approved

boolean

not null

contributor_id

integer

not null

Indexes:

“timeseries_annotations_pkey” PRIMARY KEY, btree (id) “timeseries_annotations_contributor_id_7a1758f6” btree (contributor_id)

Check constraints:

“timeseries_annotations_kind_check” CHECK (kind >= 0)

Foreign-key constraints:

“timeseries_annotations_contributor_id_7a1758f6_fk_auth_user_id” FOREIGN KEY (contributor_id) REFERENCES auth_user(id) DEFERRABLE INITIALLY DEFERRED

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id
kind
text
date_added
approved
contributor_id
timeseries
metadata: MetaData = MetaData()
registry: RegistryType = <sqlalchemy.orm.decl_api.registry object>

class TimeseriesRole (Base)

class toardb.timeseries.models_role.TimeseriesRole(**kwargs)[source]

Bases: sqlalchemy.orm.decl_api._DynamicAttributesType, sqlalchemy.inspection.Inspectable[sqlalchemy.orm.mapper.Mapper[Any]]

Table “public.timeseries_roles”

Column

Type

Collation

Nullable

Default

id

integer

not null

nextval(‘timeseries_roles_id_seq’::regclass)

role

integer

not null

status

integer

not null

contact_id

integer

not null

Indexes:

“timeseries_roles_pkey” PRIMARY KEY, btree (id) “timeseries_roles_role_status_contact_id_uniq” UNIQUE CONSTRAINT, btree (role, status, contact_id) “timeseries_roles_contact_id” btree (contact_id)

Check constraints:

“timeseries_roles_role_check” CHECK (role >= 0) “timeseries_roles_status_check” CHECK (status >= 0)

Foreign-key constraints:

“timeseries_roles_contact_id_fk_contacts_id” FOREIGN KEY (contact_id) REFERENCES contacts(id) DEFERRABLE INITIALLY DEFERRED

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id
role
status
contact_id
contact
timeseries
metadata: MetaData = MetaData()
registry: RegistryType = <sqlalchemy.orm.decl_api.registry object>

class TimeseriesProgramme (Base)

class toardb.timeseries.models_programme.TimeseriesProgramme(**kwargs)[source]

Bases: sqlalchemy.orm.decl_api._DynamicAttributesType, sqlalchemy.inspection.Inspectable[sqlalchemy.orm.mapper.Mapper[Any]]

Table “public.timeseries_programmes”

Column

Type

Collation

Nullable

Default

id

integer

not null

nextval(‘timeseries_programmes_id_seq’::regclass)

name

character varying(32)

not null

longname

character varying(128)

not null

homepage

character varying(200)

not null

description

text

not null

Indexes:

“timeseries_programmes_pkey” PRIMARY KEY, btree (id)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id
name
longname
homepage
description
timeseries
metadata: MetaData = MetaData()
registry: RegistryType = <sqlalchemy.orm.decl_api.registry object>

Model Data

#.. include:: GenericModel.rst