py4ai.data.layer.mongo package

Module for MongoDB persistence layer abstractions and implementations.

class py4ai.data.layer.mongo.MongoConfig(config: Configuration)

Bases: BaseConfig

Configuration for a Mongo DB.

Class instance initializer.

Parameters

config – configuration

property admin: AuthConfig

Return administrator authentication config.

Returns

administrator authentication config

property auth: AuthConfig

Return authetication config.

Returns

authetication config

property authSource: Any

Return the authentication source.

Returns

authentication source

property db_name: str

Return database name.

Returns

database name

getCollection(name: str) str

Return collection name at a given configuration node.

Parameters

name – configuration node name

Returns

collection name

property host: str

Return ost name.

Returns

host name

property port: int

Return port.

Returns

port

Submodules