Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
db.py 392 B
Newer Older
Thomas Vliagkoftis's avatar
Thomas Vliagkoftis committed
from pymongo import MongoClient
from config import Config

client = MongoClient(
    username=Config.DB_USERNAME,
    password=Config.DB_PASSWORD,
    host=Config.DB_HOST,
    port=Config.DB_PORT,
    authSource=Config.DB_AUTH_SOURCE
)

db = client["legent_db"]

# collections definitions
eea_raw_data = db["eea_raw_data"]

# views definitions
eea_2020_flattened = db["eea_2020_flattened_2"]