AppDirs is a small Python module (version 1.4.4) designed to determine appropriate platform-specific directories for storing user data, configuration, cache, and log files across Linux, macOS, and Windows. This project has been officially deprecated, and `platformdirs` is recommended as a more actively maintained alternative.
pip install appdirsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to use `appdirs` to retrieve common application-specific directory paths for the current user and platform. It also shows how to create one of these directories if it doesn't already exist.
Migrate your application to use the `platformdirs` library. The API is largely compatible, making migration straightforward.
Always verify the generated paths on your target operating systems. If `appdirs`'s default naming is problematic, consider examining the `platformdirs` documentation for more flexible options or implementing custom logic.
Ensure you are using at least `appdirs==1.4.4` for Python 3 environments. For the best compatibility and ongoing support, migrate to `platformdirs`.
Correct the keyword argument from `appversion` to `version` when calling `appdirs` functions. For example, change `user_data_dir(appname, appauthor, appversion=appversion)` to `user_data_dir(appname, appauthor, version=appversion)`.
Correct the keyword argument from `appversion` to `version` in your function calls. For example, use `user_data_dir(appname, appauthor, version=my_app_version)` instead of `user_data_dir(appname, appauthor, appversion=my_app_version)`.
Install the 'appdirs' module using pip: 'pip install appdirs'.
Update setuptools to the latest version: 'pip install --upgrade setuptools'.
Install the 'appdirs' module using pip: 'pip install appdirs'.
Change the keyword argument from `appversion` to `version`. For example, `appdirs.user_data_dir(appname, appauthor, version=appversion)`.
Try to force reinstall `appdirs`: `pip install appdirs --ignore-installed`. If the problem persists, uninstall it first `pip uninstall appdirs` and then reinstall `pip install appdirs`.
No dependency data recorded yet.