diff --git a/neon_data_models/models/base/contexts.py b/neon_data_models/models/base/contexts.py index 46db3d7..f715169 100644 --- a/neon_data_models/models/base/contexts.py +++ b/neon_data_models/models/base/contexts.py @@ -23,11 +23,10 @@ # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + from datetime import datetime, timedelta from typing import Literal, List, Optional -from pydantic import Field - from neon_data_models.models.base import BaseModel diff --git a/neon_data_models/models/base/messagebus.py b/neon_data_models/models/base/messagebus.py index 08721bf..b2ade64 100644 --- a/neon_data_models/models/base/messagebus.py +++ b/neon_data_models/models/base/messagebus.py @@ -30,11 +30,12 @@ from neon_data_models.models.base import BaseModel from neon_data_models.models.base.contexts import (SessionContext, KlatContext, TimingContext, MQContext) -from neon_data_models.models.client import NodeData -from neon_data_models.models.user import NeonUserConfig class MessageContext(BaseModel): + from neon_data_models.models.client.node import NodeData + from neon_data_models.models.user.database import NeonUserConfig + model_config = ConfigDict(extra="allow") session: Optional[SessionContext] = Field(description="Session Data", default=None) @@ -63,3 +64,6 @@ class BaseMessage(BaseModel): msg_type: str data: dict context: MessageContext + + +__all__ = [MessageContext.__name__, BaseMessage.__name__] diff --git a/neon_data_models/models/user/database.py b/neon_data_models/models/user/database.py index e2054e9..ba30db2 100644 --- a/neon_data_models/models/user/database.py +++ b/neon_data_models/models/user/database.py @@ -28,13 +28,12 @@ from typing import Dict, Any, List, Literal, Optional from typing_extensions import deprecated from uuid import uuid4 - -from neon_data_models.models.api.jwt import HanaToken -from neon_data_models.models.base import BaseModel from pydantic import Field from datetime import date from neon_data_models.enum import AccessRoles +from neon_data_models.models.api.jwt import HanaToken +from neon_data_models.models.base import BaseModel class _UserConfig(BaseModel): diff --git a/neon_data_models/models/user/neon_profile.py b/neon_data_models/models/user/neon_profile.py index c14919c..3b521e9 100644 --- a/neon_data_models/models/user/neon_profile.py +++ b/neon_data_models/models/user/neon_profile.py @@ -28,11 +28,9 @@ import datetime from typing import Optional, List, Literal - from pydantic import Field from neon_data_models.models.base import BaseModel - from neon_data_models.models.user.database import User