GitHub Hot Board

GitHub Hot Board · 저장소 아카이브

tox-dev/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. (소개는 저장소 자체 문서에서 왔습니다.)

데이터 기준 October 25tox-dev

최고 순위

#28

라이브 마일스톤 · 돌파 중계

998

누적 스타

115

포크 수

2

최근 30일 기록 일수

등재 2일 · 최근 30일 +1 스타 · 일평균 +1연속 2일 등재

프로젝트 상태라이선스: MIT최근 push: October 25열린 이슈(PR 포함): 11

2026-10-25부터 수집. 미확인 = 아직 미수집

README에 뱃지를 붙여보세요 · tox-dev/platformdirs[![README에 뱃지를 붙여보세요](https://git.vaiox.xyz/api/badge/tox-dev/platformdirs.svg)](https://git.vaiox.xyz/ko/repo/tox-dev/platformdirs)
<a href="https://git.vaiox.xyz/ko/repo/tox-dev/platformdirs"><img src="https://git.vaiox.xyz/api/badge/tox-dev/platformdirs.svg" alt="README에 뱃지를 붙여보세요" height="20"></a>

프로젝트 문서

platformdirs

PyPI version Python versions CI Downloads

A Python package for determining platform-specific directories (e.g. user data, config, cache, logs). Handles the differences between macOS, Windows, Linux/Unix, Android, and iOS so you don't have to.

Quick start

from platformdirs import PlatformDirs

dirs = PlatformDirs("MyApp", "MyCompany")
dirs.user_data_dir  # ~/.local/share/MyApp (Linux)
dirs.user_config_dir  # ~/.config/MyApp (Linux)
dirs.user_cache_dir  # ~/.cache/MyApp (Linux)
dirs.user_state_dir  # ~/.local/state/MyApp (Linux)
dirs.user_log_dir  # ~/.local/state/MyApp/log (Linux)
dirs.user_documents_dir  # ~/Documents
dirs.user_downloads_dir  # ~/Downloads
dirs.user_runtime_dir  # /run/user/<uid>/MyApp (Linux)

For Path objects instead of strings:

from platformdirs import PlatformDirs

dirs = PlatformDirs("MyApp", "MyCompany")
dirs.user_data_path  # pathlib.Path('~/.local/share/MyApp')
dirs.user_config_path  # pathlib.Path('~/.config/MyApp')

Convenience functions for quick access:

from platformdirs import user_data_dir, user_config_path

user_data_dir("MyApp", "MyCompany")  # returns str
user_config_path("MyApp", "MyCompany")  # returns pathlib.Path

Directory types

Application directories — scoped to your app name and version:

  • Data: Persistent application data (user_data_dir, site_data_dir)
  • Config: Configuration files and settings (user_config_dir, site_config_dir)
  • Preference: User preferences, distinct from config on macOS (user_preference_dir)
  • Cache: Cached data that can be regenerated (user_cache_dir, site_cache_dir)
  • State: Non-essential runtime state like window positions (user_state_dir, site_state_dir)
  • Logs: Log files (user_log_dir, site_log_dir)
  • Runtime: Runtime files like sockets and PIDs (user_runtime_dir, site_runtime_dir)

App dirs have both user_* (per-user, writable) and site_* (system-wide, read-only) variants where applicable.

User media directories — standard user-facing folders, not scoped to app name:

  • Documents (user_documents_dir), Downloads (user_downloads_dir)
  • Pictures (user_pictures_dir), Videos (user_videos_dir), Music (user_music_dir)
  • Desktop (user_desktop_dir), Projects (user_projects_dir)
  • Public share (user_publicshare_dir), Templates (user_templates_dir)
  • Fonts (user_fonts_dir) — user-writable font installation directory
  • Executable (user_bin_dir, site_bin_dir), Applications (user_applications_dir, site_applications_dir)

Documentation

Full documentation is available at platformdirs.readthedocs.io:

Contributions are welcome! See CONTRIBUTING.md for details.

현재 순위

  • 28

    라이브 마일스톤 · 돌파 중계

    998 스타 · 115 fork · 다음 라인까지

    마일스톤 →

최근 30일 추이

누적 스타 추이

순위 추이

같은 보드의 이웃 랭커 · 마일스톤

비슷한 프로젝트 · 공유 토픽

← 랭킹으로