Package object will function much like the
web3. Rather than instantiating the base class provided
ethpm, you will instead use a
classmethod which generates a
Package class for a given package.
Package objects must be instantiated with a valid
>>> from ethpm import Package, V2_PACKAGES_DIR >>> from web3 import Web3 >>> owned_manifest_path = V2_PACKAGES_DIR / 'owned' / '1.0.0.json' >>> w3 = Web3(Web3.EthereumTesterProvider()) >>> OwnedPackage = Package.from_file(owned_manifest_path, w3) >>> assert isinstance(OwnedPackage, Package)
Package exposes the following properties.
Web3instance currently set on this
Package. The deployments available on a package are automatically filtered to only contain those belonging to the currently set
The manifest dict used to instantiate a
Package exposes the following methods.