whichcraft


Namewhichcraft JSON
Version 0.6.1 PyPI version JSON
download
home_pagehttps://github.com/pydanny/whichcraft
SummaryThis package provides cross-platform cross-python shutil.which functionality.
upload_time2019-09-06 19:19:48
maintainer
docs_urlNone
authorDaniel Roy Greenfeld
requires_python
licenseBSD
keywords whichcraft
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            ===============================
whichcraft
===============================

.. image:: https://badge.fury.io/py/whichcraft.svg
    :target: http://badge.fury.io/py/whichcraft

.. image:: https://travis-ci.org/pydanny/whichcraft.svg?branch=master
        :target: https://travis-ci.org/pydanny/whichcraft

.. image:: https://codecov.io/gh/pydanny/whichcraft/branch/master/graph/badge.svg
        :target: http://codecov.io/github/pydanny/whichcraft?branch=master

.. image:: https://ci.appveyor.com/api/projects/status/v9coijayykhkeu4d?svg=true
        :target: https://ci.appveyor.com/project/pydanny/whichcraft

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
    :target: https://github.com/ambv/black
    :alt: Code style: black

::

    That code in my care
    That sly command-line stare
    That strips my operating system bare
    It's whichcraft

This package provides cross-platform cross-python ``shutil.which`` functionality.

Usage
=====

On Linux, Mac, Windows for Python 2.7 or any of the maintained 3s:

.. code-block:: python

    >>> from whichcraft import which
    >>> which('date')
    '/bin/date'
    >>> which('calendar')
    '/bin/calendar'
    >>> which('cookiecutter')
    '/Users/pydanny/.envs/fun/bin/cookiecutter'
    >>> which('a-made-up-name') is None
    True


Notes
=====

This is a shim of the ``shutil.which`` function that's designed to work across
multiple versions of Python and inside of windows. The code for Python 2.x is
based on Python 3 code that I extracted from source. I originally did this for
Cookiecutter_ but pulled it out in order to reduce line count for that project.

Edgecase: Date function works perfectly on mac os and linux system, hence returns string.
But is an in-built function in windows hence returns none as value when called in
windows.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter

Sponsor
=======

This work is sponsored by BriteCore, which does awesome things with Python, Django, JavaScript, and AWS. `Apply for a job if you're interested!`_

.. image:: https://avatars1.githubusercontent.com/u/967173?s=200&v=4
    :target: http://engineering-application.britecore.com/
    :alt: Code style: black

.. _BriteCore: https://www.britecore.com/
.. _`Apply for a job if you're interested!`: http://engineering-application.britecore.com/


History
=========

0.6.1 (2019-09-06)
---------------------

* Fix versioning issue

0.6.0 (2019-07-12)
---------------------

* Remove lingering unicode issues
* Add BriteCore as a sponsor

0.5.3 (2018-10-10)
---------------------

* Add BriteCore as a sponsor

0.5.2 (2018-10-09)
---------------------

* Remove any mention of 3.2 and 3.3

0.5.1 (2018-10-09)
---------------------

* Fix setup.py so it works with older Python

0.5.0 (2018-10-09)
---------------------

* Add 3.7 support thanks to @rooterkyberian
* Remove any mention of 2.6

0.4.2 (2018-04-16)
---------------------

* Use black for code formatting
* Move status to production/stable
* Drop Python 2.6 and 3.3 support

0.4.1 (2017-04-25)
---------------------

* Added tests to support Python 3.6

0.3.1 (2016-05-10)
---------------------

* Now testing for `which` directly, so we can support versions of Python 3 before 3.3 (@nickcoghlan)

0.3.1 (2016-04-24)
---------------------

* Correcting version in whichcraft.py

0.3.0 (2016-04-24)
---------------------

* Include tests in release source tarball (@Edwardbetts)

0.2.0 (2016-04-23)
---------------------

* Python 3.5 compatability

0.1.1 (2015-09-09)
---------------------

* Added lyrics

0.1.0 (2015-09-09)
---------------------

