# platformdirs - pydoc - phpman

Help on package platformdirs:

## NAME
    platformdirs

## DESCRIPTION
    Utilities for determining application-specific dirs. See <<https://github.com/platformdirs/platformdirs>> for details and
    usage.

## PACKAGE CONTENTS
    __main__
    android
    api
    macos
    unix
    version
    windows

## CLASSES
    abc.ABC(builtins.object)
        platformdirs.api.PlatformDirsABC
            platformdirs.unix.Unix

    AppDirs = class Unix(platformdirs.api.PlatformDirsABC)
     |  AppDirs(appname: 'str | None' = None, appauthor: 'str | None | Literal[False]' = None, version: 'str | None' = None, roaming: 'bool' = False, multipath: 'bool' = False, opinion: 'bool' = True)
     |
     |  On Unix/Linux, we follow the
     |  `XDG Basedir Spec <<https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html>>`_. The spec allows
     |  overriding directories with environment variables. The examples show are the default values, alongside the name of
     |  the environment variable that overrides them. Makes use of the
     |  `appname <platformdirs.api.PlatformDirsABC.appname>`,
     |  `version <platformdirs.api.PlatformDirsABC.version>`,
     |  `multipath <platformdirs.api.PlatformDirsABC.multipath>`,
     |  `opinion <platformdirs.api.PlatformDirsABC.opinion>`.
     |
     |  Method resolution order:
     |      Unix
     |      platformdirs.api.PlatformDirsABC
     |      abc.ABC
     |      builtins.object
     |
     |  Readonly properties defined here:
     |
     |  site_config_dir
     |      :return: config directories shared by users (if `multipath <platformdirs.api.PlatformDirsABC.multipath>`
     |       is enabled and ``XDG_DATA_DIR`` is set and a multi path the response is also a multi path separated by the OS
     |       path separator), e.g. ``/etc/xdg/$appname/$version``
     |
     |  site_config_path
     |      :return: config path shared by the users. Only return first item, even if ``multipath`` is set to ``True``
     |
     |  site_data_dir
     |      :return: data directories shared by users (if `multipath <platformdirs.api.PlatformDirsABC.multipath>` is
     |       enabled and ``XDG_DATA_DIR`` is set and a multi path the response is also a multi path separated by the OS
     |       path separator), e.g. ``/usr/local/share/$appname/$version`` or ``/usr/share/$appname/$version``
     |
     |  site_data_path
     |      :return: data path shared by users. Only return first item, even if ``multipath`` is set to ``True``
     |
     |  user_cache_dir
     |      :return: cache directory tied to the user, e.g. ``~/.cache/$appname/$version`` or
     |       ``~/$XDG_CACHE_HOME/$appname/$version``
     |
     |  user_config_dir
     |      :return: config directory tied to the user, e.g. ``~/.config/$appname/$version`` or
     |       ``$XDG_CONFIG_HOME/$appname/$version``
     |
     |  user_data_dir
     |      :return: data directory tied to the user, e.g. ``~/.local/share/$appname/$version`` or
     |       ``$XDG_DATA_HOME/$appname/$version``
     |
     |  user_documents_dir
     |      :return: documents directory tied to the user, e.g. ``~/Documents``
     |
     |  user_log_dir
     |      :return: log directory tied to the user, same as `user_data_dir` if not opinionated else ``log`` in it
     |
     |  user_runtime_dir
     |      :return: runtime directory tied to the user, e.g. ``/run/user/$(id -u)/$appname/$version`` or
     |       ``$XDG_RUNTIME_DIR/$appname/$version``
     |
     |  user_state_dir
     |      :return: state directory tied to the user, e.g. ``~/.local/state/$appname/$version`` or
     |       ``$XDG_STATE_HOME/$appname/$version``
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  __abstractmethods__ = frozenset()
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from platformdirs.api.PlatformDirsABC:
     |
     |  __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)
     |      Create a new platform directory.
     |
     |      :param appname: See `appname`.
     |      :param appauthor: See `appauthor`.
     |      :param version: See `version`.
     |      :param roaming: See `roaming`.
     |      :param multipath: See `multipath`.
     |      :param opinion: See `opinion`.
     |
     |  ----------------------------------------------------------------------
     |  Readonly properties inherited from platformdirs.api.PlatformDirsABC:
     |
     |  user_cache_path
     |      :return: cache path tied to the user
     |
     |  user_config_path
     |      :return: config path tied to the user
     |
     |  user_data_path
     |      :return: data path tied to the user
     |
     |  user_documents_path
     |      :return: documents path tied to the user
     |
     |  user_log_path
     |      :return: log path tied to the user
     |
     |  user_runtime_path
     |      :return: runtime path tied to the user
     |
     |  user_state_path
     |      :return: state path tied to the user
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from platformdirs.api.PlatformDirsABC:
     |
     |  __dict__
     |      dictionary for instance variables (if defined)
     |
     |  __weakref__
     |      list of weak references to the object (if defined)

    PlatformDirs = class Unix(platformdirs.api.PlatformDirsABC)
     |  PlatformDirs(appname: 'str | None' = None, appauthor: 'str | None | Literal[False]' = None, version: 'str | None' = None, roaming: 'bool' = False, multipath: 'bool' = False, opinion: 'bool' = True)
     |
     |  On Unix/Linux, we follow the
     |  `XDG Basedir Spec <<https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html>>`_. The spec allows
     |  overriding directories with environment variables. The examples show are the default values, alongside the name of
     |  the environment variable that overrides them. Makes use of the
     |  `appname <platformdirs.api.PlatformDirsABC.appname>`,
     |  `version <platformdirs.api.PlatformDirsABC.version>`,
     |  `multipath <platformdirs.api.PlatformDirsABC.multipath>`,
     |  `opinion <platformdirs.api.PlatformDirsABC.opinion>`.
     |
     |  Method resolution order:
     |      Unix
     |      platformdirs.api.PlatformDirsABC
     |      abc.ABC
     |      builtins.object
     |
     |  Readonly properties defined here:
     |
     |  site_config_dir
     |      :return: config directories shared by users (if `multipath <platformdirs.api.PlatformDirsABC.multipath>`
     |       is enabled and ``XDG_DATA_DIR`` is set and a multi path the response is also a multi path separated by the OS
     |       path separator), e.g. ``/etc/xdg/$appname/$version``
     |
     |  site_config_path
     |      :return: config path shared by the users. Only return first item, even if ``multipath`` is set to ``True``
     |
     |  site_data_dir
     |      :return: data directories shared by users (if `multipath <platformdirs.api.PlatformDirsABC.multipath>` is
     |       enabled and ``XDG_DATA_DIR`` is set and a multi path the response is also a multi path separated by the OS
     |       path separator), e.g. ``/usr/local/share/$appname/$version`` or ``/usr/share/$appname/$version``
     |
     |  site_data_path
     |      :return: data path shared by users. Only return first item, even if ``multipath`` is set to ``True``
     |
     |  user_cache_dir
     |      :return: cache directory tied to the user, e.g. ``~/.cache/$appname/$version`` or
     |       ``~/$XDG_CACHE_HOME/$appname/$version``
     |
     |  user_config_dir
     |      :return: config directory tied to the user, e.g. ``~/.config/$appname/$version`` or
     |       ``$XDG_CONFIG_HOME/$appname/$version``
     |
     |  user_data_dir
     |      :return: data directory tied to the user, e.g. ``~/.local/share/$appname/$version`` or
     |       ``$XDG_DATA_HOME/$appname/$version``
     |
     |  user_documents_dir
     |      :return: documents directory tied to the user, e.g. ``~/Documents``
     |
     |  user_log_dir
     |      :return: log directory tied to the user, same as `user_data_dir` if not opinionated else ``log`` in it
     |
     |  user_runtime_dir
     |      :return: runtime directory tied to the user, e.g. ``/run/user/$(id -u)/$appname/$version`` or
     |       ``$XDG_RUNTIME_DIR/$appname/$version``
     |
     |  user_state_dir
     |      :return: state directory tied to the user, e.g. ``~/.local/state/$appname/$version`` or
     |       ``$XDG_STATE_HOME/$appname/$version``
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  __abstractmethods__ = frozenset()
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from platformdirs.api.PlatformDirsABC:
     |
     |  __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)
     |      Create a new platform directory.
     |
     |      :param appname: See `appname`.
     |      :param appauthor: See `appauthor`.
     |      :param version: See `version`.
     |      :param roaming: See `roaming`.
     |      :param multipath: See `multipath`.
     |      :param opinion: See `opinion`.
     |
     |  ----------------------------------------------------------------------
     |  Readonly properties inherited from platformdirs.api.PlatformDirsABC:
     |
     |  user_cache_path
     |      :return: cache path tied to the user
     |
     |  user_config_path
     |      :return: config path tied to the user
     |
     |  user_data_path
     |      :return: data path tied to the user
     |
     |  user_documents_path
     |      :return: documents path tied to the user
     |
     |  user_log_path
     |      :return: log path tied to the user
     |
     |  user_runtime_path
     |      :return: runtime path tied to the user
     |
     |  user_state_path
     |      :return: state path tied to the user
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from platformdirs.api.PlatformDirsABC:
     |
     |  __dict__
     |      dictionary for instance variables (if defined)
     |
     |  __weakref__
     |      list of weak references to the object (if defined)

