$npx skillfedfor your agent

xdg

Variables defined by the XDG Base Directory Specification

Worth itPyPI UtilitiesReleased Feb 2023674.7K downloads / moISCPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — xdg-6.0.0-py3-none-any.whl
v6.0.0 · released 2023-02-27 · Python >=3.7,<4.0

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.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python >=3.7,<4.0 according to metadata; description notes 3.10 as minimum for current versions.
  • Low friction: pure Python, single-file module with zero runtime dependencies.
  • Last release was 2023-02-27, but repo shows active maintenance with a commit on 2026-08-02, so the long gap between releases does not indicate abandonment.

License · maintenance · safety

ISC (permissive) — ISC license is permissive and poses no restrictions on commercial or proprietary use. You can use, modify, and distribute this package freely with minimal obligations.

last release 2023-02-27 (1264 days) · last repo commit 2026-08-02 · 160 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 674,715 downloads/mo, #5,389 on PyPI

Verify before relying

pip install xdg-base-dirs

from xdg import xdg_cache_home, xdg_config_home, xdg_data_home

cache_dir = xdg_cache_home()
config_dir = xdg_config_home()
data_dir = xdg_data_home()
  • Whether Python 3.7-3.9 support listed in classifiers is actively maintained or outdated.
  • Current test coverage and whether all XDG specification edge cases (relative paths, empty vars) are well-handled.
  • Whether the single-file design means copying src/xdg_base_dirs/__init__.py into a project is a practical alternative to package installation.
Same gist for agents: .md · .json

What it is and 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.

The package handles the common pattern of checking environment variables, validating paths (rejecting relative paths), and providing sensible defaults—logic 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.

Use it for

  • 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.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

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.

Install

xdg on PyPI

Before you install

Low friction: pure Python, single-file module with zero runtime dependencies. Last release was 2023-02-27, but repo shows active maintenance with a commit on 2026-08-02, so the long gap between releases does not indicate abandonment.

Requires Python >=3.7,<4.0 according to metadata; description notes 3.10 as minimum for current versions.

License in practice

ISC license is permissive and poses no restrictions on commercial or proprietary use. You can use, modify, and distribute this package freely with minimal obligations.

Quickstart

pip install xdg-base-dirs

from xdg import xdg_cache_home, xdg_config_home, xdg_data_home

cache_dir = xdg_cache_home()
config_dir = xdg_config_home()
data_dir = xdg_data_home()

Verify before relying

  • Whether Python 3.7-3.9 support listed in classifiers is actively maintained or outdated.
  • Current test coverage and whether all XDG specification edge cases (relative paths, empty vars) are well-handled.
  • Whether the single-file design means copying src/xdg_base_dirs/__init__.py into a project is a practical alternative to package installation.

Package facts

LicenseISC permissive
Python supportSupports the current Python release >=3.7,<4.0
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 1,264 days since the last release
Last repo commit
First released
Downloads674,715 / month, #5,389 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 7 - InactiveIntended Audience :: DevelopersLicense :: OSI ApprovedNatural Language :: EnglishOperating System :: Microsoft :: WindowsOperating System :: UnixProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Evidence: xdg-6.0.0-py3-none-any.whl

Tags

Capabilities
xdg base directory pathsuser config cache data directoriesxdg specification implementationcross-platform user directoriesxdg environment variablessystem directory standards
Topics
xdg-specificationunix-pathsconfiguration-management
PyPI keywords
xdgbasedirectoryspecification

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “xdg specification implementation”

  • xdgProvides functions to retrieve XDG Base Directory Specification paths…
  • xdg-base-dirsProvides functions to retrieve XDG Base Directory Specification paths…
  • appdirsDetermines the correct platform-specific directory for storing…

Give your agent the search over MCP, or paste the wish link into any chat.

More Utilities packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
charset-normalizer Worth it
PyPI · Utilities · released Aug 2026

Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.

permissive licensepure Python · 3.7+
1.7Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
Pygments Worth it
PyPI · Utilities · released Mar 2026

Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.

Install it if you need to display or transform source code.

BSD-2-Clausepure Python · 3.9+
1.3Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.

MITpure Python
1.2Bdownloads / mo

See also xdg-base-dirs · appdirs · platformdirs · pyprojroot · pytest-env · path.py · pystow · emport · findlibs · pathlib-abc