bip package

Submodules

bip.app module

bip.app.configure_app(app: bip.utils.app.Application, env: Optional[str])

Load application configuration.

Parametry
  • app (Application) – application object

  • env (Optional[str]) – environment name (may be None)

bip.app.configure_blueprints(app: bip.utils.app.Application)

Register (mount) blueprint objects.

Parametry

app (Application) – application object

bip.app.configure_database(app: bip.utils.app.Application)

Configure application database connectivity.

Parametry

app (Application) – application object

bip.app.configure_error_handlers(app: bip.utils.app.Application)

Configure global error handlers.

Parametry

app (Application) – application object

bip.app.configure_extensions(app: bip.utils.app.Application)

Register and configure framework extensions.

Parametry

app (Application) – application object

bip.app.configure_hooks(app: bip.utils.app.Application)

Setup application lifetime hooks.

Parametry

app (Application) – application object

bip.app.configure_logging()

Configure application logging on prod. This configuration is overwritten if running under Gunicorn.

bip.app.configure_logging_handler(app: bip.utils.app.Application)

Bind application logging to Gunicorn handler. This is done only in production and only if Gunicorn logger has any handlers defined.

Parametry

app (Application) – application object

bip.app.configure_templating(app: bip.utils.app.Application)

Configure template system extensions.

Parametry

app (Application) – application object

bip.app.make_app(env: Optional[str] = None)bip.utils.app.Application

Application object factory.

Parametry

env (Optional[str], optional) – environment name, defaults to None

Zwraca

application object

Typ zwracany

Application

bip.config module

bip.config_test module

bip.display module

class bip.display.ColumnOverride(title, datatype, align)

Klasy bazowe: tuple

Create new instance of ColumnOverride(title, datatype, align)

property align

Alias for field number 2

property datatype

Alias for field number 1

property title

Alias for field number 0

class bip.display.DisplayMeta(klass: Model, columns: List[str], overrides: Mapping[str, ColumnOverride] = <factory>)

Klasy bazowe: object

Tabular object display metadata.

cli_list_columns(overrides: Mapping[str, bip.display.ColumnOverride]) → List[bip.utils.cli.ColSpec]

Generate list of column specifications for displaying in CLI.

Parametry

overrides (Mapping[str, ColumnOverride]) – column param override information

Zwraca

list of column specifications

Typ zwracany

List[ColSpec]

columns: List[str]
klass: bip.models.Model
overrides: Mapping[str, bip.display.ColumnOverride]

bip.ext module

bip.models module

class bip.models.Attachment(*args, **kwargs)

Klasy bazowe: bip.models.Model

DoesNotExist

alias klasy AttachmentDoesNotExist

created = <DateTimeField: Attachment.created>
description = <TextField: Attachment.description>
description_html = <TextField: Attachment.description_html>
property file_save_as
file_size = <IntegerField: Attachment.file_size>
file_type = <CharField: Attachment.file_type>
filename = <CharField: Attachment.filename>
page = <ForeignKeyField: Attachment.page>
page_id = <ForeignKeyField: Attachment.page>
pk = <AutoField: Attachment.pk>
title = <CharField: Attachment.title>
class bip.models.Change

Klasy bazowe: object

created = 1
deleted = 3
updated = 2
class bip.models.ChangeRecord(*args, **kwargs)

Klasy bazowe: bip.models.Model

DoesNotExist

alias klasy ChangeRecordDoesNotExist

classmethod log_change(page: bip.models.Page, change_type: bip.models.Change, user: bip.models.User, description: str)bip.models.ChangeRecord
change_dt = <DateTimeField: ChangeRecord.change_dt>
change_type = <IntegerField: ChangeRecord.change_type>
property change_type_name
description = <TextField: ChangeRecord.description>
page = <ForeignKeyField: ChangeRecord.page>
page_id = <ForeignKeyField: ChangeRecord.page>
pk = <AutoField: ChangeRecord.pk>
user = <ForeignKeyField: ChangeRecord.user>
user_id = <ForeignKeyField: ChangeRecord.user>
class bip.models.Label(*args, **kwargs)

Klasy bazowe: bip.models.Model

DoesNotExist

alias klasy LabelDoesNotExist

description = <TextField: Label.description>
description_html = <TextField: Label.description_html>
name = <CharField: Label.name>
pagelabel_set
pk = <AutoField: Label.pk>
slug = <CharField: Label.slug>
class bip.models.Model(*args, **kwargs)

Klasy bazowe: peewee.Model

DoesNotExist

alias klasy ModelDoesNotExist

id = <AutoField: Model.id>
class bip.models.Page(*args, **kwargs)

Klasy bazowe: bip.models.Model

DoesNotExist

alias klasy PageDoesNotExist

labels(order=None)
active = <BooleanField: Page.active>
attachments
changes
created = <DateTimeField: Page.created>
created_by = <ForeignKeyField: Page.created_by>
created_by_id = <ForeignKeyField: Page.created_by>
description = <TextField: Page.description>
main = <BooleanField: Page.main>
order = <IntegerField: Page.order>
pagelabel_set
pk = <AutoField: Page.pk>
slug = <CharField: Page.slug>
text = <TextField: Page.text>
text_html = <TextField: Page.text_html>
title = <CharField: Page.title>
updated = <DateTimeField: Page.updated>
updated_by = <ForeignKeyField: Page.updated_by>
updated_by_id = <ForeignKeyField: Page.updated_by>
class bip.models.PageLabel(*args, **kwargs)

Klasy bazowe: bip.models.Model

DoesNotExist

alias klasy PageLabelDoesNotExist

label = <ForeignKeyField: PageLabel.label>
label_id = <ForeignKeyField: PageLabel.label>
page = <ForeignKeyField: PageLabel.page>
page_id = <ForeignKeyField: PageLabel.page>
pk = <AutoField: PageLabel.pk>
class bip.models.User(*args, **kwargs)

Klasy bazowe: bip.models.Model, flask_login.mixins.UserMixin

DoesNotExist

alias klasy UserDoesNotExist

check_password(password)
get_id()
is_active()
set_password(password)
active = <BooleanField: User.active>
admin = <BooleanField: User.admin>
changes
created = <DateTimeField: User.created>
email = <CharField: User.email>
name = <CharField: User.name>
pages_created
pages_updated
password = <TextField: User.password>
pk = <AutoField: User.pk>

bip.search module

bip.search.search_results(query: str, sections: Optional[List[str]] = None) → Mapping[str, peewee.ModelSelect]

Extremely simple content search entrypoint. Search is performed against provided sections or all sections if not provided (Pages, Labels, Attachments). Returned results are partitioned by data type. Pages are returned ordered by modification date, labels by name, attachments by creation date.

Search fields:

  • pages: title and text

  • labels: name

  • attachments: title and description

Parametry
  • query (str) – search query

  • sections (Optional[List[str]], optional) – where to search, defaults to None

Zwraca

search result partitioned by data type

Typ zwracany

Mapping[str, ModelSelect]

bip.wsgi module