|
OpenQuizz
Une application de gestion des contenus pédagogiques
|


Public Member Functions | |
| def | __init__ (self, metadata, path, env=None) |
| def | get_hash (self, data, hasher=None) |
Public Member Functions inherited from Distribution | |
| def | __init__ (self, metadata) |
| def | source_url (self) |
| def | name_and_version (self) |
| def | provides (self) |
| def | run_requires (self) |
| def | meta_requires (self) |
| def | build_requires (self) |
| def | test_requires (self) |
| def | dev_requires (self) |
| def | matches_requirement (self, req) |
| def | __repr__ (self) |
| def | __eq__ (self, other) |
| def | __hash__ (self) |
Data Fields | |
| path | |
| dist_path | |
Data Fields inherited from Distribution | |
| metadata | |
| name | |
| key | |
| version | |
| locator | |
| digest | |
| extras | |
| context | |
| download_urls | |
| digests | |
| source_url | |
Static Public Attributes | |
| hasher | |
Static Public Attributes inherited from Distribution | |
| build_time_dependency | |
| requested | |
| download_url | |
This is the base class for installed distributions (whether PEP 376 or legacy).
| def __init__ | ( | self, | |
| metadata, | |||
| path, | |||
env = None |
|||
| ) |
Initialise an instance.
:param metadata: An instance of :class:`Metadata` which describes the
distribution. This will normally have been initialised
from a metadata file in the ``path``.
:param path: The path of the ``.dist-info`` or ``.egg-info``
directory for the distribution.
:param env: This is normally the :class:`DistributionPath`
instance where this distribution was found.
Reimplemented in InstalledDistribution.
| def get_hash | ( | self, | |
| data, | |||
hasher = None |
|||
| ) |
Get the hash of some data, using a particular hash algorithm, if
specified.
:param data: The data to be hashed.
:type data: bytes
:param hasher: The name of a hash implementation, supported by hashlib,
or ``None``. Examples of valid values are ``'sha1'``,
``'sha224'``, ``'sha384'``, '``sha256'``, ``'md5'`` and
``'sha512'``. If no hasher is specified, the ``hasher``
attribute of the :class:`InstalledDistribution` instance
is used. If the hasher is determined to be ``None``, MD5
is used as the hashing algorithm.
:returns: The hash of the data. If a hasher was explicitly specified,
the returned hash will be prefixed with the specified hasher
followed by '='.
:rtype: str
| dist_path |
|
static |
| path |