Skip to content

Commit

Permalink
Add const and settings lib modules
Browse files Browse the repository at this point in the history
  • Loading branch information
victorbartel authored and ClementHector committed Feb 7, 2022
1 parent 30d354d commit b60e484
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions openpype/modules/shotgrid/lib/const.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MODULE_NAME = "shotgrid"
19 changes: 19 additions & 0 deletions openpype/modules/shotgrid/lib/settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import os
from typing import Tuple, AnyStr, Dict, Any

from openpype.api import get_system_settings
from openpype.modules.shotgrid.lib.const import MODULE_NAME


def get_shotgrid_settings() -> Dict[AnyStr, Any]:
return get_system_settings()["modules"][MODULE_NAME]


def get_shotgrid_url_from_settings() -> AnyStr:
return get_shotgrid_settings()["shotgrid_url"]


def get_shotgrid_event_mongo_info() -> Tuple[AnyStr, AnyStr]:
database_name = os.environ["OPENPYPE_DATABASE_NAME"]
collection_name = "shotgrid_events"
return database_name, collection_name

0 comments on commit b60e484

Please sign in to comment.