infi-azure


Nameinfi-azure JSON
Version 0.0.9 PyPI version JSON
download
home_page
SummaryAzure python package for infinity team
upload_time2023-12-14 16:53:04
maintainer
docs_urlNone
authorInfinity Team
requires_python
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Azure Package

## Introduction

infi_azure is a comprehensive package that aims to simplify Azure operations by encapsulating core functionalities into
three classes: AzureStorageAccount, AzureContainer, and AzureBlob. Additionally, it includes utility functions like
azcopy to streamline the process of Azure actions.

## Installation

Install the package via pipenv:

    pipenv install infi_azure

## Features

- AzureStorageAccount: This class facilitates seamless interaction with Azure Storage Accounts\
by providing methods for connection, retrieving account details, checking account existence, and accessing\
the Blob Service Client.

- AzureContainer: This class provides features for seamless interaction with Azure Storage Blob containers,\
including retrieving directories, generating Shared Access Signatures (SAS) tokens and URLs, checking container existence\
and deleting blobs within a specified directory.

- AzureBlob: This class facilitates interactions with individual blobs within an Azure Storage Container,\
offering functionalities such as downloading blob content as bytes, checking blob existence,\
verifying if a directory is empty, creating an empty directory, and counting the number of blobs within a specified directory.

- azcopy_action: This function utilizes AzCopy to copy the contents of a source folder to a specified destination\
container in Azure Blob Storage.

## Usage Example

### AzureStorageAccount

    from azure_storage_account import AzureStorageAccount

    # Replace 'your_connection_string_here' with your actual connection string
    connection_string = "your_connection_string_here"

    storage_account = AzureStorageAccount(connection_string)

    # Check if the account exists
    if storage_account.is_account_exist():
        print("Azure Storage Account exists.")
    else:
        print("Azure Storage Account does not exist.")

### AzureContainer
    
    from azure_storage_account import AzureContainer
    
    # Replace 'your_connection_string_here' with your actual connection string
    connection_string = "your_connection_string_here"

    # Replace 'your_container_name' with your actual container name
    container_name = "your_container_name"

    container = AzureContainer(connection_string, container_name)

    # print all directories in container
    print(container.get_all_blobs_in_container())

### AzureBlob

    from azure_storage_account import AzureBlob
    
    # Replace 'your_connection_string_here' with your actual connection string
    connection_string = "your_connection_string_here"

    # Replace 'your_container_name' with your actual container name
    container_name = "your_container_name"

    # Replace 'your_blob_name' with your actual blob name
    blob_name = "your_blob_name"

    blob = AzureBlob(connection_string, container_name, blob_name)

    # create empty directory
    blob.create_empty_directory()
    
