{ "info": { "author": "Vanessa Sochat", "author_email": "vsochat@stanford.edu", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Intended Audience :: Science/Research", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering", "Topic :: Software Development" ], "description": "# SIF (Python)\n\nSif Python (sif) is the Python API for working with the Singularity SIF image\nformat. This library is under development, and contributions are welcome! \nThe basic functionality so far is to parse the header, only using Python:\n\n\n```\nfrom sif.main import SIFHeader\n\nSIFHeader('boxes.simg')\nboxes.simg is a SIF file.\nSIF Header version 01\nSIF Header arch 02\nSIF Header uuid 0eae46df-1975-e44c-888b-8b9915f87f52\nSIF Header ctime 1544537033\nSIF Header mtime 1546726508\nSIF Header dfree 45\nSIF Header dtotal 48\nSIF Header descroff 4096\nSIF Header descrlen 28080\nSIF Header dataoff 32768\nSIF Header datalen 196953019\n\nArchitecture: AMD64 arch code\n\nDeffile Datatype 16385\nDeffile Used True\nDeffile ID 1\nDeffile Groupid 4026531841\nDeffile Link 0\nDeffile Fileoff 32768\nDeffile Filelen 39\nDeffile Storelen 39\nDeffile Ctime 1544537033\nDeffile Mtime 1544537033\nDeffile UID 0\nDeffile Gid 0\nDeffile name .\nDeffile extra \n\nPartition Datatype 16388\nPartition Used True\nPartition ID 2\nPartition Groupid 4026531841\nPartition Link 0\nPartition Fileoff 36864\nPartition Filelen 196947968\nPartition Storelen 196952025\nPartition Ctime 1544537033\nPartition Mtime 1544537033\nPartition UID 0\nPartition Gid 0\nPartition name squashfs-955608129.img\nPartition fstype 1\nPartition partype 2\nPartition extra 02\n\nSignature Datatype 16389\nSignature Used True\nSignature ID 3\nSignature Groupid 4026531841\nSignature Link 2\nSignature Fileoff 196984832\nSignature Filelen 955\nSignature Storelen 955\nSignature Ctime 1546726508\nSignature Mtime 1546726508\nSignature UID 0\nSignature Gid 0\nSignature name part-signature\nSignature hastype 2\nSignature publicKey -----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA256\n\nSIFHASH:\n4de3d88a550a8c1976b54b91445b027af718cb0bf38133c50dcd723fdba54a28177008e2f4bb7e7cc81aa4d82c0c27fa\n-----BEGIN PGP SIGNATURE-----\n\nwsFcBAEBCAAQBQJcMSxrCRBi+gdpIWqw6QAAiZsQAAJgTPQ5QVuiLq0s7PAM9gPK\nYLmxEN3UiTS0BF2a/DffKmYMCdrZwKyx0fybWZMOAREfobTbbqNhL0dvk6idMtfR\nwvHSDmKl1gx9LZ764ddyaX/NdsHZMrtDLBe2AMuCoAEZOpN0/BQQRiuQMYBbWiVz\n3DMyvvqXdzKnc6OYu1wBlr+q0GG2I4HRGGfZayZUHtgh4okPVJSndxgD5Rz1zeC5\nGZUiHJyh3Jru8wc7hEivgHGXRfP5S+VedrGYX/gam/iH26t/nMGY7AFN5IIMr1t0\nI54HCJCf0NcwTfruzwwE80d6+BrLa082uuS6qD+PKhyEaqm8jZVFw2On9EJuIkje\nR6f3Q2IagrOHh/axGrXMUcSA6tBkw0IRbS/NBw/0hjpiRLCOY5C+qp4WWS+Oo34k\n09eO4UmlDkKTScc72yxNRTAMBc0f/o5pncirXVCwbUMAMkMsZOBS8lN72WFDGzk4\nmnOTsiBntG29ryjtWQctKWJN+M7v8s8ib+iFCgBJbMyBR//z4z1OkkCUDxee5bvF\nbnvAVpEpOj0DvOmH/2za3Olyoez3ueGo5HNCfbKq4FBgKo/KB3cIp41cVcohSpSV\nzgtARAKG1paRof+zXP0xatL+TDXazytRyNgXrprJbrZvjm4/jXhhT31D8s/8kZx1\nhK2q7TKN3URs6h7olmt+\n=E8Je\n-----END PGP SIGNATURE-----\n```\n\n\n\n## Usage\n\nBy default, the SIF header version provided is the most up to date with Singularity.\nIf you need to specify a particular header, set the environment variable for it:\n\n```bash\nSIF_VERSION=\"02\"\nexport SIF_VERSION\n```\n\n### Python\n\nIn Python, you will likely want to start with an image, and load it for inspection.\nThe client will quickly tell you if it's a SIF header or not based on the `SIF_MAGIC`\nafter the interpreter line:\n\n**This is a SIF image**\n\n```python\nimage = 'salad.simg'\nfrom sif.main import SIFHeader\nheader = SIFHeader(image)\n\nboxes.simg is a SIF file.\nArchitecture: AMD64 arch code\nFound SIF version 01\nFound SIF arch 02\n```\n\nYou don't have to load the header right away:\n\n```python\nheader = SIFHeader('boxes.simg', load=False)\nboxes.simg is a SIF file.\n\nheader.load_header()\n\nArchitecture: AMD64 arch code\nFound SIF version 01\nFound SIF arch 02\n```\n\n**This is not a SIF image**\n\n```python\nimage = 'salad.simg'\nfrom sif.main import SIFHeader\nheader = SIFHeader(image)\n...\nERROR salad.simg is not a SIF file.\n```\n\n## Licenses\n\nThis code is licensed under the Affero GPL, version 3.0 or later [LICENSE](LICENSE).\nThe SIF Header format is licesed by [Sylabs](https://github.com/sylabs/sif/blob/master/pkg/sif/sif.go).\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.github.com/singularityhub/sif", "keywords": "container", "license": "LICENSE", "maintainer": "", "maintainer_email": "", "name": "sif", "package_url": "https://pypi.org/project/sif/", "platform": "", "project_url": "https://pypi.org/project/sif/", "project_urls": { "Homepage": "http://www.github.com/singularityhub/sif" }, "release_url": "https://pypi.org/project/sif/0.0.11/", "requires_dist": null, "requires_python": "", "summary": "python handle for reading sif images", "version": "0.0.11" }, "last_serial": 4666714, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "2d7f5680597c95e5b36d5b532228993f", "sha256": "b48784d9089862c07dffd834cdfe4351d37d6fb111d1ba492627b36cfcd3e002" }, "downloads": -1, "filename": "sif-0.0.1.tar.gz", "has_sig": false, "md5_digest": "2d7f5680597c95e5b36d5b532228993f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15043, "upload_time": "2018-12-10T23:30:29", "url": "https://files.pythonhosted.org/packages/32/9b/7b198e686f54d4e0ef3e3ea7484e33f760c458c6885bd3c2e5c7c8f71d26/sif-0.0.1.tar.gz" } ], "0.0.11": [ { "comment_text": "", "digests": { "md5": "c2f3a4a373f40608dc27404b58b6738c", "sha256": "4ec3fdd7f3b80f596abe6b1621dc425dc55f8b85e0b5d3dfb6dc9f9b53a7f488" }, "downloads": -1, "filename": "sif-0.0.11.tar.gz", "has_sig": false, "md5_digest": "c2f3a4a373f40608dc27404b58b6738c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38070, "upload_time": "2019-01-06T22:23:40", "url": "https://files.pythonhosted.org/packages/f4/04/77371cff4ede484f6ae85a8d6987364124f0a240c264d6f191bdeb9f6d18/sif-0.0.11.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c2f3a4a373f40608dc27404b58b6738c", "sha256": "4ec3fdd7f3b80f596abe6b1621dc425dc55f8b85e0b5d3dfb6dc9f9b53a7f488" }, "downloads": -1, "filename": "sif-0.0.11.tar.gz", "has_sig": false, "md5_digest": "c2f3a4a373f40608dc27404b58b6738c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38070, "upload_time": "2019-01-06T22:23:40", "url": "https://files.pythonhosted.org/packages/f4/04/77371cff4ede484f6ae85a8d6987364124f0a240c264d6f191bdeb9f6d18/sif-0.0.11.tar.gz" } ] }