i am having file structure like
/home/ec2-user/wep-rs/WEPR/weprs/api/voucher.py
/home/ec2-user/wep-rs/WEPR/weprs/api/scrappers/quotes/quotes.py
i want to access voucher.py from quotes.py
i have tried these
import sys
sys.path.append("..")# ValueError: attempted relative import beyond top-level package
from .. .. import api # ValueError: attempted relative import beyond top-level package
sys.path.append("/home/ec2-user/wep-rs/WEPR/weprs/api/")
from api.voucher import Voucher
error i am getting is
ModuleNotFoundError: No module named 'api'
sys.path.append("/home/ec2-user/wep-rs/WEPR/weprs")maybe?