Skip to content

aea.package_manager.v0

Package manager V0

PackageManagerV0 Objects

class PackageManagerV0(BasePackageManager)

Package manager v0.

__init__

def __init__(
        path: Path,
        packages: Optional[PackageIdToHashMapping] = None,
        config_loader: ConfigLoaderCallableType = load_configuration) -> None

Initialize object.

packages

@property
def packages() -> OrderedDictType[PackageId, str]

Returns mappings of package ids -> package hash

get_package_hash

def get_package_hash(package_id: PackageId) -> Optional[str]

Get package hash.

register

def register(package_path: Path,
             package_type: Optional[PackageType] = None) -> "PackageManagerV0"

Add package to the index.

sync

def sync(dev: bool = False,
         third_party: bool = True,
         update_packages: bool = False,
         update_hashes: bool = False) -> "PackageManagerV0"

Sync local packages to the remote registry.

update_package_hashes

def update_package_hashes(selector_prompt: Optional[Callable[[], str]] = None,
                          skip_missing: bool = False) -> "BasePackageManager"

Update packages.json file.

add_package

def add_package(package_id: PackageId,
                with_dependencies: bool = False,
                allow_update: bool = False) -> "BasePackageManager"

Add package.

verify

def verify() -> int

Verify fingerprints and outer hash of all available packages.

json

@property
def json() -> OrderedDictType

Json representation.

from_dir

@classmethod
def from_dir(
    cls,
    packages_dir: Path,
    config_loader: ConfigLoaderCallableType = load_configuration
) -> "PackageManagerV0"

Initialize from packages directory.