Bibliotecas de Azure Storage para PythonAzure Storage libraries for Python
Información generalOverview
- Lea y escriba objetos y archivos en Azure Blob Storage.Read and write objects and files from Azure Blob storage
- Envíe y reciba mensajes entre aplicaciones conectadas en la nube con Azure Queue Storage.Send and receive messages between cloud-connected applications with Azure Queue storage
- Lea y escriba datos estructurados grandes con Azure Table Storage.Read and write large structured data with Azure Table storage
- Comparta almacenamiento entre aplicaciones con Azure File Storage.Share storage between apps with Azure File storage
Cree, actualice y administre cuentas y consultas de Azure Storage, y regenere las claves de acceso desde su código Python con las bibliotecas de administración.Create, update, and manage Azure Storage accounts and query and regenerate access keys from your Python code with the management libraries.
Instalación de las bibliotecasInstall the libraries
ClienteClient
Las bibliotecas de cliente de Azure Storage se componen de cuatro paquetes: Blob, File, Queue y Table.Azure Storage Client Libraries consist of 4 packages: Blob, File, Queue and Table. Para instalar el paquete Blob, ejecute:To install the blob package, run:
pip install azure-storage-blob
AdministraciónManagement
pip install azure-mgmt-storage
EjemploExample
from azure.storage.blob import BlockBlobService
blob_service = BlockBlobService(account_name, account_key)
blob_service.create_container(
'mycontainername',
public_access=PublicAccess.Blob
)
blob_service.create_blob_from_bytes(
'mycontainername',
'myblobname',
b'<center><h1>Hello World!</h1></center>',
content_settings=ContentSettings('text/html')
)
print(blob_service.make_blob_url('mycontainername', 'myblobname'))
EjemplosSamples
Introducción a Azure Blob Storage en PythonGet started with Azure Blob Storage in Python | Cree, lea, actualice, restrinja el acceso y elimine archivos y objetos Azure Storage.Create, read, update, restrict access, and delete files and objects in Azure Storage. |
Introducción a Azure Queue Storage en PythonGet started with Azure Queue Storage in Python | Inserte, consulte, recupere y elimine mensajes de las colas de Azure Storage.Insert, peek, retrieve and delete messages from Azure Storage queues. |
Administración de cuentas de Azure StorageManage Azure Storage accounts | Cree, actualice y elimine cuentas de almacenamiento.Create, update , and delete storage accounts. Recupere y regenere las claves de acceso de la cuenta de almacenamiento.Retrieve and regenerate storage account access keys. |
Vea más código de Python ejemplo que puede usar en sus aplicaciones.Explore more sample Python code you can use in your apps.