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


Public Member Functions | |
| def | __init__ (self, url, timeout=None, num_workers=10, **kwargs) |
| def | get_page (self, url) |
| def | get_distribution_names (self) |
Public Member Functions inherited from Locator | |
| def | __init__ (self, scheme='default') |
| def | get_errors (self) |
| def | clear_errors (self) |
| def | clear_cache (self) |
| def | get_project (self, name) |
| def | score_url (self, url) |
| def | prefer_url (self, url1, url2) |
| def | split_filename (self, filename, project_name) |
| def | convert_url_to_download_info (self, url, project_name) |
| def | locate (self, requirement, prereleases=False) |
Data Fields | |
| base_url | |
| timeout | |
| skip_externals | |
| num_workers | |
| platform_check | |
| result | |
| project_name | |
Data Fields inherited from Locator | |
| opener | |
| matcher | |
| errors | |
Static Public Attributes | |
| decoders | |
| fileobj | |
| platform_dependent | |
Static Public Attributes inherited from Locator | |
| source_extensions | |
| binary_extensions | |
| excluded_extensions | |
| wheel_tags | |
| downloadable_extensions | |
Additional Inherited Members | |
Properties inherited from Locator | |
| scheme = property(_get_scheme, _set_scheme) | |
A locator which scrapes HTML pages to locate downloads for a distribution. This runs multiple threads to do the I/O; performance is at least as good as pip's PackageFinder, which works in an analogous fashion.
| def __init__ | ( | self, | |
| url, | |||
timeout = None, |
|||
num_workers = 10, |
|||
| ** | kwargs | ||
| ) |
Initialise an instance.
:param url: The root URL to use for scraping.
:param timeout: The timeout, in seconds, to be applied to requests.
This defaults to ``None`` (no timeout specified).
:param num_workers: The number of worker threads you want to do I/O,
This defaults to 10.
:param kwargs: Passed to the superclass.
| def get_distribution_names | ( | self | ) |
Return all the distribution names known to this locator.
Reimplemented from Locator.
| def get_page | ( | self, | |
| url | |||
| ) |
Get the HTML for an URL, possibly from an in-memory cache. XXX TODO Note: this cache is never actually cleared. It's assumed that the data won't get stale over the lifetime of a locator instance (not necessarily true for the default_locator).
| base_url |
|
static |
|
static |
| num_workers |
| platform_check |
|
static |
| project_name |
| result |
| skip_externals |
| timeout |