{"id":16567387,"url":"https://github.com/bruxisma/dirs","last_synced_at":"2025-03-05T10:29:21.940Z","repository":{"id":138623550,"uuid":"208198606","full_name":"bruxisma/dirs","owner":"bruxisma","description":"Python library for getting dirs for platform specific use cases (such as XDG, or Roaming AppData)","archived":false,"fork":false,"pushed_at":"2019-12-19T17:57:47.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-15T23:54:55.023Z","etag":null,"topics":["appdirs","pypi","python","xdg"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bruxisma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-13T05:01:43.000Z","updated_at":"2019-12-19T17:58:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"8c9e18d8-0df0-430d-a12d-569c6031fff5","html_url":"https://github.com/bruxisma/dirs","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/bruxisma%2Fdirs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruxisma%2Fdirs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruxisma%2Fdirs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruxisma%2Fdirs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bruxisma","download_url":"https://codeload.github.com/bruxisma/dirs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242008994,"owners_count":20057010,"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":["appdirs","pypi","python","xdg"],"created_at":"2024-10-11T21:06:28.680Z","updated_at":"2025-03-05T10:29:21.910Z","avatar_url":"https://github.com/bruxisma.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Overview\n\n---\n![PyPI - Python Version][versions]\n![PyPI - License][license]\n![PyPI - Package][package]\n![Code style: black][style]\n\n`dirs` is a small python library in the spirit of appdirs[1] and other XDG\nfocused directory libraries. However, there are several that I've\nidentified with these other libraries:\n\n1. Overengineered solutions to get a few simple paths\n2. When Windows support is available, it reads from the registry, rather than\n   using the recommended approach of using `KnownFolderID`.\n3. No memoization of results. This can be costly when repeatedly working with\n   filesystem paths\n4. None of these libraries return a `pathlib.Path` object\n5. None of these libraries use the `typing` module for better static analysis\n   tooling\n6. None of these libraries use `dataclasses` or `attrs` to prevent overwriting\n   internals or \"changing\" state on the fly.\n\n`dirs` tries to solve all of this by using `ctypes` under Windows for initial\ncalls, `functools.lru_cache` for an alternative API, lazy generation of\n`config_dirs` and `data_dirs` on all platforms, and many others. Proper\ndocumentation will be uploaded at some point, but the code is fairly readable\nand easy to understand.\n\n## Example Use\n\n```py\nfrom dirs import User, Site # Using `*` is also permitted\n\napp = User('app-name')\nprint(app.config) # prints a joined path with User.config_home() and 'app-name'\nprint(User.config_home()) # This returns the Path as-is\nfor path in Site.config_dirs(): # This is a generator, so it's iterable\n  print(f'{path} exists: {path.exists()}')\n```\n\n[versions]: https://img.shields.io/pypi/pyversions/dirs?style=for-the-badge\n[license]: https://img.shields.io/pypi/l/dirs?style=for-the-badge\n[package]: https://img.shields.io/pypi/v/dirs?style=for-the-badge\n[style]: https://img.shields.io/badge/code%20style-black-000000.svg\n\n[1]: https://github.com/ActiveState/appdirs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbruxisma%2Fdirs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbruxisma%2Fdirs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbruxisma%2Fdirs/lists"}