{"id":15681311,"url":"https://github.com/edsu/ptree","last_synced_at":"2025-05-07T10:31:36.437Z","repository":{"id":57455422,"uuid":"1399161","full_name":"edsu/ptree","owner":"edsu","description":"minimal PairTree implementation","archived":false,"fork":false,"pushed_at":"2020-08-27T14:34:06.000Z","size":18,"stargazers_count":12,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T13:17:25.898Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://confluence.ucop.edu/display/Curation/PairTree","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edsu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-02-22T20:04:49.000Z","updated_at":"2025-03-09T01:47:45.000Z","dependencies_parsed_at":"2022-09-10T02:24:23.752Z","dependency_job_id":null,"html_url":"https://github.com/edsu/ptree","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edsu%2Fptree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edsu%2Fptree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edsu%2Fptree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edsu%2Fptree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edsu","download_url":"https://codeload.github.com/edsu/ptree/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249794785,"owners_count":21326774,"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-10-03T16:52:31.013Z","updated_at":"2025-04-19T20:31:09.367Z","avatar_url":"https://github.com/edsu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"ptree\n=====\n\n[![Build Status](https://secure.travis-ci.org/edsu/ptree.png)](http://travis-ci.org/edsu/ptree)\n\n[PairTree] is a technique from the digital preservation community for safely\nmapping identifiers to file paths, and back again. It can be helpful when\nwriting resources to disk so that they can be identified later on by merely\nlooking at the file system layout.\n\nThe ptree module has two functions to help you work with PairTree identifiers \nand file paths: `id2ptree` and `ptree2id`. \n\n```python\n\u003e\u003e\u003e import ptree\n\u003e\u003e\u003e ptree.id2ptree(\"info:lccn/12345678\")\n'/in/fo/+l/cc/n=/12/34/56/78/'\n\u003e\u003e\u003e ptree.ptree2id('/in/fo/+l/cc/n=/12/34/56/78/')\nu'info:lccn/12345678'\n```\n\nThanks\n------\n\nptree draws from [Ben O'Steen's] PairTree Python module, which provides a \nlot more functionality for storing bitstreams on disk. For better or worse\nptree focuses solely on the identifier/path mapping, and leaves IO operations \nup to you. The unit tests were shamelessly stolen from John Kunze's \n[File::PairTree]. \n\nLicense\n-------\n\n* CC0\n\n[PairTree]: https://confluence.ucop.edu/display/Curation/PairTree\n[Ben O'Steen's]: http://pypi.python.org/pypi/Pairtree\n[File::PairTree]: http://search.cpan.org/dist/File-Pairtree/lib/File/Pairtree.pm\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedsu%2Fptree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedsu%2Fptree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedsu%2Fptree/lists"}