{"categories":[{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/5"}],"enrichment":{"capability":"Provides functions to retrieve XDG Base Directory Specification paths for user cache, configuration, data, and runtime directories, returning pathlib.Path objects with sensible defaults.","skillfed_tags":["xdg-specification","unix-paths","configuration-management"],"use_cases":["Store application configuration files in the user's XDG config directory instead of hardcoding paths.","Retrieve cache and temporary data directories for a CLI tool or daemon that respects system standards.","Build a utility that uses XDG paths on Unix and falls back gracefully on Windows.","Ensure a Python application respects user environment overrides for where data should be stored.","Implement multi-directory search paths for config files using xdg_config_dirs() to check system-wide and user directories."],"what_it_does":"xdg is a lightweight utility that implements version 0.8 of the XDG Base Directory Specification, a standard for where user applications should store configuration, cache, data, and runtime files on Unix-like systems. It exports functions that return pathlib.Path objects for each directory type, respecting environment variables like XDG_CONFIG_HOME and XDG_DATA_HOME when set to absolute paths, and falling back to specification defaults otherwise. The module has no external dependencies and is small enough to copy into a project if you prefer not to add a package dependency.\n\nThe package handles the common pattern of checking environment variables, validating paths (rejecting relative paths), and providing sensible defaults\u2014logic that would otherwise be duplicated across many utilities. It returns Path objects rather than strings, making it natural to use with modern Python filesystem code. The implementation is stable and straightforward, suitable for any application that needs to follow XDG conventions on Linux and other Unix systems.","worth_installing":"Yes. The package is lightweight, has no dependencies, solves a real problem (avoiding duplicated XDG logic), and is actively maintained despite infrequent releases. The ISC license is permissive. Install it if your application needs to follow XDG standards on Unix systems; if you only target Windows or have trivial directory needs, it may be overkill."},"id":"xdg","links":{"html":"https://skillfed.io/packages/xdg","md":"https://skillfed.io/packages/xdg.md","pypi":"https://pypi.org/project/xdg/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2023-02-27","license_spdx":null,"license_treatment":"permissive","name":"xdg","python_support":"supports_current","summary":"Variables defined by the XDG Base Directory Specification"},"popularity":{"monthly_downloads":674715,"position":5389,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"6.0.0"}