* First release on PyPI.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pydanny/whichcraft",
    "name": "whichcraft",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "whichcraft",
    "author": "Daniel Roy Greenfeld",
    "author_email": "pydanny@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/67/f5/546c1494f1f8f004de512b5c9c89a8b7afb1d030c9307dd65df48e5772a3/whichcraft-0.6.1.tar.gz",
    "platform": "",
    "description": "===============================\nwhichcraft\n===============================\n\n.. image:: https://badge.fury.io/py/whichcraft.svg\n    :target: http://badge.fury.io/py/whichcraft\n\n.. image:: https://travis-ci.org/pydanny/whichcraft.svg?branch=master\n        :target: https://travis-ci.org/pydanny/whichcraft\n\n.. image:: https://codecov.io/gh/pydanny/whichcraft/branch/master/graph/badge.svg\n        :target: http://codecov.io/github/pydanny/whichcraft?branch=master\n\n.. image:: https://ci.appveyor.com/api/projects/status/v9coijayykhkeu4d?svg=true\n        :target: https://ci.appveyor.com/project/pydanny/whichcraft\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n    :target: https://github.com/ambv/black\n    :alt: Code style: black\n\n::\n\n    That code in my care\n    That sly command-line stare\n    That strips my operating system bare\n    It's whichcraft\n\nThis package provides cross-platform cross-python ``shutil.which`` functionality.\n\nUsage\n=====\n\nOn Linux, Mac, Windows for Python 2.7 or any of the maintained 3s:\n\n.. code-block:: python\n\n    >>> from whichcraft import which\n    >>> which('date')\n    '/bin/date'\n    >>> which('calendar')\n    '/bin/calendar'\n    >>> which('cookiecutter')\n    '/Users/pydanny/.envs/fun/bin/cookiecutter'\n    >>> which('a-made-up-name') is None\n    True\n\n\nNotes\n=====\n\nThis is a shim of the ``shutil.which`` function that's designed to work across\nmultiple versions of Python and inside of windows. The code for Python 2.x is\nbased on Python 3 code that I extracted from source. I originally did this for\nCookiecutter_ but pulled it out in order to reduce line count for that project.\n\nEdgecase: Date function works perfectly on mac os and linux system, hence returns string.\nBut is an in-built function in windows hence returns none as value when called in\nwindows.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n\nSponsor\n=======\n\nThis work is sponsored by BriteCore, which does awesome things with Python, Django, JavaScript, and AWS. `Apply for a job if you're interested!`_\n\n.. image:: https://avatars1.githubusercontent.com/u/967173?s=200&v=4\n    :target: http://engineering-application.britecore.com/\n    :alt: Code style: black\n\n.. _BriteCore: https://www.britecore.com/\n.. _`Apply for a job if you're interested!`: http://engineering-application.britecore.com/\n\n\nHistory\n=========\n\n0.6.1 (2019-09-06)\n---------------------\n\n* Fix versioning issue\n\n0.6.0 (2019-07-12)\n---------------------\n\n* Remove lingering unicode issues\n* Add BriteCore as a sponsor\n\n0.5.3 (2018-10-10)\n---------------------\n\n* Add BriteCore as a sponsor\n\n0.5.2 (2018-10-09)\n---------------------\n\n* Remove any mention of 3.2 and 3.3\n\n0.5.1 (2018-10-09)\n---------------------\n\n* Fix setup.py so it works with older Python\n\n0.5.0 (2018-10-09)\n---------------------\n\n* Add 3.7 support thanks to @rooterkyberian\n* Remove any mention of 2.6\n\n0.4.2 (2018-04-16)\n---------------------\n\n* Use black for code formatting\n* Move status to production/stable\n* Drop Python 2.6 and 3.3 support\n\n0.4.1 (2017-04-25)\n---------------------\n\n* Added tests to support Python 3.6\n\n0.3.1 (2016-05-10)\n---------------------\n\n* Now testing for `which` directly, so we can support versions of Python 3 before 3.3 (@nickcoghlan)\n\n0.3.1 (2016-04-24)\n---------------------\n\n* Correcting version in whichcraft.py\n\n0.3.0 (2016-04-24)\n---------------------\n\n* Include tests in release source tarball (@Edwardbetts)\n\n0.2.0 (2016-04-23)\n---------------------\n\n* Python 3.5 compatability\n\n0.1.1 (2015-09-09)\n---------------------\n\n* Added lyrics\n\n0.1.0 (2015-09-09)\n---------------------\n\n* First release on PyPI.\n\n\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "This package provides cross-platform cross-python shutil.which functionality.",
    "version": "0.6.1",
    "split_keywords": [
        "whichcraft"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "d991180616793c531bdb16c6ae4b39c5",
                "sha256": "deda9266fbb22b8c64fd3ee45c050d61139cd87419765f588e37c8d23e236dd9"
            },
            "downloads": -1,
            "filename": "whichcraft-0.6.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d991180616793c531bdb16c6ae4b39c5",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 5223,
            "upload_time": "2019-09-06T19:19:44",
            "upload_time_iso_8601": "2019-09-06T19:19:44.957591Z",
            "url": "https://files.pythonhosted.org/packages/b5/a2/81887a0dae2e4d2adc70d9a3557fdda969f863ced51cd3c47b587d25bce5/whichcraft-0.6.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "5924f9a56203badb3b7dd5ce3b823069",
                "sha256": "acdbb91b63d6a15efbd6430d1d7b2d36e44a71697e93e19b7ded477afd9fce87"
            },
            "downloads": -1,
            "filename": "whichcraft-0.6.1.tar.gz",
            "has_sig": false,
            "md5_digest": "5924f9a56203badb3b7dd5ce3b823069",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6909,
            "upload_time": "2019-09-06T19:19:48",
            "upload_time_iso_8601": "2019-09-06T19:19:48.138349Z",
            "url": "https://files.pythonhosted.org/packages/67/f5/546c1494f1f8f004de512b5c9c89a8b7afb1d030c9307dd65df48e5772a3/whichcraft-0.6.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2019-09-06 19:19:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "pydanny",
    "github_project": "whichcraft",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "appveyor": true,
    "tox": true,
    "lcname": "whichcraft"
}
        
Elapsed time: 0.01441s