{"id":27503,"library":"Unipath","title":"Unipath","description":"Unipath provides an object-oriented alternative to os/os.path/shutil for Python file system path manipulation, wrapping common operations in a Path class. Current version is 1.1, stable but in maintenance mode with infrequent releases.","status":"maintenance","version":"1.1","language":"python","source_language":"en","source_url":"https://github.com/mikeorr/Unipath","tags":["filesystem","path","object-oriented","os-path"],"install":[{"cmd":"pip install Unipath","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"Direct import from unipath is the correct pattern.","wrong":"from unipath.path import Path","symbol":"Path","correct":"from unipath import Path"},{"note":"","wrong":null,"symbol":"FSPath","correct":"from unipath import FSPath"}],"quickstart":{"code":"from unipath import Path\n\n# Create a Path object\np = Path('/tmp/example.txt')\n# Check existence\nprint(p.exists())  # True if file exists\n# Read content\nif p.exists():\n    print(p.read_file())","lang":"python","description":"Basic usage: create a Path and check existence/read content."},"warnings":[{"fix":"Migrate to pathlib.Path for Python 3.12+ compatibility. Unipath may not receive updates.","message":"Unipath does not work with Python 3.12+ if using any import of 'os.path' functions that have been removed (e.g., os.path.walk). The library itself is compatible with Python up to 3.11. For Python 3.12+, consider using pathlib which is available in the standard library.","severity":"breaking","affected_versions":">=1.1, Python >=3.12"},{"fix":"Use pathlib.Path instead: from pathlib import Path.","message":"Unipath is no longer actively developed. The author recommends using pathlib from the standard library for new projects.","severity":"deprecated","affected_versions":"all"},{"fix":"Use p.child('subdir') instead of p + '/subdir'.","message":"Unipath's Path inherits from str, so string concatenation with '+' may not work as expected. Use .child() method for joining paths.","severity":"gotcha","affected_versions":"all"},{"fix":"Call p.exists(refresh=True) to bypass cache.","message":"The .exists() method caches results; if the file system changes, use .exists(refresh=True) to get current status.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'1.1':27 'altern':8 'class':23 'common':18 'current':24 'file':13 'filesystem':36 'infrequ':34 'mainten':31 'manipul':16 'mode':32 'object':6,39 'object-ori':5,38 'oper':19 'orient':7,40 'os':42 'os-path':41 'os/os.path/shutil':10 'path':15,22,37,43 'provid':3 'python':12 'releas':35 'stabl':28 'system':14 'unipath':1,2 'version':25 'wrap':17","created_at":"2026-05-01T17:46:36.261252+00:00","updated_at":"2026-05-01T17:46:36.261252+00:00","problems":[{"fix":"Use: from unipath import Path","cause":"Incorrect import: 'from unipath import Path' is correct; 'import unipath' does not expose Path directly.","error":"AttributeError: module 'unipath' has no attribute 'Path'"},{"fix":"Use str(p) when passing to functions that expect str or os.PathLike.","cause":"Unipath Path is a subclass of str, but some functions in Python standard library may not accept it directly. Convert to str explicitly.","error":"TypeError: expected str, bytes or os.PathLike object, not Path"},{"fix":"Migrate to pathlib.Path: from pathlib import Path.","cause":"Unipath is deprecated; this warning may be issued in some environments.","error":"DeprecationWarning: unipath.Path is deprecated, use pathlib instead"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/mikeorr/Unipath","docs":null,"changelog":null,"pypi":"https://pypi.org/project/Unipath/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-28","install_tag":null}}