{"id":27005,"library":"fspath","title":"fspath - semantic path names and more","description":"fspath (v20230629) provides semantic path names and file system path utilities for Python. It offers a lightweight, intuitive API for common path manipulations. The project is in maintenance mode with infrequent releases.","status":"active","version":"20230629","language":"python","source_language":"en","source_url":"https://github.com/return42/fspath","tags":["path","filesystem","semantic"],"install":[{"cmd":"pip install fspath","lang":"bash","label":"Install via pip"}],"dependencies":[],"imports":[{"note":"","wrong":"","symbol":"fspath","correct":"import fspath"}],"quickstart":{"code":"import fspath\n\n# Create a path object\np = fspath.frompath('/tmp/example.txt')\nprint(p)  # /tmp/example.txt\n\n# Check properties\nprint(p.exists())\nprint(p.is_file())\n\n# Use semantic methods\nprint(p.ext)  # .txt\nprint(p.stem)  # example\nprint(p.parent)","lang":"python","description":"Basic usage: create fspath objects and access semantic path components."},"warnings":[{"fix":"Always use fspath methods directly; avoid mixing with pathlib unless documented.","message":"fspath is not compatible with pathlib.Path on all operations. Converting between types may lose semantic attributes.","severity":"gotcha","affected_versions":"all"},{"fix":"Prefer pathlib for new projects; use fspath only for backward compatibility.","message":"The library is in maintenance mode with rare updates. New projects should consider using pathlib (Python 3.4+) or pathlib2 for older versions.","severity":"deprecated","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Convert string paths to fspath: p = fspath.frompath('/path/to/file.txt') then use p.ext","cause":"fspath methods and attributes (like .ext) are only available on fspath objects, not plain strings.","error":"AttributeError: 'str' object has no attribute 'ext'"},{"fix":"Run 'pip install fspath' in your virtual environment.","cause":"fspath is not installed or installed in a different environment.","error":"ImportError: No module named 'fspath'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}