thesmuggler


Namethesmuggler JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://github.com/fny/thesmuggler
SummarySidestep import and load Python files as relative paths
upload_time2017-10-15 23:45:22
maintainer
docs_urlNone
authorFaraz Yashar
requires_python
licenseMIT
keywords import modules packages files
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            The Smuggler 🚬
===============

.. image:: https://travis-ci.org/fny/thesmuggler.svg?branch=master
   :target: https://travis-ci.org/fny/thesmuggler
   :alt: Build Status

.. image:: https://badge.fury.io/py/thesmuggler.svg
   :target: https://pypi.python.org/pypi/thesmuggler
   :alt: Smuggler on PyPI

Sidestep :code:`import` and load Python files as relative paths.

Intended for one-off imports (e.g. global configuration). Currently, :code:`thesmuggler` can't import files that import other local packages, but you can :code:`smuggle` files that
have already smuggled other files.

Tested and working on Python 2.7 and up.

Usage
-----

:code:`pip install thesmuggler`, then:

.. code:: python

    from thesmuggler import smuggle

    # À la `import weapons`
    weapons = smuggle('weapons.py')

    # À la `from contraband import drugs, alcohol`
    drugs, alcohol = smuggle('drugs', 'alcohol', source='contraband.py')

    # À la `from contraband import drugs as dope, alcohol as booze`
    dope, booze = smuggle('drugs', 'alcohol', source='contraband.py')



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/fny/thesmuggler",
    "name": "thesmuggler",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "import modules packages files",
    "author": "Faraz Yashar",
    "author_email": "faraz.yashar@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/07/02/01179d6b54d13b6509dd78040d6ee5548dc9e5a86e8704bd7a9f4ab1af02/thesmuggler-1.0.1.tar.gz",
    "platform": "",
    "description": "The Smuggler \ud83d\udeac\n===============\n\n.. image:: https://travis-ci.org/fny/thesmuggler.svg?branch=master\n   :target: https://travis-ci.org/fny/thesmuggler\n   :alt: Build Status\n\n.. image:: https://badge.fury.io/py/thesmuggler.svg\n   :target: https://pypi.python.org/pypi/thesmuggler\n   :alt: Smuggler on PyPI\n\nSidestep :code:`import` and load Python files as relative paths.\n\nIntended for one-off imports (e.g. global configuration). Currently, :code:`thesmuggler` can't import files that import other local packages, but you can :code:`smuggle` files that\nhave already smuggled other files.\n\nTested and working on Python 2.7 and up.\n\nUsage\n-----\n\n:code:`pip install thesmuggler`, then:\n\n.. code:: python\n\n    from thesmuggler import smuggle\n\n    # \u00c0 la `import weapons`\n    weapons = smuggle('weapons.py')\n\n    # \u00c0 la `from contraband import drugs, alcohol`\n    drugs, alcohol = smuggle('drugs', 'alcohol', source='contraband.py')\n\n    # \u00c0 la `from contraband import drugs as dope, alcohol as booze`\n    dope, booze = smuggle('drugs', 'alcohol', source='contraband.py')\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Sidestep import and load Python files as relative paths",
    "version": "1.0.1",
    "project_urls": {
        "Homepage": "https://github.com/fny/thesmuggler"
    },
    "split_keywords": [
        "import",
        "modules",
        "packages",
        "files"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c19741b17caf76c6019479f3dbda3f374eaaa9cc5b2ef0a2158027263146a070",
                "md5": "4bcca56b3c7ee5a367506e133436da37",
                "sha256": "d153131355aa0a53e2e124c40e777413397c7960966b0d006699f66ffb7f90d0"
            },
            "downloads": -1,
            "filename": "thesmuggler-1.0.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4bcca56b3c7ee5a367506e133436da37",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 3892,
            "upload_time": "2017-10-15T23:45:21",
            "upload_time_iso_8601": "2017-10-15T23:45:21.387606Z",
            "url": "https://files.pythonhosted.org/packages/c1/97/41b17caf76c6019479f3dbda3f374eaaa9cc5b2ef0a2158027263146a070/thesmuggler-1.0.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "070201179d6b54d13b6509dd78040d6ee5548dc9e5a86e8704bd7a9f4ab1af02",
                "md5": "9405367db90ec1860189697e33eafc65",
                "sha256": "9c8e6942626dd69cfd6beb6ef577232646a3af21d829f67273cec30d5b15b689"
            },
            "downloads": -1,
            "filename": "thesmuggler-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "9405367db90ec1860189697e33eafc65",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3059,
            "upload_time": "2017-10-15T23:45:22",
            "upload_time_iso_8601": "2017-10-15T23:45:22.825588Z",
            "url": "https://files.pythonhosted.org/packages/07/02/01179d6b54d13b6509dd78040d6ee5548dc9e5a86e8704bd7a9f4ab1af02/thesmuggler-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2017-10-15 23:45:22",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fny",
    "github_project": "thesmuggler",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "tox": true,
    "lcname": "thesmuggler"
}
        
Elapsed time: 0.19570s