Comments (6)
The term pathlib
doesn't appear anywhere in the docs or the readme. I did search both before commenting. I do see now that the type annotations do indicate -> Path
, but that wasn't nearly enough for me to realize that the functionality existed until I dived in to the code. Now that I realize it exists, it's easy to find, but discoverability could be improved.
from platformdirs.
This will be done part of #28
from platformdirs.
Great :)
from platformdirs.
I recently started adopting app_paths because it promised pathlib support for appdirs. I later learned that platformdirs has superseded appdirs. I searched the readme and docs, but find no examples of getting pathlib objects, so here's one.
~ $ pip-run platformdirs
Python 3.11.1 (main, Dec 23 2022, 09:28:24) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import platformdirs
>>> dirs = platformdirs.AppDirs()
>>> dirs.user_cache_path
PosixPath('/Users/jaraco/Library/Caches')
from platformdirs.
Also, adding something to the README referencing pathlib
would have made it easier to discover this project for that purpose.
from platformdirs.
I mean https://platformdirs.readthedocs.io/en/latest/api.html#platformdirs.user_cache_path ? Our README is not the docs.
from platformdirs.
Related Issues (20)
- getuid is not Linux specific HOT 1
- Testing could fail with pytest-randomly HOT 1
- Windows support link broken HOT 2
- `user_runtime_dir` for root on Unix
- user_runtime_dir for *BSD HOT 3
- Feature: add user_downloads_dir HOT 1
- Feature: user_desktop_dir HOT 2
- Cannot import name '__version__' from 'platformdirs.version' HOT 6
- Unix user_log_dir doesn't create log dir HOT 1
- Optionally redirect `user_*_dir()` calls to `site_*_dir()` for root on Unix HOT 2
- Add `site_state_dir()` counterpart for `user_state_dir()` HOT 1
- Add `site_log_dir()` counterpart for `user_log_dir()`
- pre-commit updates of pyproject.toml:[build-system]:requires HOT 3
- Support Homebrew prefixes
- HOME and StartMenu? HOT 1
- Missing changelog for 4.0 HOT 3
- Feature Request: Be able to create directories HOT 1
- multipath cannot work for path HOT 5
- Adding to stdlib/pathlib? HOT 13
- Paths can be overridden using environment variables on Linux, but not MacOS? HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from platformdirs.