Support for py schemes.

class cachy.cache_manager.CacheManager, cache_option: str, protocols: Tuple[str, ...] = ('py', 'pypackage'), domains: Tuple[str, ...] = ())[source]


Fetch a style from an installed Python package.

URL schemes: - py://import/path/of/style/file/<style_file_name> - pypackage://import/path/of/style/file/<style_file_name>

E.g. py://some_package/path/nitpick.toml.

cache_manager: CacheManager
cache_option: str
domains: Tuple[str, ...] = ()
fetch(url) Tuple[Optional[pathlib.Path], str]

Fetch a style form cache or from a specific fetcher.

protocols: Tuple[str, ...] = ('py', 'pypackage')
requires_connection = False
class str, resource_name: str)[source]

Bases: object

Represent a resource file in installed Python package.

import_path: str
classmethod parse_url(url: str)[source]

Create an instance by parsing a URL string in any accepted format.

See the code for test_parsing_python_package_urls() for more examples.

property raw_content_url:

Raw path of resource file.

resource_name: str