Giter Club home page Giter Club logo

Comments (6)

jaraco avatar jaraco commented on September 24, 2024 1

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.

gaborbernat avatar gaborbernat commented on September 24, 2024

This will be done part of #28

from platformdirs.

adamchainz avatar adamchainz commented on September 24, 2024

Great :)

from platformdirs.

jaraco avatar jaraco commented on September 24, 2024

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.

jaraco avatar jaraco commented on September 24, 2024

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

from platformdirs.

gaborbernat avatar gaborbernat commented on September 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.