Constructs a request to the PyPI server and returns a yarg.package.Package.
Parameters: |
|
---|
A PyPI package.
Parameters: | pypi_dict – A dictionary retrieved from the PyPI server. |
---|
>>> package = yarg.get('yarg')
>>> package.url
u'https://pypi.python.org/pypi/yarg'
>>> package = yarg.get('yarg')
>>> package.description
u'A super long description, usually uploaded from the README'
>>> package = yarg.get('yarg')
>>> package.bugtracker
u'https://github.com/kura/yarg/issues'
>>> package = yarg.get('yarg')
>>> package.docs
u'https://yarg.readthedocs.org/en/latest'
>>> package = yarg.get('yarg')
>>> package.author
Author(name=u'Kura', email=u'kura@kura.io')
>>> package = yarg.get('yarg')
>>> package.maintainer
Maintainer(name=u'Kura', email=u'kura@kura.io')
>>> package = yarg.get('yarg')
>>> package.license_from_classifiers
u'MIT License'
>>> package = yarg.get('yarg')
>>> package.downloads
Downloads(day=50100, week=367941, month=1601938) # I wish
>>> package = yarg.get('yarg')
>>> package.classifiers
[u'License :: OSI Approved :: MIT License',
u'Programming Language :: Python :: 2.7',
u'Programming Language :: Python :: 3.4']
Returns a list of Python version strings that the package has listed in yarg.Release.classifiers.
>>> package = yarg.get('yarg')
>>> package.python_versions
[u'2.6', u'2.7', u'3.3', u'3.4']
Returns a list of Python implementation strings that the package has listed in yarg.Release.classifiers.
>>> package = yarg.get('yarg')
>>> package.python_implementations
[u'CPython', u'PyPy']
A list of yarg.release.Release objects for each file in the latest release.
>>> package = yarg.get('yarg')
>>> package.latest_release
[<Release 0.1.0>, <Release 0.1.0>]
Returns True if one of the yarg.release.Release objects in the latest set of release files is wheel format. Returns False if not.
>>> package = yarg.get('yarg')
>>> package.has_wheel
True
Returns True if one of the yarg.release.Release objects in the latest set of release files is egg format. Returns False if not.
>>> package = yarg.get('yarg')
>>> package.has_egg
False
Returns True if one of the yarg.release.Release objects in the latest set of release files is source format. Returns False if not.
>>> package = yarg.get('yarg')
>>> package.has_source
True
>>> package = yarg.get('yarg')
>>> package.release_ids
[u'0.0.1', u'0.0.5', u'0.1.0']
A list of yarg.release.Release objects for each file in a release.
Parameters: | release_id – A pypi release id. >>> package = yarg.get('yarg')
>>> last_release = yarg.releases[-1]
>>> package.release(last_release)
[<Release 0.1.0>, <Release 0.1.0>]
|
---|
A release file from PyPI.
Parameters: |
|
---|
>>> package = yarg.get('yarg')
>>> v = "0.1.0"
>>> r = package.release(v)
>>> r[0].release_id
u'0.1.0'
>>> package = yarg.get('yarg')
>>> v = "0.1.0"
>>> r = package.release(v)
>>> r.uploaded
datetime.datime(2014, 8, 7, 21, 26, 19)
>>> package = yarg.get('yarg')
>>> v = "0.1.0"
>>> r = package.release(v)
>>> r.python_version
u'2.7'
>>> package = yarg.get('yarg')
>>> v = "0.1.0"
>>> r = package.release(v)
>>> r.url
u'https://pypi.python.org/packages/2.7/y/yarg/yarg...'
>>> package = yarg.get('yarg')
>>> v = "0.1.0"
>>> r = package.release(v)
>>> r.md5_digest
u'bec88e1c1765ca6177360e8f37b44c5c'
>>> package = yarg.get('yarg')
>>> v = "0.1.0"
>>> r = package.release(v)
>>> r.filename
u'yarg-0.1.0-py27-none-any.whl'
>>> package = yarg.get('yarg')
>>> v = "0.1.0"
>>> r = package.release(v)
>>> r.size
52941
A catchall HTTPError exception to handle HTTP errors when using yarg.get().
This exception is also loaded at yarg.HTTPError for ease of access.
Member: | status_code |
---|
exception errno
exception filename
exception strerror