appdirs
A small Python module for determining appropriate platform-specific dirs, e.g. a "user data dir".
Install
appdirs on PyPI
pip
pip install appdirsuv
uv add appdirspoetry
poetry add appdirsPackage facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 2,285 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: appdirs-1.4.4-py2.py3-none-any.whl
Keywords: application, directory, log, cache, user
About appdirs
from the package's own PyPI description — quoted content, verbatim
.. image:: https://secure.travis-ci.org/ActiveState/appdirs.png :target: http://travis-ci.org/ActiveState/appdirs
the problem
What directory should your app use for storing user data? If running on Mac OS X, you should use::
~/Library/Application Support/<AppName>
If on Windows (at least English Win XP) that should be::
C:\Documents and Settings\<User>\Application Data\Local Settings\<AppAuthor>\<AppName>
or possibly::
C:\Documents and Settings\<User>\Application Data\<AppAuthor>\<AppName>
for roaming profiles <http://bit.ly/9yl3b6>_ but that is another story.
On Linux (and other Unices) the dir, according to the XDG
spec <http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html>_, is::
~/.local/share/<AppName>
appdirs to the rescue
This kind of thing is what the appdirs module is for. appdirs will
help you choose an appropriate:
- user data dir (
user_data_dir) - user config dir (
user_config_dir) - user cache dir (
user_cache_dir) - site data dir (
site_data_dir) - site config dir (
site_config_dir) - user log dir (
user_log_dir)
and also:
- is a single...
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
appdirs determines the appropriate platform-specific directories for storing application data, configuration, cache, and logs on Windows, macOS, and Linux, following OS conventions and standards like XDG.
Installation is frictionless with no runtime dependencies and a pure-Python wheel distribution. However, the package is abandoned—last release was 2020-05-11 and the repository shows no commits since 2023-02-10, though it remains archived and stable.
MIT license permits unrestricted use, modification, and distribution with minimal restrictions, making it safe for commercial and open-source projects alike.
Usage
pip install appdirs
from appdirs import user_data_dir, user_cache_dir
data_path = user_data_dir("MyApp", "MyAuthor")
cache_path = user_cache_dir("MyApp", "MyAuthor")
Verdict: appdirs is a stable, production-ready utility with zero dependencies and no known vulnerabilities, but it is abandoned—no updates since 2020. It remains suitable for straightforward cross-platform directory resolution, though you should monitor for any future Python compatibility issues and consider alternatives if active maintenance becomes critical for your project.
Needs verification
- Whether the package has been tested against Python 3.9+ despite classifiers only listing through 3.8
- Whether any known issues exist with modern Windows or macOS directory structures not reflected in the CVE record
Similar packages
permissive · top 100 on PyPI
keyringpermissive · top 1,000 on PyPI
watchfilespermissive · top 1,000 on PyPI
zope.eventunclear · top 1,000 on PyPI
oauth2clientpermissive · top 1,000 on PyPI
userpathpermissive · top 1,000 on PyPI
coloramapermissive · top 100 on PyPI
Flask-Loginpermissive · top 1,000 on PyPI
jsonpatchpermissive · top 1,000 on PyPI
certificopyleft · top 100 on PyPI