Find the right platform-specific directories for user data, config, cache and logs in Python
open sourceMITfree
platformdirs is a small Python package that returns the right platform-specific directories for an application (user data, config, cache, state, logs, runtime, documents and downloads), handling the differences between macOS, Windows, Linux and other Unix systems, Android and iOS. A PlatformDirs object takes the app name and author and gives each directory as a string or a Path. It's maintained by the tox-dev organization.
Problems it solves
- find where to store my Python app's config file on each OS
- get the user cache directory in Python cross-platform
- store app data in the right place on Windows, macOS and Linux
Features
- user data, config, cache, state and log directories
- documents, downloads and runtime directories
- macOS, Windows, Linux, Android and iOS
- strings or Path objects
