webstation-broker
DeveloperPython referenceimports

imports.ImportMember

One `.import/` member that passed hygiene, ready for placement.

One .import/ member that passed hygiene, ready for placement.

Attributes

attributenamestr

The original zip name, echoed in refusals.

attributekindImportKind

The declared kind.

attributeoriginOrigin

The declared origin; advisory, placement never reads it.

attributerelPurePosixPath

The path below .import/<kind>/.

attributepartstuple[str, ...]

rel's components.

attributesizeint

The uncompressed size, from the zip header.

attributeinfozipfile.ZipInfo
= field(repr=False, compare=False)

The zip entry.

attribute_zfOptional[zipfile.ZipFile]
= field(default=None, repr=False, compare=False)

Functions

funchead(self, n) -> bytes

Read the start of the member, for a hook that sniffs content.

Only valid inside preflight, while its archive is open.

Raises

  • RuntimeError: When the member was built without an open archive, or its archive is closed.
  • MemberReadError: When the member's data cannot be read.
paramself
paramnint

Bytes wanted; clamped to HEAD_MAX_BYTES.

Returns

bytes

Up to n bytes from the start of the member.

func__init__(self, name, kind, origin, rel, parts, size, info, _zf=None) -> None
paramself
paramnamestr
paramkindImportKind
paramoriginOrigin
paramrelPurePosixPath
parampartstuple[str, ...]
paramsizeint
paraminfozipfile.ZipInfo
param_zfOptional[zipfile.ZipFile]
= None

Returns

None

On this page