# restrictedpickle - Safe Pickle for Python
This is a safe version of Python's pickle module. It will only pickle and unpickle safe tyes like int, float, str, list, dict, etc. It will not unpickle malicious code. It is safe to use `restrictedpickle` on untrusted data.
This module is compatible standard pickle module. You can use `restrictedpickle` as a drop-in replacement for `pickle`.
## Installation
```bash
pip install restrictedpickle
```
## Usage
```python
import restrictedpickle.classic as pickle
data = {'a': 1, 'b': 2}
data_serialized = pickle.dumps(data)
data_unserialized = pickle.loads(data_serialized)
assert data == data_unserialized
```
Raw data
{
"_id": null,
"home_page": "https://github.com/ershov/restrictedpickle",
"name": "restrictedpickle",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Yury Ershov",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/e1/0d/fe1875d702e72a7af2171f9f0733ac0680d4d295bbcb1abcbc7a0318ae79/restrictedpickle-0.3.0.tar.gz",
"platform": null,
"description": "# restrictedpickle - Safe Pickle for Python\n\nThis is a safe version of Python's pickle module. It will only pickle and unpickle safe tyes like int, float, str, list, dict, etc. It will not unpickle malicious code. It is safe to use `restrictedpickle` on untrusted data.\n\nThis module is compatible standard pickle module. You can use `restrictedpickle` as a drop-in replacement for `pickle`.\n\n## Installation\n\n```bash\npip install restrictedpickle\n```\n\n## Usage\n\n```python\nimport restrictedpickle.classic as pickle\n\ndata = {'a': 1, 'b': 2}\ndata_serialized = pickle.dumps(data)\ndata_unserialized = pickle.loads(data_serialized)\nassert data == data_unserialized\n```\n",
"bugtrack_url": null,
"license": "GPL3",
"summary": "Python with braces",
"version": "0.3.0",
"project_urls": {
"Homepage": "https://github.com/ershov/restrictedpickle"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "88e08e0ebc29cb8f223f7967b11c1203b4e59ff15b506df2c8363420d1e3c39e",
"md5": "b90f8e0e811247e53f117c65aed6609c",
"sha256": "9d5a0b67c09dd5dc44d6b1ffdf39a7ed198a4550d0bdb72aa69c4cab3238393d"
},
"downloads": -1,
"filename": "restrictedpickle-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b90f8e0e811247e53f117c65aed6609c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 14704,
"upload_time": "2024-10-29T22:12:07",
"upload_time_iso_8601": "2024-10-29T22:12:07.627904Z",
"url": "https://files.pythonhosted.org/packages/88/e0/8e0ebc29cb8f223f7967b11c1203b4e59ff15b506df2c8363420d1e3c39e/restrictedpickle-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e10dfe1875d702e72a7af2171f9f0733ac0680d4d295bbcb1abcbc7a0318ae79",
"md5": "766dd0baedd67a4a7bb30cc8593091d4",
"sha256": "d3dedc28145b1efec1d472751c56814c3b0795dcec20f1cc08137a4edb8c09f5"
},
"downloads": -1,
"filename": "restrictedpickle-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "766dd0baedd67a4a7bb30cc8593091d4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 14047,
"upload_time": "2024-10-29T22:12:09",
"upload_time_iso_8601": "2024-10-29T22:12:09.818115Z",
"url": "https://files.pythonhosted.org/packages/e1/0d/fe1875d702e72a7af2171f9f0733ac0680d4d295bbcb1abcbc7a0318ae79/restrictedpickle-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-29 22:12:09",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ershov",
"github_project": "restrictedpickle",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "restrictedpickle"
}