MCPcopy Create free account
hub / github.com/SourceCode-AI/aura / __init__

Method __init__

aura/uri_handlers/pypi.py:26–40  ·  view source on GitHub ↗
(self, uri: urllib.parse.ParseResult)

Source from the content-addressed store, hash-verified

24 """
25
26 def __init__(self, uri: urllib.parse.ParseResult):
27 super().__init__(uri)
28
29 self.uri = uri
30 self.package_name = uri.netloc
31 self.pkg = PypiPackage.from_cached(name=self.package_name)
32 self.file_name = uri.path.lstrip("/")
33 self.opts = {"release": "latest", "cleanup": False}
34
35 if self.opts.get("download_dir"):
36 self.opts["download_dir"] = pathlib.Path(self.opts["download_dir"])
37
38 self.release = self.opts["release"]
39 self.opts.update(urllib.parse.parse_qs(uri.query))
40 self.comment = uri.fragment.lstrip("#")
41
42 @property
43 def package(self):

Callers

nothing calls this directly

Calls 2

from_cachedMethod · 0.80
getMethod · 0.80

Tested by

no test coverage detected