config.py 753 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from pydantic import BaseSettings
import os

from annotator import __version__


class BasicSettings(BaseSettings):
    application_name: str = "CouchDB Annotation Agent"
    application_version: str = __version__.__version__
    cdstar_uri: str = "http://localhost:8082/v3"
    cdstar_user: str = "medic1"
    cdstar_pass: str = "medIC!umG!9"
    cdstar_vault: str = "medic"
    couch_uri: str = "http://localhost:5984"
    couch_user: str = "medic"
    couch_pass: str = "medic2020"
    couch_db: str = "medic"


def get_version():
    return BasicSettings().application_version


agent_description = ""
with open(
    os.path.join(os.path.abspath(os.path.dirname(__file__)), os.pardir, "Readme.md")
) as readme:
    agent_description = readme.read()