{"id":13483300,"url":"https://github.com/alcarithemad/zfsp","last_synced_at":"2025-03-27T14:31:15.733Z","repository":{"id":149695825,"uuid":"184918942","full_name":"alcarithemad/zfsp","owner":"alcarithemad","description":"ZFS, in Python, without reading the original C.","archived":false,"fork":false,"pushed_at":"2019-05-07T07:37:34.000Z","size":230,"stargazers_count":566,"open_issues_count":2,"forks_count":26,"subscribers_count":24,"default_branch":"master","last_synced_at":"2024-10-30T17:47:46.088Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alcarithemad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-05-04T16:27:57.000Z","updated_at":"2024-07-30T19:16:59.000Z","dependencies_parsed_at":"2024-01-16T09:03:44.536Z","dependency_job_id":"7387e033-b917-435b-98e6-0039fa45aa61","html_url":"https://github.com/alcarithemad/zfsp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alcarithemad%2Fzfsp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alcarithemad%2Fzfsp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alcarithemad%2Fzfsp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alcarithemad%2Fzfsp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alcarithemad","download_url":"https://codeload.github.com/alcarithemad/zfsp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245863063,"owners_count":20684781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T17:01:09.836Z","updated_at":"2025-03-27T14:31:13.265Z","avatar_url":"https://github.com/alcarithemad.png","language":"Python","funding_links":[],"categories":["\u003ca id=\"tag-dev\" href=\"#tag-dev\"\u003eDev\u003c/a\u003e","Python"],"sub_categories":["\u003ca id=\"tag-dev.storage\" href=\"#tag-dev.storage\"\u003eStorage\u003c/a\u003e"],"readme":"# ZFSp\n\n## What?\n\nZFS, in Python, without reading the original C.\n\n## What?!\n\nThat's right.\n\n## How?\n\nMany hours spent staring at hexdumps, and asking friends to search the\ninternet for explanations of various features.\n\n## Why?\n\nWhy not?\n\nIt seemed like it might be a fun project.\n\n## Installation\n\nThe Pipfile lists the dependencies; there aren't many.\n\nPython 3.5+ is required, but 3.6 is _not_, as PyPy runs this code\nmuch, much faster (around 4x on the test suite) and didn't support 3.6 until recently.\n\n    pipenv install -e .\n\nN.B.: `-e` gets you an \"editable\" install; changes to the source tree will\naffect the installed package's behavior.\n\n## Test Suite.\n\nRunning the test suite requires one-time access to a system with ZFS, to generate the test pools.\n\nRun `tests/fixtures.sh` on such a system and make the resulting directory `tests/fixtures`\n(this is where it will end up if you run `fixtures.sh` directly from the `tests` directory).\n\nThe tests themselves can be run with `py.test`.\nMost of the tests pass, but there are some known failures.\nFeel free to try fixing them.\n\nThe tests are heavily parameterized and attempt to run all tests against\nall relevant pool variations.\n\n## Usage\n\n`zexplore` is the main command line interface. It's reasonably well documented (I hope).\n\nThere's a subcommand for some limited FUSE support, which depends on `fusepy`\n(developed with `2.0.4`). This is not installed by default in the Pipfile.\n\nExample commands:\n\n    $ zexplore label -p tests/fixtures/feature_large_blocks\n    {b'errata': 0,\n     b'features_for_read': {},\n     b'guid': 6168868809305637343,\n     b'hostid': 8323329,\n     b'hostname': b'ubuntu-zesty',\n     b'name': b'feature_large_blocks',\n     b'pool_guid': 16637796155898928459,\n     b'state': 1,\n     b'top_guid': 6168868809305637343,\n     b'txg': 16,\n     b'vdev_children': 1,\n     b'vdev_tree': {b'ashift': 9,\n                    b'asize': 62390272,\n                    b'create_txg': 4,\n                    b'guid': 6168868809305637343,\n                    b'id': 0,\n                    b'is_log': 0,\n                    b'metaslab_array': 33,\n                    b'metaslab_shift': 24,\n                    b'path': b'/vagrant/fixtures/feature_large_blocks',\n                    b'type': b'file'},\n     b'version': 5000}\n\n    $ zexplore objset -p tests/fixtures/nested_datasets -P 1\n    {'config': 27,\n     'creation_version': 5000,\n     'deflate': 1,\n     'feature_descriptions': 30,\n     'features_for_read': 28,\n     'features_for_write': 29,\n     'free_bpobj': 11,\n     'history': 32,\n     'root_dataset': 2,\n     'sync_bplist': 31}\n\n    $ zexplore ls -p tests/fixtures/nested_datasets /n1/n2/n3\n    x\n    y\n\n    $ zexplore cat -p tests/fixtures/nested_datasets /gzip-9/gzip-9 | head -n 5\n    A\n    a\n    aa\n    aal\n    aalii\n\n## Caveats\n\nLots of things won't work, including:\n\n* raidz with more than 4 disks will probably fail with an inscrutable error.\n  ZFS uses a magic allocation function that's a non-linear black box. I haven't figured it out.\n  raidz where the disks are larger than a few GB will probably also fail,\n  but I haven't tested that at all.\n* Some new feature flags have come out since I last worked on this seriously,\n  and those features are (obviously) not supported. That's things like (incomplete list):\n  * SHA-512/256\n  * Skein\n  * spacemap_v2\n* Some feature flags that did exist when I was actively working on this are not implemented,\n  either because I failed to figure out how they work, or because I didn't get around to trying.\n* pyndata is the struct description library used to read all the on-disk structures.\n  I wrote it first, and it's bad. If I was doing this again today,\n  I'd probably build something with dataclasses.\n* There's a [Rust implementation of LZJB](https://github.com/alcarithemad/rlzjb) which is not\n  currently included, but decompression is not the bottleneck.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falcarithemad%2Fzfsp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falcarithemad%2Fzfsp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falcarithemad%2Fzfsp/lists"}