Using the Python pickle Module
ฝัง
- เผยแพร่เมื่อ 3 ธ.ค. 2024
- As a developer, you may sometimes need to send complex object hierarchies over a network or save the internal state of your objects to a disk or database for later use. To accomplish this, you can use a process called serialization, which is fully supported by the standard library thanks to the Python pickle module.
Click here to learn more: realpython.com...
Great video ! I discovered pickle through API's. When making tons a requests, you can use the pickle module to build a cache and save your responses. If you do the same request in the future, you'll be able to retrieve it from your local cache instead of making the same call to the API
Great video, simple and explanatory. You forgot to mention how the pickle is not a true copy
This really helps to see how to use pickle. Thanks so much for making this video. It would be nice if you might include this code into a github repository.
I have never used this because I don't understand the benefits (if any) of pickle over ubiquitous formats like JSON or even XML. Maybe you could discuss this in a future video?
I've used it to save down the gui state so on re open, it returns as per last used state. I didn't want the users messing with the config file, so made it so they couldn't.
I think you are right. Though I have experienced this yet, I have heard people say that Pickle has poor security level, and it also causes problem during serializing and de-serializing if the versions of the python involved are not the same.
Perfectly explained!
It's a cool feature I have no idea why I would ever want to use it though
in disk
or using multiprocess something
In case of class object byte string is readable
Excellent work thank you so much!
😶 Okay,...seen this here and there 😳 What would I use this for?
why is the class first letter is not capital here
İt doesnt has to be capital, its just tradition.
PEP STANDARDS are a STANDARD not a tradition. Break the standard and your youtube channel should be perm banned!
@@NathanChambers 🤓
🙏🙏🙏
So good explaination
The class name should be "ExampleClass" instead of "example_class"