S
S
setevoj2018-12-07 21:59:01
Python
setevoj, 2018-12-07 21:59:01

How to deal with the class structure from someone else's code?

Problem: I use Python libraries that allow me to work with some API built on simple GET / POST requests.
I successfully connected these libraries, they describe different classes that are inherited from each other, and eventually load some server response into themselves.
How to understand how a particular class object is arranged?
Those. I initialized it, loaded data into it using the API, but in order to understand how this data works, I need to study the source code of these API libraries and understand how they work.
As I understand it, they are based on requests.
Is it possible somehow, having a variable with the type of this class, to understand its internal structure?
Let's say, to make a dump of its internal structure in order to understand how to work with it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vadim Shatalov, 2018-12-07
@netpastor

Use a debugger in paycharm - put dots in places where you need to figure it out and look at stack variables

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question