adjust for jupyter

This commit is contained in:
Wir
2024-11-01 17:41:41 +01:00
parent 772acff4e8
commit 79b12d15f0
6 changed files with 1255 additions and 10 deletions

View File

@@ -2,7 +2,7 @@ import requests
from oauthlib.oauth2 import BackendApplicationClient
from requests_oauthlib import OAuth2Session, OAuth2
import jsonapi_requests
from orm.my_meta import MyMeta
from . orm.my_meta import MyMeta
# constants:
@@ -28,12 +28,18 @@ def init_api():
'TIMEOUT': 1,
})
jsonapi_requests.configuration.default = api
return api
api = init_api()
MyMeta.set_api(api)
# these have to be defined after MyMeta.api is set for the correct value to be inherited
from orm.log import *
from orm.asset import *
from orm.quantity import *
from orm.taxonomy import *
from . orm.log import *
from . orm.asset import *
from . orm.quantity import *
from . orm.taxonomy import *
import neofarm.lib as neo
import sys
try:
del sys.modules['neofarm.lib']
except AttributeError:
pass
import neofarm.lib as neo