db Package

db Package

class regcore.db.Diffs[source]

Bases: object

A level of indirection for our database abstraction. All backends should provide the same interface.

get(label, old_version, new_version)[source]

Documentation method. Return matching diff or None

put(label, old_version, new_version, diff)[source]

Documentation method. label, old_version, new_version:String, diff:Dict

class regcore.db.Layers[source]

Bases: object

A level of indirection for our database abstraction. All backends should provide the same interface.

bulk_put(layers, version, layer_name, root_label)[source]

Documentation method. Add many entries, with the root of the entries having root_label and all entries having layer_name and version

get(name, label, version)[source]

Doc method. Return a single layer (no meta data) or None

class regcore.db.Notices[source]

Bases: object

A level of indirection for our database abstraction. All backends should provide the same interface.

get(doc_number)[source]

Documentation method. Return matching notice or None

listing(part=None)[source]

Documentation method. Return all notices or notices by part

put(doc_number, notice)[source]

Documentation method. doc_number:String, notice:Dict

class regcore.db.Regulations[source]

Bases: object

A level of indirection for our database abstraction. All backends should provide the same interface.

bulk_put(regs, version, root_label)[source]

Documentation method. Add many entries, with a root of root_label. Each should have the provided version

get(label, version)[source]

Documentation method. Returns a regulation node or None

listing(label)[source]

Documentation method. List regulation versions that match this label, sorted

django_models Module

es Module

class regcore.db.es.ESDiffs[source]

Bases: object

Implementation of Elastic Search as diff backend

get(label, old_version, new_version)[source]

Find the associated diff

put(label, old_version, new_version, diff)[source]

Store a diff between two versions of a regulation node

static to_id(label, old, new)[source]
class regcore.db.es.ESLayers[source]

Bases: object

Implementation of Elastic Search as layers backend

bulk_put(layers, version, layer_name, root_label)[source]

Store all layer objects

get(name, label, version)[source]

Find the layer that matches these parameters

class regcore.db.es.ESNotices[source]

Bases: object

Implementation of Elastic Search as notice backend

get(doc_number)[source]

Find the associated notice

listing(part=None)[source]

All notices or filtered by cfr_part

put(doc_number, notice)[source]

Store a single notice

class regcore.db.es.ESRegulations[source]

Bases: object

Implementation of Elastic Search as regulations backend

bulk_put(regs, version, root_label)[source]

Store all reg objects

get(label, version)[source]

Find the regulation label + version

listing(label)[source]

List regulation versions that match this label

splitter Module

Project Versions

Table Of Contents

Previous topic

regcore Package

Next topic

migrations Package

This Page