### class PlatformDirsABC
     |  PlatformDirsABC(appname: 'str | None' = None, appauthor: 'str | None | Literal[False]' = None, version: 'str | None' = None, roaming: 'bool' = False, multipath: 'bool' = False, opinion: 'bool' = True)
     |
     |  Abstract base class for platform directories.
     |
     |  Method resolution order:
     |      PlatformDirsABC
     |      abc.ABC
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  __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)
     |      Create a new platform directory.
     |
     |      :param appname: See `appname`.
     |      :param appauthor: See `appauthor`.
     |      :param version: See `version`.
     |      :param roaming: See `roaming`.
     |      :param multipath: See `multipath`.
     |      :param opinion: See `opinion`.
     |
     |  ----------------------------------------------------------------------
     |  Readonly properties defined here:
     |
     |  site_config_dir
     |      :return: config directory shared by the users
     |
     |  site_config_path
     |      :return: config path shared by the users
     |
     |  site_data_dir
     |      :return: data directory shared by users
     |
     |  site_data_path
     |      :return: data path shared by users
     |
     |  user_cache_dir
     |      :return: cache directory tied to the user
     |
     |  user_cache_path
     |      :return: cache path tied to the user
     |
     |  user_config_dir
     |      :return: config directory tied to the user
     |
     |  user_config_path
     |      :return: config path tied to the user
     |
     |  user_data_dir
     |      :return: data directory tied to the user
     |
     |  user_data_path
     |      :return: data path tied to the user
     |
     |  user_documents_dir
     |      :return: documents directory tied to the user
     |
     |  user_documents_path
     |      :return: documents path tied to the user
     |
     |  user_log_dir
     |      :return: log directory tied to the user
     |
     |  user_log_path
     |      :return: log path tied to the user
     |
     |  user_runtime_dir
     |      :return: runtime directory tied to the user
     |
     |  user_runtime_path
     |      :return: runtime path tied to the user
     |
     |  user_state_dir
     |      :return: state directory tied to the user
     |
     |  user_state_path
     |      :return: state path tied to the user
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  __dict__
     |      dictionary for instance variables (if defined)
     |
     |  __weakref__
     |      list of weak references to the object (if defined)
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  __abstractmethods__ = frozenset({'site_config_dir', 'site_data_dir', '...

## FUNCTIONS
### site_config_dir
        :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
        :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
        :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
        :param multipath: See `roaming <platformdirs.api.PlatformDirsABC.multipath>`.
        :returns: config directory shared by the users

### site_config_path
        :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
        :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
        :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
        :param multipath: See `roaming <platformdirs.api.PlatformDirsABC.multipath>`.
        :returns: config path shared by the users

### site_data_dir
        :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
        :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
        :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
        :param multipath: See `roaming <platformdirs.api.PlatformDirsABC.multipath>`.
        :returns: data directory shared by users

### site_data_path
        :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
        :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
        :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
        :param multipath: See `multipath <platformdirs.api.PlatformDirsABC.multipath>`.
        :returns: data path shared by users

### user_cache_dir
        :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
        :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
        :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
        :param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
        :returns: cache directory tied to the user

### user_cache_path
        :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
        :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
        :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
        :param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
        :returns: cache path tied to the user

### user_config_dir
        :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
        :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
        :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
        :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.
        :returns: config directory tied to the user

### user_config_path
        :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
        :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
        :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
        :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.
        :returns: config path tied to the user

### user_data_dir
        :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
        :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
        :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
        :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.
        :returns: data directory tied to the user

### user_data_path
        :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
        :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
        :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
        :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.
        :returns: data path tied to the user

### user_documents_dir
        :returns: documents directory tied to the user

### user_documents_path
        :returns: documents path tied to the user

### user_log_dir
        :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
        :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
        :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
        :param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
        :returns: log directory tied to the user

### user_log_path
        :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
        :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
        :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
        :param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
        :returns: log path tied to the user

### user_runtime_dir
        :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
        :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
        :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
        :param opinion: See `opinion <platformdirs.api.PlatformDirsABC.opinion>`.
        :returns: runtime directory tied to the user

### user_runtime_path
        :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
        :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
        :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
        :param opinion: See `opinion <platformdirs.api.PlatformDirsABC.opinion>`.
        :returns: runtime path tied to the user

### user_state_dir
        :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
        :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
        :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
        :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.
        :returns: state directory tied to the user

### user_state_path
        :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
        :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
        :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
        :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.
        :returns: state path tied to the user

## DATA
    __all__ = ['__version__', '__version_info__', 'PlatformDirs', 'AppDirs...
    __version_info__ = (2, 5, 1)

## VERSION
    2.5.1

## FILE
    /usr/lib/python3/dist-packages/platformdirs/__init__.py


