secpickle


Namesecpickle JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/firlast/secpickle
SummaryUse Python's Pickle Module Safely
upload_time2023-01-02 01:42:12
maintainer
docs_urlNone
authorFirlast
requires_python
license
keywords pickle secure safely python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SecPickle

We all know that the [Python Pickle module](https://docs.python.org/3/library/pickle.html#module-pickle) is not secure because *arbitrary code* can be executed. The function of `secpickle` is to guarantee that you will only unzip files that were **generated by you**, avoiding reading *unknown files*.

- [SecPickle in PyPI](https://pypi.org/project/secpickle)

## How to use

The functions available in `secpickle` are:

- load()
- loads()
- dump()
- dumps()

Only one thing changes in using these functions: an argument called `key` has been added to each of them. The key is requested so that a **unique hash** can be used to prove that file was created by you. The more complex your key, the greater the security.

The **same key** used for dump must be used to load the file. Otherwise, the `IntegrityUnconfirmedError` exception will be thrown, indicating, as the name implies, that it is not possible to confirm whether that file was created by you.

```python
from secpickle import secpickle

data = [{'name': 'SecPickle'}]
key = 'this-is-my-secret-key'

with open('data', 'wb') as file:
    secpickle.dump(data, file, key)

with open('data', 'rb') as file:
    result = secpickle.load(file, key)

print(result)
```

# License

```
BSD 3-Clause License
Copyright (c) 2023, Firlast
```

This project uses the [BSD 3-Clause License](https://github.com/firlast/secpickle/blob/master/LICENSE), please read the license for more informations.
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/firlast/secpickle",
    "name": "secpickle",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "pickle,secure,safely,python",
    "author": "Firlast",
    "author_email": "firlastinc@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/b2/d3/79c57e686050a71de7617bda65f20714ce9cbf8d450eaad8a76a0ecef8af/secpickle-0.1.0.tar.gz",
    "platform": null,
    "description": "# SecPickle\n\nWe all know that the [Python Pickle module](https://docs.python.org/3/library/pickle.html#module-pickle) is not secure because *arbitrary code* can be executed. The function of `secpickle` is to guarantee that you will only unzip files that were **generated by you**, avoiding reading *unknown files*.\n\n- [SecPickle in PyPI](https://pypi.org/project/secpickle)\n\n## How to use\n\nThe functions available in `secpickle` are:\n\n- load()\n- loads()\n- dump()\n- dumps()\n\nOnly one thing changes in using these functions: an argument called `key` has been added to each of them. The key is requested so that a **unique hash** can be used to prove that file was created by you. The more complex your key, the greater the security.\n\nThe **same key** used for dump must be used to load the file. Otherwise, the `IntegrityUnconfirmedError` exception will be thrown, indicating, as the name implies, that it is not possible to confirm whether that file was created by you.\n\n```python\nfrom secpickle import secpickle\n\ndata = [{'name': 'SecPickle'}]\nkey = 'this-is-my-secret-key'\n\nwith open('data', 'wb') as file:\n    secpickle.dump(data, file, key)\n\nwith open('data', 'rb') as file:\n    result = secpickle.load(file, key)\n\nprint(result)\n```\n\n# License\n\n```\nBSD 3-Clause License\nCopyright (c) 2023, Firlast\n```\n\nThis project uses the [BSD 3-Clause License](https://github.com/firlast/secpickle/blob/master/LICENSE), please read the license for more informations.",
    "bugtrack_url": null,
    "license": "",
    "summary": "Use Python's Pickle Module Safely",
    "version": "0.1.0",
    "split_keywords": [
        "pickle",
        "secure",
        "safely",
        "python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "9d77991be072e28067564f10ce3fbda9",
                "sha256": "b4cbff5d0409e9449e5e8198b912883516a9e41d3b2c0600744e3e603c820480"
            },
            "downloads": -1,
            "filename": "secpickle-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9d77991be072e28067564f10ce3fbda9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 2557,
            "upload_time": "2023-01-02T01:42:12",
            "upload_time_iso_8601": "2023-01-02T01:42:12.650684Z",
            "url": "https://files.pythonhosted.org/packages/b2/d3/79c57e686050a71de7617bda65f20714ce9cbf8d450eaad8a76a0ecef8af/secpickle-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-02 01:42:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "firlast",
    "github_project": "secpickle",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "secpickle"
}
        
Elapsed time: 0.07351s