0

An App I've written in Python instantiates several classes. Other portions of the App live in other Python files and as a result, they must instantiate their own versions of the class before running.

Is there a way that I can instantiate the classes I want to use within the App and keep those classes "Alive" for use by other parts of the Application that live in separate files? Some of these Classes are objects that handle API GET/POST requests and don't have web sockets available for their endpoints.

Fergus
  • 437
  • 3
  • 11

1 Answers1

0

The answer to this question comes from @A.Wenn. By using Pickle, I can serialize my objects in one script and save them. From any other portion of my application, I can then import the pickled object and use it as though I had instantiated the object from scratch! This makes my application significantly faster and more pleasant to use.

Who doesn't love pickles!!!

Fergus
  • 437
  • 3
  • 11