### Azcopy

    from azure_storage_account import azcopy_action

    # Replace the parameters with your actual parameters
    source = "your_source_container_url"
    dest = "your_destination_container_url"
    azcopy_path = "your_azcopy_path"
    azcopy_action(azcopy_path, source, dest)

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "infi-azure",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Infinity Team",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/4f/c6/6ee9eb7b324f3c43b2f4315d2624571552b3ce4cedd13764756140aa3633/infi_azure-0.0.9.tar.gz",
    "platform": null,
    "description": "# Azure Package\r\n\r\n## Introduction\r\n\r\ninfi_azure is a comprehensive package that aims to simplify Azure operations by encapsulating core functionalities into\r\nthree classes: AzureStorageAccount, AzureContainer, and AzureBlob. Additionally, it includes utility functions like\r\nazcopy to streamline the process of Azure actions.\r\n\r\n## Installation\r\n\r\nInstall the package via pipenv:\r\n\r\n    pipenv install infi_azure\r\n\r\n## Features\r\n\r\n- AzureStorageAccount: This class facilitates seamless interaction with Azure Storage Accounts\\\r\nby providing methods for connection, retrieving account details, checking account existence, and accessing\\\r\nthe Blob Service Client.\r\n\r\n- AzureContainer: This class provides features for seamless interaction with Azure Storage Blob containers,\\\r\nincluding retrieving directories, generating Shared Access Signatures (SAS) tokens and URLs, checking container existence\\\r\nand deleting blobs within a specified directory.\r\n\r\n- AzureBlob: This class facilitates interactions with individual blobs within an Azure Storage Container,\\\r\noffering functionalities such as downloading blob content as bytes, checking blob existence,\\\r\nverifying if a directory is empty, creating an empty directory, and counting the number of blobs within a specified directory.\r\n\r\n- azcopy_action: This function utilizes AzCopy to copy the contents of a source folder to a specified destination\\\r\ncontainer in Azure Blob Storage.\r\n\r\n## Usage Example\r\n\r\n### AzureStorageAccount\r\n\r\n    from azure_storage_account import AzureStorageAccount\r\n\r\n    # Replace 'your_connection_string_here' with your actual connection string\r\n    connection_string = \"your_connection_string_here\"\r\n\r\n    storage_account = AzureStorageAccount(connection_string)\r\n\r\n    # Check if the account exists\r\n    if storage_account.is_account_exist():\r\n        print(\"Azure Storage Account exists.\")\r\n    else:\r\n        print(\"Azure Storage Account does not exist.\")\r\n\r\n### AzureContainer\r\n    \r\n    from azure_storage_account import AzureContainer\r\n    \r\n    # Replace 'your_connection_string_here' with your actual connection string\r\n    connection_string = \"your_connection_string_here\"\r\n\r\n    # Replace 'your_container_name' with your actual container name\r\n    container_name = \"your_container_name\"\r\n\r\n    container = AzureContainer(connection_string, container_name)\r\n\r\n    # print all directories in container\r\n    print(container.get_all_blobs_in_container())\r\n\r\n### AzureBlob\r\n\r\n    from azure_storage_account import AzureBlob\r\n    \r\n    # Replace 'your_connection_string_here' with your actual connection string\r\n    connection_string = \"your_connection_string_here\"\r\n\r\n    # Replace 'your_container_name' with your actual container name\r\n    container_name = \"your_container_name\"\r\n\r\n    # Replace 'your_blob_name' with your actual blob name\r\n    blob_name = \"your_blob_name\"\r\n\r\n    blob = AzureBlob(connection_string, container_name, blob_name)\r\n\r\n    # create empty directory\r\n    blob.create_empty_directory()\r\n    \r\n### Azcopy\r\n\r\n    from azure_storage_account import azcopy_action\r\n\r\n    # Replace the parameters with your actual parameters\r\n    source = \"your_source_container_url\"\r\n    dest = \"your_destination_container_url\"\r\n    azcopy_path = \"your_azcopy_path\"\r\n    azcopy_action(azcopy_path, source, dest)\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Azure python package for infinity team",
    "version": "0.0.9",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bb58130629f7db840e3e96412afdc87046655a292357e80ad8dc2f3b2efd74fb",
                "md5": "045683c784381c1e1c743d804cabafd4",
                "sha256": "a6b31de1e0c32e6ca9e8b84c27e201c87cb4d7e10d5a35d22a79f3aade383514"
            },
            "downloads": -1,
            "filename": "infi_azure-0.0.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "045683c784381c1e1c743d804cabafd4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 9956,
            "upload_time": "2023-12-14T16:53:02",
            "upload_time_iso_8601": "2023-12-14T16:53:02.273083Z",
            "url": "https://files.pythonhosted.org/packages/bb/58/130629f7db840e3e96412afdc87046655a292357e80ad8dc2f3b2efd74fb/infi_azure-0.0.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4fc66ee9eb7b324f3c43b2f4315d2624571552b3ce4cedd13764756140aa3633",
                "md5": "e7f5ea0e9135467c843ab29df60c05ab",
                "sha256": "71bc1062d76c17d5317a1cdc1ae2f1930f0cac991db6be8e1586d2d760410c6c"
            },
            "downloads": -1,
            "filename": "infi_azure-0.0.9.tar.gz",
            "has_sig": false,
            "md5_digest": "e7f5ea0e9135467c843ab29df60c05ab",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 7594,
            "upload_time": "2023-12-14T16:53:04",
            "upload_time_iso_8601": "2023-12-14T16:53:04.653622Z",
            "url": "https://files.pythonhosted.org/packages/4f/c6/6ee9eb7b324f3c43b2f4315d2624571552b3ce4cedd13764756140aa3633/infi_azure-0.0.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-14 16:53:04",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "infi-azure"
}
        
Elapsed time: 0.14521s