Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

[ urlimport.py ]
Enables remote module importing through urllib2 and perforce.

author: Jure Vrscaj <jure@codeshift.net>

last contributed versions:
version: 0.72c (myevan <myevan_net@naver.com> fixes and improvements)
version: 0.85a (alex <alexbodn@012.net.il> fixes and improvements)
version: 0.72d (jure <jure@codeshift.net> found a bug and alex fixed it).
homepage: http://urlimport.codeshift.net
license: MIT


Usage:

import sys, urlimport
urlimport.config(**{
'ssl_key.https://your.url':'key for this url'
'ssl_cert.https://your.url':'cert for this url',
'opener.https://your.url':'opener for this url',
'cache_time.http://your.url':'timedelta to keep files in cache for this url',
'no_cache.url':True, # don't cache modules from this url
'user_agent.url':'user agent header for this url',
'ssl_key.host':'key for this host'
'ssl_cert.host':'cert for this host',
'opener.host':'opener for this host',
'cache_time.host':'timedelta to keep files in cache for this host',
'no_cache.host':True, # don't cache modules from this host
'user_agent.host':'user agent header for this host',
'ssl_key':'key for unspecified urls',
'ssl_cert':'cert for unspecified urls',
'opener':'opener for unspecified urls',
'no_cache':'True, #don't cache modules for unspecified urls
'user_agent':'user agent header for unspecified urls',
'cache_time':'timedelta to keep files in cache for unspecified urls',
#if cache_time is missing, keep forever, but check last_modified and etag
'cache_dir':'root of the cache dir', # if missing, a temp dir will be created,
# if empty, no cache will be used
'py_version_string': '$PYTHON_VERSION', # string in path to be replaced by
# $major.$minor
'debug': int(level of output text. see debug() function)
})
# note: if you supply your own opener, i'd recommand inheriting/implementing the
# status handling features from class DefaultErrorHandler below.
sys.path.insert(0, "http://your.url") #this may already be there, like setting
#PYTHONPATH
#but there is a danger default __import__
#would try it before
expect to have access to your modules at http://your.url

TODO:
- check what's mpath all about.

TODO later:
- python 3.1 support. preliminary work done
- url import of zipped modules
- support of other urls, like ssh, svn, hg, bzr, cvs etc.
- reload c extensions. well, they don't allways reload in local import either,
but my module does reload locally, so why not remotely?
introspection will help.
- swithch the usage of debug with some logging, and do some cleanup of the
calls.

Metadata

Release files for urlimport 0.85b-dev

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for urlimport 0.85b-dev
File Size Uploaded Provenance
urlimport-0.85b-dev.tar.gz 15.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for urlimport 0.85b-dev
File Interpreter ABI Platform
urlimport-0.85b_dev-py2.5.egg Legacy Egg format - - Details

Total release size: 34.4 kB

Release files / urlimport-0.85b-dev.tar.gz

Download URL urlimport-0.85b-dev.tar.gz
Size 15.5 kB
Tags Source
SHA-256 checksum
How to use checksums
70b0a91413cc319386e6d76a23ff7e0929f31b1aa4accc6f748c64284381df26
BLAKE2b-256 checksum
How to use checksums
ca29c6b88db822b7931d1fe94808a77faa77e9986fa4ccc0b1c2005105d0f4cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / urlimport-0.85b_dev-py2.5.egg

Download URL urlimport-0.85b_dev-py2.5.egg
Size 18.9 kB
Tags Egg
SHA-256 checksum
How to use checksums
4b8b78abc2cb192940612693b3170bf03b93be94d92452602f1a1c1d4c819768
BLAKE2b-256 checksum
How to use checksums
2fe030b0254706d78f64f66dd44ad37b017b96644e6283c5edbbf9b63bbf95d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for urlimport 0.85b-dev

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page