INNER CODE UNIT · Python

ls

pybel/pybel · src/pybel/cli.py:502

def ls(manager: Manager):
    """List network names, versions, and optionally, descriptions."""
    for n in manager.list_networks():
        click.echo(f"{n.id}\t{n.name}\t{n.version}")


@networks.command()
@click.option("-n", "--network-id", type=int, help="Identifier of network to drop")
@click.option(
    "-y",
    "--yes",
    is_flag=True,
    help="Drop all networks without confirmation if no identifier is given",
)
@click.pass_obj
def drop(manager: Manager, network_id: int | None, yes):
    """Drop a network by its identifier or drop all networks."""
    if network_id:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…