{ "info": { "author": "Sebastian Bank", "author_email": "sebastian.bank@uni-leipzig.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "Current\r\n=======\r\n\r\n|PyPI version| |License| |Supported Python| |Format|\r\n\r\nGet the path of a file relative to the current module. Import a Python module\r\nrelative to the current module. Temporarily change ``sys.path`` for imports.\r\nGet the path of a file relative to the module of the current caller.\r\n\r\n\r\nLinks\r\n-----\r\n\r\n- GitHub: https://github.com/xflr6/current\r\n- PyPI: https://pypi.org/project/current/\r\n- Issue Tracker: https://github.com/xflr6/current/issues\r\n- Download: https://pypi.org/project/current/#files\r\n\r\n\r\nInstallation\r\n------------\r\n\r\nThis package runs under Python 2.7 and 3.5+, use pip_ to install:\r\n\r\n.. code:: bash\r\n\r\n $ pip install current\r\n\r\n\r\nUsage\r\n-----\r\n\r\nGet paths relative to the current module:\r\n\r\n.. code:: python\r\n\r\n >>> import current\r\n\r\n >>> here = current.current_path()\r\n >>> parent = current.current_path('..')\r\n >>> bruces = current.current_path('..', 'australia', 'bruces', 'bruces.ini')\r\n\r\n\r\nTemporarily add the parent directory to ``sys.path``:\r\n\r\n.. code:: python\r\n\r\n >>> with current.inserted_path()\r\n ... import australia\r\n\r\n\r\nGet paths relative to the module of the callers of the current code:\r\n\r\n.. code:: python\r\n\r\n >>> caller = current.caller_path()\r\n >>> callercaller = current.caller_path(steps=2)\r\n\r\n\r\nPotential issues\r\n----------------\r\n\r\nThis package uses ``sys._getframe`` (which is almost the same as\r\n``inspect.currentframe``, see_ docs_). Under IronPython this might require\r\nenabling the ``FullFrames`` option of the interpreter.\r\n\r\n\r\nLicense\r\n-------\r\n\r\n`CC0 1.0 Public Domain Dedication`_\r\n\r\n\r\nChangelog\r\n---------\r\n\r\nVersion 0.3.5: Drop Python 3.4 support.\r\n\r\nVersion 0.3.4: Tag Python 3.7 support.\r\n\r\nVersion 0.3.3: Drop Python 3.3 support. Add python_requires.\r\n\r\nVersion 0.3.2: Port tests from nose/unittest to pytest. Update meta data, tag Python 3.5/3.6 support.\r\n\r\nVersion 0.3.1: Added wheel.\r\n\r\nVersion 0.3: Added Python 3.3+ support.\r\n\r\nVersion 0.2.1: Fixed caller_path. Documented sys._getframe dependency.\r\n\r\nVersion 0.2: Added caller_path.\r\n\r\nVersion 0.1: First public release.\r\n\r\n\r\n.. _pip: https://pip.readthedocs.io\r\n\r\n.. _see: https://docs.python.org/2/library/sys.html#sys._getframe\r\n.. _docs: https://docs.python.org/2/library/inspect.html#inspect.currentframe\r\n\r\n.. _CC0 1.0 Public Domain Dedication: https://creativecommons.org/publicdomain/zero/1.0/\r\n\r\n.. |PyPI version| image:: https://img.shields.io/pypi/v/current.svg\r\n :target: https://pypi.org/project/current/\r\n :alt: Latest PyPI Version\r\n.. |License| image:: https://img.shields.io/pypi/l/current.svg\r\n :target: https://pypi.org/project/current/\r\n :alt: License\r\n.. |Supported Python| image:: https://img.shields.io/pypi/pyversions/current.svg\r\n :target: https://pypi.org/project/current/\r\n :alt: Supported Python Versions\r\n.. |Format| image:: https://img.shields.io/pypi/format/current.svg\r\n :target: https://pypi.org/project/current/\r\n :alt: Format\r\n\r\n\r\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/xflr6/current", "keywords": "sys.path import temporary inspect caller", "license": "CC0", "maintainer": "", "maintainer_email": "", "name": "current", "package_url": "https://pypi.org/project/current/", "platform": "any", "project_url": "https://pypi.org/project/current/", "project_urls": { "Homepage": "https://github.com/xflr6/current" }, "release_url": "https://pypi.org/project/current/0.3.5/", "requires_dist": [ "flake8 ; extra == 'dev'", "pep8-naming ; extra == 'dev'", "wheel ; extra == 'dev'", "twine ; extra == 'dev'", "pytest (!=3.10.0,>=3.4) ; extra == 'test'", "pytest-cov ; extra == 'test'" ], "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", "summary": "Current module relative paths and imports", "version": "0.3.5" }, "last_serial": 5345785, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "c34d5e8bc41dc4759b2b7ebd22062269", "sha256": "2e48f4732f5dd54137472576884c427065996fdc9f549457173ee87f70b771cf" }, "downloads": -1, "filename": "current-0.1.zip", "has_sig": false, "md5_digest": "c34d5e8bc41dc4759b2b7ebd22062269", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4593, "upload_time": "2014-01-15T13:07:19", "url": "https://files.pythonhosted.org/packages/54/a1/ac63c17754a7b0d4b2bc9c1b0c427413ca9e231826c43f7b448ad2c575a6/current-0.1.zip" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "56d0f0df6c6ebc79a150fd49173a46d4", "sha256": "8cb85b94e8887e538b7d90368e0e434fc861afe4e8ca240611bd8cb23a6a67f0" }, "downloads": -1, "filename": "current-0.2.zip", "has_sig": false, "md5_digest": "56d0f0df6c6ebc79a150fd49173a46d4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4967, "upload_time": "2014-01-22T19:52:31", "url": "https://files.pythonhosted.org/packages/f7/52/5f014e1ecc9634bd105249d5b08fc1ca0ad437666b5d16cd01c26be01309/current-0.2.zip" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "f222204782e0c7b85ef9041c947385ea", "sha256": "3eb2baf81eed5f4510c73618dcb0b0c0f6685e401389ef81db28b96ad4b448ac" }, "downloads": -1, "filename": "current-0.2.1.zip", "has_sig": false, "md5_digest": "f222204782e0c7b85ef9041c947385ea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7289, "upload_time": "2014-05-01T16:51:16", "url": "https://files.pythonhosted.org/packages/b7/df/85706bec860e0ef5bf7b64180e9f1577d04e27d9f747bf9ba0ba8474bb31/current-0.2.1.zip" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "6cce3eb6f69a6fd1b8a017a50104e0f1", "sha256": "1e1a88a74a9e90fc648a7284b4328003954b369b918886fe7070af34ef1567de" }, "downloads": -1, "filename": "current-0.3.zip", "has_sig": false, "md5_digest": "6cce3eb6f69a6fd1b8a017a50104e0f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7658, "upload_time": "2014-05-02T10:21:25", "url": "https://files.pythonhosted.org/packages/4c/1c/1bbb972c39770732d52678c2c85c97f84ffdfa695895af50f777621dc33c/current-0.3.zip" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "2324f9c1c2f2ffc4682267aa057af414", "sha256": "5b1e2ddabd3de44be215b66abc840061787d9e82a6f1d332e3cf23786652f12a" }, "downloads": -1, "filename": "current-0.3.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2324f9c1c2f2ffc4682267aa057af414", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 4613, "upload_time": "2014-05-11T15:57:15", "url": "https://files.pythonhosted.org/packages/79/c3/40a7568d3ab53b70d40b5a169b425932b8c84dd6244d5ede629a329fa322/current-0.3.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6378769c64d76831e72a6930b47ced27", "sha256": "207613dc19a6cc8e1a756f26e416733c8f82a70e4ae81103d22f483aae6492a8" }, "downloads": -1, "filename": "current-0.3.1.zip", "has_sig": false, "md5_digest": "6378769c64d76831e72a6930b47ced27", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7716, "upload_time": "2014-05-11T15:57:13", "url": "https://files.pythonhosted.org/packages/7f/c8/bccb923ccbcde64527baa29cfc4c6d1235970e4fd01afbd5dde1bf01b7b5/current-0.3.1.zip" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "ff0d96da41e4678bbb653fe0a6bfedc9", "sha256": "bfe0b41fa617ef9f24a2bc976b66d198a55524f193c7f565c0cf1c3b8c8077f5" }, "downloads": -1, "filename": "current-0.3.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ff0d96da41e4678bbb653fe0a6bfedc9", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 4793, "upload_time": "2017-05-14T11:47:17", "url": "https://files.pythonhosted.org/packages/26/6d/ea4dde1509c86db26f8d0f50c26f7485094bb3ef9f470928754805ca9981/current-0.3.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b8beda4c2709fadcc1b9f28fb52d2f04", "sha256": "254e5e95a9cf2029b3543bc076b61dc80a5eb6fcc06874a8651d64de4fce061f" }, "downloads": -1, "filename": "current-0.3.2.zip", "has_sig": false, "md5_digest": "b8beda4c2709fadcc1b9f28fb52d2f04", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8293, "upload_time": "2017-05-14T11:47:15", "url": "https://files.pythonhosted.org/packages/35/a4/415b5c12e2ad2cdcd5a9194e2ec1839d42b0bb56de957bed726cd7070683/current-0.3.2.zip" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "8e5d2ed22b1e15953499a0698d9aa096", "sha256": "a6da96f8f206314c0be90ed911042cf115a8d1bb42e4b400260f7ed1799b9711" }, "downloads": -1, "filename": "current-0.3.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8e5d2ed22b1e15953499a0698d9aa096", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", "size": 2995, "upload_time": "2018-05-23T17:59:54", "url": "https://files.pythonhosted.org/packages/ec/f6/3daf78303d6ca031b71e820bfff10da2ffeff4caa7b9278a558ad702e60b/current-0.3.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2ce33789fc49577054b1012ce76718f8", "sha256": "538c5d099e46199175ec40984c13708fe28ddf1da5c7daca643c9964f79a951b" }, "downloads": -1, "filename": "current-0.3.3.zip", "has_sig": false, "md5_digest": "2ce33789fc49577054b1012ce76718f8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", "size": 8695, "upload_time": "2018-05-23T17:59:55", "url": "https://files.pythonhosted.org/packages/37/3e/206c0be96978d1103e28811d7f318eb70099f7329abf4438de22e4977692/current-0.3.3.zip" } ], "0.3.4": [ { "comment_text": "", "digests": { "md5": "3e696c3bf5c09ee65da64989ee1c6bfd", "sha256": "ad1e07be954de0ec513b5df06f474bd317305578c95e587ee20964db9cec3ea4" }, "downloads": -1, "filename": "current-0.3.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3e696c3bf5c09ee65da64989ee1c6bfd", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", "size": 3001, "upload_time": "2018-10-28T12:34:32", "url": "https://files.pythonhosted.org/packages/c7/82/675e94ab030f89404bfc4f9e7b27171261bcf3a369a078f375d3cca15ed5/current-0.3.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "741224ea0d5e5e434409b0f94b4a37a0", "sha256": "64efe3a433f77e435ca409c7dfc120a70fbcaf6c627ef6a2bebf78bf3caeae8c" }, "downloads": -1, "filename": "current-0.3.4.zip", "has_sig": false, "md5_digest": "741224ea0d5e5e434409b0f94b4a37a0", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", "size": 8729, "upload_time": "2018-10-28T12:34:34", "url": "https://files.pythonhosted.org/packages/18/db/1dc39f80d1bf99d43bc13a491dccebe093e8698776eb61bb3b6faf128e48/current-0.3.4.zip" } ], "0.3.5": [ { "comment_text": "", "digests": { "md5": "7295696a545fac6928c7f0c4135b3d7f", "sha256": "78558609f657abc43075f21bf9c001f5ae96977eae4b884c63bd2a3f62017868" }, "downloads": -1, "filename": "current-0.3.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7295696a545fac6928c7f0c4135b3d7f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", "size": 3012, "upload_time": "2019-06-01T08:53:32", "url": "https://files.pythonhosted.org/packages/b7/dd/dd330365934062dea95d9a0ac1ddb97f82c0319b2a55254b9590fd3a518c/current-0.3.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0f7c0c8dfe497c0718af7c451fe6daf8", "sha256": "f368b2ed59271132f69ed5ca8490118ce891b722e85bec56e2aacf832d257fcd" }, "downloads": -1, "filename": "current-0.3.5.zip", "has_sig": false, "md5_digest": "0f7c0c8dfe497c0718af7c451fe6daf8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", "size": 9378, "upload_time": "2019-06-01T08:53:34", "url": "https://files.pythonhosted.org/packages/b0/a9/7349de4cdfe8f3f4ff5aeb52ba4ee28354c7837971db05b9b4e492dd1370/current-0.3.5.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7295696a545fac6928c7f0c4135b3d7f", "sha256": "78558609f657abc43075f21bf9c001f5ae96977eae4b884c63bd2a3f62017868" }, "downloads": -1, "filename": "current-0.3.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7295696a545fac6928c7f0c4135b3d7f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", "size": 3012, "upload_time": "2019-06-01T08:53:32", "url": "https://files.pythonhosted.org/packages/b7/dd/dd330365934062dea95d9a0ac1ddb97f82c0319b2a55254b9590fd3a518c/current-0.3.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0f7c0c8dfe497c0718af7c451fe6daf8", "sha256": "f368b2ed59271132f69ed5ca8490118ce891b722e85bec56e2aacf832d257fcd" }, "downloads": -1, "filename": "current-0.3.5.zip", "has_sig": false, "md5_digest": "0f7c0c8dfe497c0718af7c451fe6daf8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", "size": 9378, "upload_time": "2019-06-01T08:53:34", "url": "https://files.pythonhosted.org/packages/b0/a9/7349de4cdfe8f3f4ff5aeb52ba4ee28354c7837971db05b9b4e492dd1370/current-0.3.5.zip" } ] }