22 lines
583 B
Python
22 lines
583 B
Python
from __future__ import annotations
|
|
|
|
import os
|
|
from pathlib import Path
|
|
|
|
from database import connect
|
|
from database import get_visual_communication
|
|
from dotenv import load_dotenv
|
|
|
|
if __name__ == '__main__':
|
|
# prepare env vars
|
|
env_path = Path(__file__).parent.parent / 'local.env'
|
|
assert env_path.exists()
|
|
load_dotenv(env_path)
|
|
os.environ['MONGO_HOST'] = 'localhost'
|
|
# connect to database
|
|
collection, db, client = connect()
|
|
print(client.server_info())
|
|
# get visual communication
|
|
vis_com = get_visual_communication(collection)
|
|
print(vis_com)
|