Get value of a variable inside a function inside a class from another file

i'm trying to fetch the value of a variable inside a function inside a class from another file. this is the class in another folder app/views

class ReportVisualisations(TemplateView):
    
    def clean(self):
        xyz = 10

print(app.views.ReportVisualisations.clean.xyz)

getting the error

'function' object has no attribute 'xyz'

and when i'm trying to print link

print(stitch.views.ReportVisualisations().clean().xyz)

I'm getting the following error

'NoneType' object has no attribute 'xyz'

please help me out on this

I'm able to print it if it's inside the class but outside the function using print(app.views.ReportVisualisations.xyz)

Back to Top