{"categories":[{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/5"}],"enrichment":{"capability":"Provides functions to retrieve XDG Base Directory Specification paths for cache, config, data, runtime, and state directories, returning pathlib.Path objects with sensible defaults when environment variables are unset.","skillfed_tags":["xdg-specification","file-paths","unix-linux"],"use_cases":["Store application configuration files in the user's XDG config directory instead of hardcoding ~/.config paths.","Manage application cache files in XDG cache directories that respect user environment variable overrides.","Build command-line tools that follow the XDG specification for multiplatform Unix/Linux compatibility.","Retrieve runtime directories for temporary sockets or IPC files via xdg_runtime_dir().","Access XDG data and state directories as lists to search multiple locations for application files."],"what_it_does":"xdg-base-dirs is a lightweight utility that implements the XDG Base Directory Specification, a freedesktop.org standard that defines where Unix/Linux applications should store user-specific files like configuration, cache, and data. It returns pathlib.Path objects for each directory type, reading from the corresponding XDG environment variables (XDG_CONFIG_HOME, XDG_CACHE_HOME, etc.) and falling back to specification-defined defaults when those variables are unset, empty, or contain relative paths.\n\nThe package eliminates the need to duplicate XDG path logic across multiple utilities. It has zero runtime dependencies and is small enough to copy directly into a project if preferred. It supports Python 3.10 through 3.13 and is actively maintained.","worth_installing":"Yes. This is a stable, dependency-free utility that solves a real problem for any Python tool dealing with user files on Unix/Linux systems. Low install friction, permissive license, active maintenance, and no known vulnerabilities make it a straightforward addition to projects that need XDG compliance."},"id":"xdg-base-dirs","links":{"html":"https://skillfed.io/packages/xdg-base-dirs","md":"https://skillfed.io/packages/xdg-base-dirs.md","pypi":"https://pypi.org/project/xdg-base-dirs/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2024-10-19","license_spdx":null,"license_treatment":"permissive","name":"xdg-base-dirs","python_support":"supports_current","summary":"Variables defined by the XDG Base Directory Specification"},"popularity":{"monthly_downloads":496994,"position":6333,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"6.0.2"}
