OpenQuizz
Une application de gestion des contenus pédagogiques
Link Class Reference
Inheritance diagram for Link:
Collaboration diagram for Link:

Public Member Functions

def __init__ (self, url, comes_from=None, requires_python=None, yanked_reason=None, cache_link_parsing=True)
 
def __str__ (self)
 
def __repr__ (self)
 
def url (self)
 
def filename (self)
 
def file_path (self)
 
def scheme (self)
 
def netloc (self)
 
def path (self)
 
def splitext (self)
 
def ext (self)
 
def url_without_fragment (self)
 
def egg_fragment (self)
 
def subdirectory_fragment (self)
 
def hash (self)
 
def hash_name (self)
 
def show_url (self)
 
def is_file (self)
 
def is_existing_dir (self)
 
def is_wheel (self)
 
def is_vcs (self)
 
def is_yanked (self)
 
def has_hash (self)
 
def is_hash_allowed (self, hashes)
 
- Public Member Functions inherited from KeyBasedCompareMixin
def __init__ (self, key, defining_class)
 
def __hash__ (self)
 
def __lt__ (self, other)
 
def __le__ (self, other)
 
def __gt__ (self, other)
 
def __ge__ (self, other)
 
def __eq__ (self, other)
 

Data Fields

 comes_from
 
 requires_python
 
 yanked_reason
 
 cache_link_parsing
 
 scheme
 
 ext
 

Detailed Description

Represents a parsed link from a Package Index's simple URL

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  url,
  comes_from = None,
  requires_python = None,
  yanked_reason = None,
  cache_link_parsing = True 
)
:param url: url of the resource pointed to (href of the link)
:param comes_from: instance of HTMLPage where the link was found,
    or string.
:param requires_python: String containing the `Requires-Python`
    metadata field, specified in PEP 345. This may be specified by
    a data-requires-python attribute in the HTML link tag, as
    described in PEP 503.
:param yanked_reason: the reason the file has been yanked, if the
    file has been yanked, or None if the file hasn't been yanked.
    This is the value of the "data-yanked" attribute, if present, in
    a simple repository HTML link. If the file has been yanked but
    no reason was provided, this should be the empty string. See
    PEP 592 for more information and the specification.
:param cache_link_parsing: A flag that is used elsewhere to determine
                   whether resources retrieved from this link
                   should be cached. PyPI index urls should
                   generally have this set to False, for
                   example.

Member Function Documentation

◆ __repr__()

def __repr__ (   self)

◆ __str__()

def __str__ (   self)

◆ egg_fragment()

def egg_fragment (   self)

◆ ext()

def ext (   self)

◆ file_path()

def file_path (   self)

◆ filename()

def filename (   self)

◆ has_hash()

def has_hash (   self)

◆ hash()

def hash (   self)

◆ hash_name()

def hash_name (   self)

◆ is_existing_dir()

def is_existing_dir (   self)

◆ is_file()

def is_file (   self)

◆ is_hash_allowed()

def is_hash_allowed (   self,
  hashes 
)
Return True if the link has a hash and it is allowed.

◆ is_vcs()

def is_vcs (   self)

◆ is_wheel()

def is_wheel (   self)

◆ is_yanked()

def is_yanked (   self)

◆ netloc()

def netloc (   self)
This can contain auth information.

◆ path()

def path (   self)

◆ scheme()

def scheme (   self)

◆ show_url()

def show_url (   self)

◆ splitext()

def splitext (   self)

◆ subdirectory_fragment()

def subdirectory_fragment (   self)

◆ url()

def url (   self)

◆ url_without_fragment()

def url_without_fragment (   self)

Field Documentation

◆ cache_link_parsing

cache_link_parsing

◆ comes_from

comes_from

◆ ext

ext

◆ requires_python

requires_python

◆ scheme

scheme

◆ yanked_reason

yanked_reason

The documentation for this class was generated from the following file: