aea.package_
manager.v1
Package manager V1
PackageManagerV1 Objects
class PackageManagerV1(BasePackageManager)
Package manager V1
LocalPackageType Objects
class LocalPackageType(Enum)
Local package types.
__
init__
def __init__(path: Path,
dev_packages: Optional[PackageIdToHashMapping] = None,
third_party_packages: Optional[PackageIdToHashMapping] = None,
config_loader: ConfigLoaderCallableType = load_configuration,
logger: Optional[logging.Logger] = None) -> None
Initialize object.
dev_
packages
@property
def dev_packages() -> PackageIdToHashMapping
Returns mappings of package ids -> package hash
third_
party_
packages
@property
def third_party_packages() -> PackageIdToHashMapping
Returns mappings of package ids -> package hash
all_
packages
@property
def all_packages() -> PackageIdToHashMapping
Return all packages.
get_
package_
hash
def get_package_hash(package_id: PackageId) -> Optional[str]
Get package hash.
is_
third_
party_
package
def is_third_party_package(package_id: PackageId) -> bool
Check if a package is third party package.
is_
dev_
package
def is_dev_package(package_id: PackageId) -> bool
Check if a package is third party package.
add_
package
def add_package(package_id: PackageId,
with_dependencies: bool = False,
allow_update: bool = False) -> "PackageManagerV1"
Add package.
register
def register(package_path: Path,
package_type: Optional[PackageType] = None) -> "PackageManagerV1"
Add package to the index.
sync
def sync(dev: bool = False,
third_party: bool = True,
update_packages: bool = False,
update_hashes: bool = False,
sources: Optional[List[str]] = None) -> "PackageManagerV1"
Sync local packages to the remote registry.
update_
package_
hashes
def update_package_hashes(selector_prompt: Optional[Callable[[], str]] = None,
skip_missing: bool = False) -> "PackageManagerV1"
Update package.json file.
verify
def verify() -> int
Verify fingerprints and outer hash of all available packages.
json
@property
def json() -> OrderedDictType
Json representation
from_
json
@classmethod
def from_json(
cls,
packages: Dict[str, Dict[str, str]],
packages_dir: Optional[Path] = None,
config_loader: ConfigLoaderCallableType = load_configuration
) -> "PackageManagerV1"
Initialize from json object
from_
dir
@classmethod
def from_dir(
cls,
packages_dir: Path,
config_loader: ConfigLoaderCallableType = load_configuration
) -> "PackageManagerV1"
Initialize from packages directory.