{ "info": { "author": "Todd Francis DeLuca", "author_email": "todddeluca@yahoo.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3" ], "description": "# python-findup\n\n\n## Introduction\n\nFind the first path matching a given pattern in the current working\ndirectory (or a given directory) or the nearest ancestor directory. This\nproject is (roughly) a python version of\n[node-findup-sync](https://github.com/cowboy/node-findup-sync).\n\nWhy? Applications, such as git, often use project configuration files found in\nthe current directory or an ancestor directory. The `findup` modules allows an\napplication author to easily find these files or directories.\n\n\n## Installation\n\nThe best way to install is probably to use pip:\n\n pip install findup\n\nOr you can clone and install findup from github:\n\n git clone https://github.com/todddeluca/python-findup.git\n cd python-findup\n python setup.py install\n\n## Usage\n\n`pattern` is combined with the current working directory or an ancestor\ndirectory and passed to `glob.glob` to see if the pattern matches. If it does,\nthe first match is returned. Pattern can contain some shell wildcard\ncharacters, like `?` and `*`. See the python `glob` module for more details.\n\n findup.glob(pattern)\n\nTo find the root dir of a git repository, when the current working directory is\nsomewhere within the repository:\n\n os.path.dirname(findup.glob('.git'))\n\nOr more robustly, handling the case where the cwd is not within a git\nrepository:\n\n path = findup.glob('.git')\n git_root = None if path is None or os.path.dirname(path)", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/todddeluca/python-findup", "keywords": "python findup glob cwd directory pattern", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "findup", "package_url": "https://pypi.org/project/findup/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/findup/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/todddeluca/python-findup" }, "release_url": "https://pypi.org/project/findup/0.3.0/", "requires_dist": null, "requires_python": null, "summary": "Find the first file matching a given pattern in the current directory or the nearest ancestor directory.", "version": "0.3.0" }, "last_serial": 1248573, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f6e4dd13ac84b2ffa4122c8257925b59", "sha256": "6e97dc6aa64940a6560007018e5896cedc781fe4dd932a7a5d401469923cd54b" }, "downloads": -1, "filename": "findup-0.1.0.tar.gz", "has_sig": false, "md5_digest": "f6e4dd13ac84b2ffa4122c8257925b59", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2167, "upload_time": "2013-07-16T18:55:18", "url": "https://files.pythonhosted.org/packages/09/8b/4c3a09ed519bd9de865e7b309114fff6f52d52afdfdd3f72f3382a1a3854/findup-0.1.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "4e988ab3882e03803542e8d93f37b43c", "sha256": "852a4b8d5697eeabeb16dfb886178cf88b6f093d1b4f934d450a8226487fc018" }, "downloads": -1, "filename": "findup-0.3.0.tar.gz", "has_sig": false, "md5_digest": "4e988ab3882e03803542e8d93f37b43c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3262, "upload_time": "2014-10-05T17:29:30", "url": "https://files.pythonhosted.org/packages/9a/02/dcb111bd9cf9a316a24119b18f9e462cbf7484988c35a45fca2b8e50d781/findup-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4e988ab3882e03803542e8d93f37b43c", "sha256": "852a4b8d5697eeabeb16dfb886178cf88b6f093d1b4f934d450a8226487fc018" }, "downloads": -1, "filename": "findup-0.3.0.tar.gz", "has_sig": false, "md5_digest": "4e988ab3882e03803542e8d93f37b43c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3262, "upload_time": "2014-10-05T17:29:30", "url": "https://files.pythonhosted.org/packages/9a/02/dcb111bd9cf9a316a24119b18f9e462cbf7484988c35a45fca2b8e50d781/findup-0.3.0.tar.gz" } ] }