{"id":21866816,"url":"https://github.com/connor-makowski/azure_utils","last_synced_at":"2026-05-15T23:33:53.640Z","repository":{"id":188541383,"uuid":"678969307","full_name":"connor-makowski/azure_utils","owner":"connor-makowski","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-11T19:37:45.000Z","size":163,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T12:13:55.112Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/connor-makowski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-08-15T20:09:57.000Z","updated_at":"2023-08-15T20:10:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"e5e859a0-967b-41a6-b681-75b337d436ed","html_url":"https://github.com/connor-makowski/azure_utils","commit_stats":null,"previous_names":["connor-makowski/azure_utils"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connor-makowski%2Fazure_utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connor-makowski%2Fazure_utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connor-makowski%2Fazure_utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connor-makowski%2Fazure_utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/connor-makowski","download_url":"https://codeload.github.com/connor-makowski/azure_utils/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244870809,"owners_count":20523936,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-28T05:07:36.044Z","updated_at":"2026-05-15T23:33:48.608Z","avatar_url":"https://github.com/connor-makowski.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Azure Utils\n[![PyPI version](https://badge.fury.io/py/azure_utils.svg)](https://badge.fury.io/py/azure_utils)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nAzure Utilities for python\n\n## Documentation\n[Technical documentation](https://connor-makowski.github.io/azure_utils/azure_utils/blob_storage.html) can be found [here](https://connor-makowski.github.io/azure_utils/azure_utils/blob_storage.html).\n\n## Setup\n\nMake sure you have Python 3.6.x (or higher) installed on your system. You can download it [here](https://www.python.org/downloads/).\n\u003cdetails\u003e\n\u003csummary\u003e\nRecommended (but Optional) -\u003e Expand this section to setup and activate a virtual environment.\n\u003c/summary\u003e\n\n  - Install (or upgrade) virtualenv:\n  ```\n  python3 -m pip install --upgrade virtualenv\n  ```\n  - Create your virtualenv named `venv`:\n  ```\n  python3 -m virtualenv venv\n  ```\n  - Activate your virtual environment\n    - On Unix (Mac or Linux):\n    ```\n    source venv/bin/activate\n    ```\n    - On Windows:\n    ```\n    venv\\scripts\\activate\n    ```\n\u003c/details\u003e\n\n```\npip install azure_utils\n```\n\n### Basic Usage\n```py\nimport os, sys\nfrom azure_utils.blob_storage import AZContainer\n\n# Get the working directory of this file\nwd=os.path.abspath(os.path.dirname(sys.argv[0]))\n\n# Create a container object\naz = AZContainer(\n    account_url=\"https://\u003caccount_name\u003e.blob.core.windows.net\",\n    account_key=\"\u003caccount_key\u003e\",\n    container_name=\"\u003ccontainer_name\u003e\"\n)\n\n# Get a list of all files in the container and print the first 5\nfiles = az.list_files(remote_folderpath='/')\nprint(files[:5])\n\n# Upload a file to the container\naz.upload_file(\n    remote_filepath='/test.csv',\n    local_filepath=f'{wd}/test_data/upload/test.csv',\n    overwrite=True\n)\n\n# Download the file from the container\naz.download_file(\n    remote_filepath='/test.csv',\n    local_filepath=f'{wd}/test_data/download/test.csv',\n    overwrite=True,\n    smart_sync=True\n)\n\n# Delete the file from the container\naz.delete_file(\n    remote_filepath='/test.csv'\n)\n\n# Upload a folder to the container\naz.sync_to_remote(\n    remote_folderpath='/',\n    local_folderpath=f'{wd}/test_data/upload/',\n    overwrite=True,\n)\n\n# Download the folder from the container\naz.sync_to_local(\n    remote_folderpath='/',\n    local_folderpath=f'{wd}/test_data/download/',\n    overwrite=True,\n    smart_sync=True,\n)\n\n# Delete all files in the container\naz.delete_folder(\n    remote_folderpath='/',\n)\n\n# Delete all local metadata\naz.clear_local_meta(f'{wd}/test_data/')\n```\n\nContributors:\n\n- Alice Zhao\n- Connor Makowski\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconnor-makowski%2Fazure_utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconnor-makowski%2Fazure_utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconnor-makowski%2Fazure_utils/lists"}