Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document _path API #41

Closed
adamchainz opened this issue Sep 1, 2021 · 6 comments
Closed

Document _path API #41

adamchainz opened this issue Sep 1, 2021 · 6 comments

Comments

@adamchainz
Copy link

I was looking at the README wondering if you'd add a pathlib API, but then found it was done so in #27. The README could mention this :)

@gaborbernat
Copy link
Member

This will be done part of #28

@adamchainz
Copy link
Author

Great :)

@jaraco
Copy link

jaraco commented Dec 27, 2022

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')

@jaraco
Copy link

jaraco commented Dec 27, 2022

Also, adding something to the README referencing pathlib would have made it easier to discover this project for that purpose.

@gaborbernat
Copy link
Member

@jaraco
Copy link

jaraco commented Dec 27, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants