Name | securetar JSON |
Version |
2025.1.4
JSON |
| download |
home_page | None |
Summary | Python module to handle tarfile backups. |
upload_time | 2025-01-27 14:21:29 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10.0 |
license | Apache-2.0 |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
cryptography
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Secure Tar
Secure Tarfile library
It's a streaming wrapper around python tarfile and allow secure handling files and support encryption.
```python
with SecureTarFile("test.tar", "w") as tar_file:
atomic_contents_add(
tar_file,
temp_orig,
excludes=[],
arcname=".",
)
with SecureTarFile("test.tar", "w", b"AES128_KEY_SIZE") as tar_file:
atomic_contents_add(
tar_file,
temp_orig,
excludes=[],
arcname=".",
)
```
A common pattern is to create an outer uncompressed tarfile that contains
a variety of inner tar files. This can be accomplished without writing
out multiple files with the following pattern.
```python
outer_secure_tar_file = SecureTarFile("pkg.tar", "w", gzip=False)
with outer_secure_tar_file as outer_tar_file:
with outer_secure_tar_file.create_inner_tar(
"./backup1.tar.gz", gzip=True
) as inner_tar_file:
atomic_contents_add(
inner_tar_file,
path_1,
excludes=[],
arcname=".",
)
with outer_secure_tar_file.create_inner_tar(
"./backup2.tar.gz", gzip=True
) as inner_tar_file:
atomic_contents_add(
inner_tar_file,
path_2,
excludes=[],
arcname=".",
)
```
Raw data
{
"_id": null,
"home_page": null,
"name": "securetar",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10.0",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "Pascal Vizeli <pvizeli@syshack.ch>",
"download_url": "https://files.pythonhosted.org/packages/c1/86/479a06fa50aeabf2a530d5603a2ff0fd15bbd784c5a9105f82f278c1b897/securetar-2025.1.4.tar.gz",
"platform": null,
"description": "# Secure Tar\nSecure Tarfile library\n\nIt's a streaming wrapper around python tarfile and allow secure handling files and support encryption.\n\n\n```python\n\nwith SecureTarFile(\"test.tar\", \"w\") as tar_file:\n atomic_contents_add(\n tar_file,\n temp_orig,\n excludes=[],\n arcname=\".\",\n )\n\nwith SecureTarFile(\"test.tar\", \"w\", b\"AES128_KEY_SIZE\") as tar_file:\n atomic_contents_add(\n tar_file,\n temp_orig,\n excludes=[],\n arcname=\".\",\n )\n\n```\n\nA common pattern is to create an outer uncompressed tarfile that contains\na variety of inner tar files. This can be accomplished without writing \nout multiple files with the following pattern.\n\n```python\n\nouter_secure_tar_file = SecureTarFile(\"pkg.tar\", \"w\", gzip=False)\nwith outer_secure_tar_file as outer_tar_file:\n with outer_secure_tar_file.create_inner_tar(\n \"./backup1.tar.gz\", gzip=True\n ) as inner_tar_file:\n atomic_contents_add(\n inner_tar_file,\n path_1,\n excludes=[],\n arcname=\".\",\n )\n\n with outer_secure_tar_file.create_inner_tar(\n \"./backup2.tar.gz\", gzip=True\n ) as inner_tar_file:\n atomic_contents_add(\n inner_tar_file,\n path_2,\n excludes=[],\n arcname=\".\",\n )\n\n```\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Python module to handle tarfile backups.",
"version": "2025.1.4",
"project_urls": {
"Homepage": "https://github.com/pvizeli/securetar"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "cf548cd62ddfbf250f8300963a5cb30634fa750de27de71c352a360c25d27fff",
"md5": "9fdbea2fe677b4e68632be0d7995ae52",
"sha256": "c260eb491035613dbf5be4c37c128c9c1928a4a88d98152916054843a8f75327"
},
"downloads": -1,
"filename": "securetar-2025.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9fdbea2fe677b4e68632be0d7995ae52",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10.0",
"size": 11167,
"upload_time": "2025-01-27T14:21:27",
"upload_time_iso_8601": "2025-01-27T14:21:27.212026Z",
"url": "https://files.pythonhosted.org/packages/cf/54/8cd62ddfbf250f8300963a5cb30634fa750de27de71c352a360c25d27fff/securetar-2025.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "c186479a06fa50aeabf2a530d5603a2ff0fd15bbd784c5a9105f82f278c1b897",
"md5": "6e87fcf26def8443060fc1358eed0cf4",
"sha256": "e8b8988adc0d2e46ac9ef94fe170f7903d6a86a09f087210d115358d55d2bf2a"
},
"downloads": -1,
"filename": "securetar-2025.1.4.tar.gz",
"has_sig": false,
"md5_digest": "6e87fcf26def8443060fc1358eed0cf4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10.0",
"size": 15250,
"upload_time": "2025-01-27T14:21:29",
"upload_time_iso_8601": "2025-01-27T14:21:29.022315Z",
"url": "https://files.pythonhosted.org/packages/c1/86/479a06fa50aeabf2a530d5603a2ff0fd15bbd784c5a9105f82f278c1b897/securetar-2025.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-27 14:21:29",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "pvizeli",
"github_project": "securetar",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "cryptography",
"specs": []
}
],
"lcname": "securetar"
}