swiftly/cli/put.py
def cli_put(context, path):
    """
    Performs a PUT on the item (account, container, or object).

    See :py:mod:`swiftly.cli.put` for context usage information.

    See :py:class:`CLIPut` for more information.
    """
    path = path.lstrip('/') if path else ''
    if context.input_ and os.path.isdir(context.input_):
        return cli_put_directory_structure(context, path)
    if not path:
        return cli_put_account(context)
    elif '/' not in path.rstrip('/'):
        return cli_put_container(context, path)
    else:
        return cli_put_object(context, path)
def cli_put(context, path):
    """
    Performs a PUT on the item (account, container, or object).

    See :py:mod:`swiftly.cli.put` for context usage information.

    See :py:class:`CLIPut` for more information.
    """
    path = path.lstrip('/') if path else ''
    if context.input_ and os.path.isdir(context.input_):
        return cli_put_directory_structure(context, path)
    if not path:
        return cli_put_account(context)
    elif '/' not in path.rstrip('/'):
        return cli_put_container(context, path)
    else:
        return cli_put_object(context, path)
Performs a PUT on the item (account, container, or object).

    See :py:mod:`swiftly.cli.put` for context usage information.

    See :py:class:`CLIPut` for more information.