{
    "mode": "pydoc",
    "parameter": "platformdirs",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/pydoc/platformdirs/json",
    "generated": "2026-06-02T15:02:48Z",
    "sections": {
        "NAME": {
            "content": "platformdirs\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Utilities for determining application-specific dirs. See <https://github.com/platformdirs/platformdirs> for details and\nusage.\n",
            "subsections": []
        },
        "PACKAGE CONTENTS": {
            "content": "main\nandroid\napi\nmacos\nunix\nversion\nwindows\n",
            "subsections": []
        },
        "CLASSES": {
            "content": "abc.ABC(builtins.object)\nplatformdirs.api.PlatformDirsABC\nplatformdirs.unix.Unix\n\nAppDirs = class Unix(platformdirs.api.PlatformDirsABC)\n|  AppDirs(appname: 'str | None' = None, appauthor: 'str | None | Literal[False]' = None, version: 'str | None' = None, roaming: 'bool' = False, multipath: 'bool' = False, opinion: 'bool' = True)\n|\n|  On Unix/Linux, we follow the\n|  `XDG Basedir Spec <https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html>`. The spec allows\n|  overriding directories with environment variables. The examples show are the default values, alongside the name of\n|  the environment variable that overrides them. Makes use of the\n|  `appname <platformdirs.api.PlatformDirsABC.appname>`,\n|  `version <platformdirs.api.PlatformDirsABC.version>`,\n|  `multipath <platformdirs.api.PlatformDirsABC.multipath>`,\n|  `opinion <platformdirs.api.PlatformDirsABC.opinion>`.\n|\n|  Method resolution order:\n|      Unix\n|      platformdirs.api.PlatformDirsABC\n|      abc.ABC\n|      builtins.object\n|\n|  Readonly properties defined here:\n|\n|  siteconfigdir\n|      :return: config directories shared by users (if `multipath <platformdirs.api.PlatformDirsABC.multipath>`\n|       is enabled and ``XDGDATADIR`` is set and a multi path the response is also a multi path separated by the OS\n|       path separator), e.g. ``/etc/xdg/$appname/$version``\n|\n|  siteconfigpath\n|      :return: config path shared by the users. Only return first item, even if ``multipath`` is set to ``True``\n|\n|  sitedatadir\n|      :return: data directories shared by users (if `multipath <platformdirs.api.PlatformDirsABC.multipath>` is\n|       enabled and ``XDGDATADIR`` is set and a multi path the response is also a multi path separated by the OS\n|       path separator), e.g. ``/usr/local/share/$appname/$version`` or ``/usr/share/$appname/$version``\n|\n|  sitedatapath\n|      :return: data path shared by users. Only return first item, even if ``multipath`` is set to ``True``\n|\n|  usercachedir\n|      :return: cache directory tied to the user, e.g. ``~/.cache/$appname/$version`` or\n|       ``~/$XDGCACHEHOME/$appname/$version``\n|\n|  userconfigdir\n|      :return: config directory tied to the user, e.g. ``~/.config/$appname/$version`` or\n|       ``$XDGCONFIGHOME/$appname/$version``\n|\n|  userdatadir\n|      :return: data directory tied to the user, e.g. ``~/.local/share/$appname/$version`` or\n|       ``$XDGDATAHOME/$appname/$version``\n|\n|  userdocumentsdir\n|      :return: documents directory tied to the user, e.g. ``~/Documents``\n|\n|  userlogdir\n|      :return: log directory tied to the user, same as `userdatadir` if not opinionated else ``log`` in it\n|\n|  userruntimedir\n|      :return: runtime directory tied to the user, e.g. ``/run/user/$(id -u)/$appname/$version`` or\n|       ``$XDGRUNTIMEDIR/$appname/$version``\n|\n|  userstatedir\n|      :return: state directory tied to the user, e.g. ``~/.local/state/$appname/$version`` or\n|       ``$XDGSTATEHOME/$appname/$version``\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  abstractmethods = frozenset()\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from platformdirs.api.PlatformDirsABC:\n|\n|  init(self, appname: 'str | None' = None, appauthor: 'str | None | Literal[False]' = None, version: 'str | None' = None, roaming: 'bool' = False, multipath: 'bool' = False, opinion: 'bool' = True)\n|      Create a new platform directory.\n|\n|      :param appname: See `appname`.\n|      :param appauthor: See `appauthor`.\n|      :param version: See `version`.\n|      :param roaming: See `roaming`.\n|      :param multipath: See `multipath`.\n|      :param opinion: See `opinion`.\n|\n|  ----------------------------------------------------------------------\n|  Readonly properties inherited from platformdirs.api.PlatformDirsABC:\n|\n|  usercachepath\n|      :return: cache path tied to the user\n|\n|  userconfigpath\n|      :return: config path tied to the user\n|\n|  userdatapath\n|      :return: data path tied to the user\n|\n|  userdocumentspath\n|      :return: documents path tied to the user\n|\n|  userlogpath\n|      :return: log path tied to the user\n|\n|  userruntimepath\n|      :return: runtime path tied to the user\n|\n|  userstatepath\n|      :return: state path tied to the user\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from platformdirs.api.PlatformDirsABC:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n\nPlatformDirs = class Unix(platformdirs.api.PlatformDirsABC)\n|  PlatformDirs(appname: 'str | None' = None, appauthor: 'str | None | Literal[False]' = None, version: 'str | None' = None, roaming: 'bool' = False, multipath: 'bool' = False, opinion: 'bool' = True)\n|\n|  On Unix/Linux, we follow the\n|  `XDG Basedir Spec <https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html>`. The spec allows\n|  overriding directories with environment variables. The examples show are the default values, alongside the name of\n|  the environment variable that overrides them. Makes use of the\n|  `appname <platformdirs.api.PlatformDirsABC.appname>`,\n|  `version <platformdirs.api.PlatformDirsABC.version>`,\n|  `multipath <platformdirs.api.PlatformDirsABC.multipath>`,\n|  `opinion <platformdirs.api.PlatformDirsABC.opinion>`.\n|\n|  Method resolution order:\n|      Unix\n|      platformdirs.api.PlatformDirsABC\n|      abc.ABC\n|      builtins.object\n|\n|  Readonly properties defined here:\n|\n|  siteconfigdir\n|      :return: config directories shared by users (if `multipath <platformdirs.api.PlatformDirsABC.multipath>`\n|       is enabled and ``XDGDATADIR`` is set and a multi path the response is also a multi path separated by the OS\n|       path separator), e.g. ``/etc/xdg/$appname/$version``\n|\n|  siteconfigpath\n|      :return: config path shared by the users. Only return first item, even if ``multipath`` is set to ``True``\n|\n|  sitedatadir\n|      :return: data directories shared by users (if `multipath <platformdirs.api.PlatformDirsABC.multipath>` is\n|       enabled and ``XDGDATADIR`` is set and a multi path the response is also a multi path separated by the OS\n|       path separator), e.g. ``/usr/local/share/$appname/$version`` or ``/usr/share/$appname/$version``\n|\n|  sitedatapath\n|      :return: data path shared by users. Only return first item, even if ``multipath`` is set to ``True``\n|\n|  usercachedir\n|      :return: cache directory tied to the user, e.g. ``~/.cache/$appname/$version`` or\n|       ``~/$XDGCACHEHOME/$appname/$version``\n|\n|  userconfigdir\n|      :return: config directory tied to the user, e.g. ``~/.config/$appname/$version`` or\n|       ``$XDGCONFIGHOME/$appname/$version``\n|\n|  userdatadir\n|      :return: data directory tied to the user, e.g. ``~/.local/share/$appname/$version`` or\n|       ``$XDGDATAHOME/$appname/$version``\n|\n|  userdocumentsdir\n|      :return: documents directory tied to the user, e.g. ``~/Documents``\n|\n|  userlogdir\n|      :return: log directory tied to the user, same as `userdatadir` if not opinionated else ``log`` in it\n|\n|  userruntimedir\n|      :return: runtime directory tied to the user, e.g. ``/run/user/$(id -u)/$appname/$version`` or\n|       ``$XDGRUNTIMEDIR/$appname/$version``\n|\n|  userstatedir\n|      :return: state directory tied to the user, e.g. ``~/.local/state/$appname/$version`` or\n|       ``$XDGSTATEHOME/$appname/$version``\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  abstractmethods = frozenset()\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from platformdirs.api.PlatformDirsABC:\n|\n|  init(self, appname: 'str | None' = None, appauthor: 'str | None | Literal[False]' = None, version: 'str | None' = None, roaming: 'bool' = False, multipath: 'bool' = False, opinion: 'bool' = True)\n|      Create a new platform directory.\n|\n|      :param appname: See `appname`.\n|      :param appauthor: See `appauthor`.\n|      :param version: See `version`.\n|      :param roaming: See `roaming`.\n|      :param multipath: See `multipath`.\n|      :param opinion: See `opinion`.\n|\n|  ----------------------------------------------------------------------\n|  Readonly properties inherited from platformdirs.api.PlatformDirsABC:\n|\n|  usercachepath\n|      :return: cache path tied to the user\n|\n|  userconfigpath\n|      :return: config path tied to the user\n|\n|  userdatapath\n|      :return: data path tied to the user\n|\n|  userdocumentspath\n|      :return: documents path tied to the user\n|\n|  userlogpath\n|      :return: log path tied to the user\n|\n|  userruntimepath\n|      :return: runtime path tied to the user\n|\n|  userstatepath\n|      :return: state path tied to the user\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from platformdirs.api.PlatformDirsABC:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n",
            "subsections": [
                {
                    "name": "class PlatformDirsABC",
                    "content": "|  PlatformDirsABC(appname: 'str | None' = None, appauthor: 'str | None | Literal[False]' = None, version: 'str | None' = None, roaming: 'bool' = False, multipath: 'bool' = False, opinion: 'bool' = True)\n|\n|  Abstract base class for platform directories.\n|\n|  Method resolution order:\n|      PlatformDirsABC\n|      abc.ABC\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(self, appname: 'str | None' = None, appauthor: 'str | None | Literal[False]' = None, version: 'str | None' = None, roaming: 'bool' = False, multipath: 'bool' = False, opinion: 'bool' = True)\n|      Create a new platform directory.\n|\n|      :param appname: See `appname`.\n|      :param appauthor: See `appauthor`.\n|      :param version: See `version`.\n|      :param roaming: See `roaming`.\n|      :param multipath: See `multipath`.\n|      :param opinion: See `opinion`.\n|\n|  ----------------------------------------------------------------------\n|  Readonly properties defined here:\n|\n|  siteconfigdir\n|      :return: config directory shared by the users\n|\n|  siteconfigpath\n|      :return: config path shared by the users\n|\n|  sitedatadir\n|      :return: data directory shared by users\n|\n|  sitedatapath\n|      :return: data path shared by users\n|\n|  usercachedir\n|      :return: cache directory tied to the user\n|\n|  usercachepath\n|      :return: cache path tied to the user\n|\n|  userconfigdir\n|      :return: config directory tied to the user\n|\n|  userconfigpath\n|      :return: config path tied to the user\n|\n|  userdatadir\n|      :return: data directory tied to the user\n|\n|  userdatapath\n|      :return: data path tied to the user\n|\n|  userdocumentsdir\n|      :return: documents directory tied to the user\n|\n|  userdocumentspath\n|      :return: documents path tied to the user\n|\n|  userlogdir\n|      :return: log directory tied to the user\n|\n|  userlogpath\n|      :return: log path tied to the user\n|\n|  userruntimedir\n|      :return: runtime directory tied to the user\n|\n|  userruntimepath\n|      :return: runtime path tied to the user\n|\n|  userstatedir\n|      :return: state directory tied to the user\n|\n|  userstatepath\n|      :return: state path tied to the user\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  abstractmethods = frozenset({'siteconfigdir', 'sitedatadir', '...\n"
                }
            ]
        },
        "FUNCTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "site_config_dir",
                    "content": ":param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.\n:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.\n:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.\n:param multipath: See `roaming <platformdirs.api.PlatformDirsABC.multipath>`.\n:returns: config directory shared by the users\n"
                },
                {
                    "name": "site_config_path",
                    "content": ":param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.\n:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.\n:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.\n:param multipath: See `roaming <platformdirs.api.PlatformDirsABC.multipath>`.\n:returns: config path shared by the users\n"
                },
                {
                    "name": "site_data_dir",
                    "content": ":param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.\n:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.\n:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.\n:param multipath: See `roaming <platformdirs.api.PlatformDirsABC.multipath>`.\n:returns: data directory shared by users\n"
                },
                {
                    "name": "site_data_path",
                    "content": ":param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.\n:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.\n:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.\n:param multipath: See `multipath <platformdirs.api.PlatformDirsABC.multipath>`.\n:returns: data path shared by users\n"
                },
                {
                    "name": "user_cache_dir",
                    "content": ":param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.\n:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.\n:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.\n:param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.\n:returns: cache directory tied to the user\n"
                },
                {
                    "name": "user_cache_path",
                    "content": ":param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.\n:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.\n:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.\n:param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.\n:returns: cache path tied to the user\n"
                },
                {
                    "name": "user_config_dir",
                    "content": ":param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.\n:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.\n:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.\n:param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.\n:returns: config directory tied to the user\n"
                },
                {
                    "name": "user_config_path",
                    "content": ":param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.\n:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.\n:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.\n:param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.\n:returns: config path tied to the user\n"
                },
                {
                    "name": "user_data_dir",
                    "content": ":param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.\n:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.\n:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.\n:param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.\n:returns: data directory tied to the user\n"
                },
                {
                    "name": "user_data_path",
                    "content": ":param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.\n:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.\n:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.\n:param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.\n:returns: data path tied to the user\n"
                },
                {
                    "name": "user_documents_dir",
                    "content": ":returns: documents directory tied to the user\n"
                },
                {
                    "name": "user_documents_path",
                    "content": ":returns: documents path tied to the user\n"
                },
                {
                    "name": "user_log_dir",
                    "content": ":param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.\n:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.\n:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.\n:param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.\n:returns: log directory tied to the user\n"
                },
                {
                    "name": "user_log_path",
                    "content": ":param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.\n:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.\n:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.\n:param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.\n:returns: log path tied to the user\n"
                },
                {
                    "name": "user_runtime_dir",
                    "content": ":param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.\n:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.\n:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.\n:param opinion: See `opinion <platformdirs.api.PlatformDirsABC.opinion>`.\n:returns: runtime directory tied to the user\n"
                },
                {
                    "name": "user_runtime_path",
                    "content": ":param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.\n:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.\n:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.\n:param opinion: See `opinion <platformdirs.api.PlatformDirsABC.opinion>`.\n:returns: runtime path tied to the user\n"
                },
                {
                    "name": "user_state_dir",
                    "content": ":param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.\n:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.\n:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.\n:param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.\n:returns: state directory tied to the user\n"
                },
                {
                    "name": "user_state_path",
                    "content": ":param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.\n:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.\n:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.\n:param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.\n:returns: state path tied to the user\n"
                }
            ]
        },
        "DATA": {
            "content": "all = ['version', 'versioninfo', 'PlatformDirs', 'AppDirs...\nversioninfo = (2, 5, 1)\n",
            "subsections": []
        },
        "VERSION": {
            "content": "2.5.1\n",
            "subsections": []
        },
        "FILE": {
            "content": "/usr/lib/python3/dist-packages/platformdirs/init.py\n\n",
            "subsections": []
        }
    },
    "summary": "platformdirs",
    "flags": [],
    "examples": [],
    "see_also": []
}