Metadata-Version: 1.1
Name: importable
Version: 0.1.0
Summary: Allows to import zip-compressed Python package by URL.
Home-page: https://github.com/malexer/importable
Author: Alex (Oleksii) Markov
Author-email: alex@markovs.me
License: MIT
Description: importable
        ==========
        
        Allows to import zip-compressed Python package by URL.
        
        Download remote zip-compressed Python package, unzip and add to Python
        path.
        
        All temp files will be removed on exit unless Python process was
        terminated.
        
        Note: ``import`` should be called separatelly after calling
        ``importable``. All we do here - just adding package to local python path.
        
        
        Install
        -------
        
        Using pip::
        
            $ pip install importable
        
        
        Usage
        -----
        
        Make remote package importable, then import it and use:
        
        .. code-block:: python
        
            from importable import importable
        
        
            # add contents of "<filename>.zip" to python path
            importable('http://<url>/<filename>.zip')
        
            # now you can import your module
            import <module_name>
        
        
        Example
        -------
        
        Assuming that you have local nginx serving ``/var/www/html/`` on port 80.
        
        .. code-block:: shell
        
            $ mkdir mymodule
            $ echo "my_var = 'I want to import this one!'" > mymodule/__init__.py
            $ zip -r mymodule.zip mymodule
            $ mv mymodule.zip /var/www/html
        
        Then execute the python code:
        
        .. code-block:: python
        
            >>> import mymodule
            Traceback (most recent call last):
              File "<stdin>", line 1, in <module>
            ImportError: No module named 'mymodule'
            >>> from importable import importable
            >>> importable('http://localhost/mymodule.zip')
            >>> import mymodule
            >>> print(mymodule.my_var)
            I want to import this one!
        
        
        TODO
        ----
        
        - add support for HDFS locations
        - add support for zip files of the repo generated by GitHub (extra
          directory level)
        
Keywords: import url importable python_path
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
