Added singleton config and changed module structure

This commit is contained in:
2023-11-23 22:13:10 +03:00
parent 6389c4f29e
commit 8c2d706401
12 changed files with 41 additions and 29 deletions

View File

@@ -1,17 +1 @@
from .post import Post
from .admin import Admin
from .user import User
from .image import Image
from dotenv import load_dotenv
import os
from os.path import join, dirname
load_dotenv(join(dirname(__file__), "..", '.env'))
class neuroapi:
post = Post(os.environ.get('API_URL'))
admin = Admin(os.environ.get('API_URL'))
user = User(os.environ.get('API_URL'))
image = Image(os.environ.get('API_URL'))
from ._neuroapi import neuroapi