ADDED: module for work with api

This commit is contained in:
2023-11-22 20:48:27 +05:00
parent d286da698e
commit ce940f7646
8 changed files with 124 additions and 0 deletions

17
neuroapi/__init__.py Normal file
View File

@@ -0,0 +1,17 @@
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'))