A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`.
Project description
platformdirs
A Python package for determining platform-specific directories (e.g. user data, config, cache, logs). Handles the differences between macOS, Windows, Linux/Unix, and Android so you don't have to.
Quick start
from platformdirs import PlatformDirs
dirs = PlatformDirs("MyApp", "MyCompany")
dirs.user_data_dir # e.g. ~/.local/share/MyApp on Linux
dirs.user_config_dir # e.g. ~/.config/MyApp on Linux
dirs.user_cache_dir # e.g. ~/.cache/MyApp on Linux
dirs.user_log_dir # e.g. ~/.local/state/MyApp/log on Linux
Convenience functions are also available:
from platformdirs import user_data_dir, user_config_path
user_data_dir("MyApp", "MyCompany") # returns str
user_config_path("MyApp", "MyCompany") # returns pathlib.Path
Documentation
Full documentation is available at platformdirs.readthedocs.io, including:
- Usage guide -- parameters, examples, and patterns
- API reference -- all functions and classes
- Platform details -- per-platform paths and behavior
Why this fork?
This repository is a friendly fork of the wonderful work started by
ActiveState who created appdirs, this package's ancestor.
Maintaining an open source project is no easy task, particularly from within an organization, and the Python community
is indebted to appdirs (and to Trent Mick and Jeff Rouse in particular) for creating an incredibly useful simple
module, as evidenced by the wide number of users it has attracted over the years.
Nonetheless, given the number of long-standing open issues and pull requests, and no clear path towards ensuring that maintenance of the package would continue or grow, this fork was created.
Contributions are most welcome.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file platformdirs-4.7.0.tar.gz.
File metadata
- Download URL: platformdirs-4.7.0.tar.gz
- Upload date:
- Size: 23.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd1a5f8599c85d49b9ac7d6e450bc2f1aaf4a23f1fe86d09952fe20ad365cf36
|
|
| MD5 |
3808d8286e45848ef5294b6941960605
|
|
| BLAKE2b-256 |
7125ccd8e88fcd16a4eb6343a8b4b9635e6f3928a7ebcd82822a14d20e3ca29f
|
Provenance
The following attestation bundles were made for platformdirs-4.7.0.tar.gz:
Publisher:
release.yaml on tox-dev/platformdirs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
platformdirs-4.7.0.tar.gz -
Subject digest:
fd1a5f8599c85d49b9ac7d6e450bc2f1aaf4a23f1fe86d09952fe20ad365cf36 - Sigstore transparency entry: 946055648
- Sigstore integration time:
-
Permalink:
tox-dev/platformdirs@3bdc4aee74d3fa06a8266f084975a7aed270264d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tox-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@3bdc4aee74d3fa06a8266f084975a7aed270264d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file platformdirs-4.7.0-py3-none-any.whl.
File metadata
- Download URL: platformdirs-4.7.0-py3-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ed8db354e344c5bb6039cd727f096af975194b508e37177719d562b2b540ee6
|
|
| MD5 |
fc69a981072cd7335f0761965991251b
|
|
| BLAKE2b-256 |
cbe31eddccb2c39ecfbe09b3add42a04abcc3fa5b468aa4224998ffb8a7e9c8f
|
Provenance
The following attestation bundles were made for platformdirs-4.7.0-py3-none-any.whl:
Publisher:
release.yaml on tox-dev/platformdirs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
platformdirs-4.7.0-py3-none-any.whl -
Subject digest:
1ed8db354e344c5bb6039cd727f096af975194b508e37177719d562b2b540ee6 - Sigstore transparency entry: 946055654
- Sigstore integration time:
-
Permalink:
tox-dev/platformdirs@3bdc4aee74d3fa06a8266f084975a7aed270264d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tox-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@3bdc4aee74d3fa06a8266f084975a7aed270264d -
Trigger Event:
workflow_dispatch
-
Statement type: