May 14th, 2021

Introducing the Azure SDK for Python (Conda) **Preview**

Xiang Yan
Senior Software Engineer

We’re excited to announce that the Azure SDK for Python (Conda) Preview packages are now available in the Microsoft channel.

Conda is the most popular platform for scientific computing. It is widely used by data scientists. It provides a packaging system, separate from PyPI, which optimizes for self-contained packages, guarantees dependency enforcement, and provides built-in execution environment isolation.

The Azure SDK for Python (Conda) packages are open-source libraries that simplify provisioning, managing, and using Azure resources from Python application code.

Getting Started

Prerequisites

  • Miniconda which provides a bare-minimum Conda root environment with Python.

or

  • Anaconda which is Anaconda Inc.’s flagship product, and provides a full-featured Conda root environment as well as hundreds of useful tools, libraries, and utilities by default.

Add channel

Add the Microsoft channel to Conda config with the following command:

$ conda config --add channels "Microsoft"

Install packages

Once the Microsoft channel has been enabled, you can use conda to install Azure SDK for Python (Conda) packages. E.g. if you want to install azure-storage, you would install it with:

$ conda install azure-storage

Package availability

Azure SDK for Python (Conda) packages are divided into several composable client libraries that serve different purposes. They are organized by services. e.g. if you want to use storage, you only need to install azure-storage. All storage libraries will be installed including azure-storage-blob, azure-storage-queue, azure-storage-file-share and azure-storage-file-datalake. There is no need to install the packages individually. We’ve simplified packages for Azure SDK for Python (Conda) by grouping them by services. E.g. we bundle azure-storage-blob, azure-storage-queue, azure-storage-file-share and azure-storage-file-datalake packages into one azure-storage package. It is not 1 on 1 mapping between conda packages and pypi packages.

Identity and security

Azure Identity library provides a set of credential classes for use with Azure SDK clients which support Azure Active Directory (AAD) token authentication.

Management library

Azure Management library helps you create, provision and otherwise manage Azure resources from Python scripts.

With the management library, you can write configuration and deployment scripts to perform the same tasks that you can through the Azure portal or the Azure CLI.

Client libraries

Azure client libraries help you write Python application code to interact with provisioned services.

Azure App Configuration client library

Azure App Configuration can be used to create and manage application configuration settings.

Azure App Configuration is a managed service that helps developers centralize their application configurations simply and securely.

Modern programs, especially programs running in a cloud, generally have many components that are distributed in nature. Spreading configuration settings across these components can lead to hard-to-troubleshoot errors during an application deployment. Instead, you can use App Configuration to securely store all the settings for your application in one place.

Azure Cosmos client library

Azure Cosmos DB is a globally distributed, multi-model database service that supports document, key-value, wide-column, and graph databases.

Azure Cosmos client library can be used to manage databases and the JSON documents they contain in this NoSQL database service.

High level capabilities include:

  • Create Cosmos DB databases and modify their settings
  • Create and modify containers to store collections of JSON documents
  • Create, read, update, and delete the items (JSON documents) in your containers
  • Query the documents in your database using SQL-like syntax

Azure Digital Twins Core client library

Azure Digital Twins Core client library provide access to the Azure Digital Twins service for managing twins, models, relationships, etc.

Azure Event Grid client library

Azure Event Grid is a fully-managed intelligent event routing service that allows for uniform event consumption using a publish-subscribe model.

Azure Event Grid client library can be used to send and consume events from Azure Event Grid service.

Azure Event Hubs client library

Azure Event Hubs is a highly scalable publish-subscribe service that can ingest millions of events per second and stream them to multiple consumers. This lets you process and analyze the massive amounts of data produced by your connected devices and applications. Once Event Hubs has collected the data, you can retrieve, transform, and store it by using any real-time analytics provider or with batching/storage adapters.

The Azure Event Hubs client library allows for publishing and consuming of Azure Event Hubs events and may be used to:

  • Emit telemetry about your application for business intelligence and diagnostic purposes.
  • Publish facts about the state of your application which interested parties may observe and use as a trigger for taking action.
  • Observe interesting operations and interactions happening within your business or other ecosystem, allowing loosely coupled systems to interact without the need to bind them together.
  • Receive events from one or more publishers, transform them to better meet the needs of your ecosystem, then publish the transformed events to a new stream for consumers to observe.

Azure Form Recognizer client library

Azure Cognitive Services Form Recognizer is a cloud service that uses machine learning to recognize text and table data from form documents.

It includes the following main functionalities:

  • Custom models – Recognize field values and table data from forms. These models are trained with your own data, so they’re tailored to your forms.
  • Content API – Recognize text, table structures, and selection marks along with their bounding box coordinates, from documents. Corresponds to the REST service’s Layout API.
  • Prebuilt models – Recognize data using the following prebuilt models
    • Receipt model – Recognize data from sales receipts using a prebuilt model.
    • Business card model – Recognize data from business cards using a prebuilt model.
    • Invoice model – Recognize data from invoices using a prebuilt model.
    • Id document model – Recognize data from id documents using a prebuilt model.

Azure Key Vault client library

Azure Key Vault is a cloud service for securely storing and accessing secrets. A secret is anything that you want to tightly control access to, such as API keys, passwords, certificates, or cryptographic keys. Key Vault service supports two types of containers: vaults and managed hardware security module (HSM) pools. Vaults support storing software and HSM-backed keys, secrets, and certificates. Managed HSM pools only support HSM-backed keys.

Azure Key Vault client library can be used for:

  • Cryptographic key management – create, store, and control access to the keys used to encrypt your data.
  • Secrets management – securely store and control access to tokens, passwords, certificates, API keys, and other secrets.
  • Certificate management – create, manage, and deploy public and private SSL/TLS certificates.

Azure Cognitive Search client library

Azure Cognitive Search is a search-as-a-service cloud solution that gives developers APIs and tools for adding a rich search experience over private, heterogeneous content in web, mobile, and enterprise applications.

The Azure Cognitive Search service is well suited for the following application scenarios:

  • Consolidate varied content types into a single searchable index. To populate an index, you can push JSON documents that contain your content, or if your data is already in Azure, create an indexer to pull in data automatically.
  • Attach skillsets to an indexer to create searchable content from images and large text documents. A skillset leverages AI from Cognitive Services for built-in OCR, entity recognition, key phrase extraction, language detection, text translation, and sentiment analysis. You can also add custom skills to integrate external processing of your content during data ingestion.
  • In a search client application, implement query logic and user experiences similar to commercial web search engines.

Use the Azure Cognitive Search client library to:

  • Submit queries for simple and advanced query forms that include fuzzy search, wildcard search, regular expressions.
  • Implement filtered queries for faceted navigation, geospatial search, or to narrow results based on filter criteria.
  • Create and manage search indexes.
  • Upload and update documents in the search index.
  • Create and manage indexers that pull data from Azure into an index.
  • Create and manage skillsets that add AI enrichment to data ingestion.
  • Create and manage analyzers for advanced text analysis or multi-lingual content.
  • Optimize results through scoring profiles to factor in business logic or freshness.

Azure Service Bus client library

Azure Service Bus is a high performance cloud-managed messaging service for providing real-time and fault-tolerant communication between distributed senders and receivers.

Service Bus provides multiple mechanisms for asynchronous highly reliable communication, such as structured first-in-first-out messaging, publish/subscribe capabilities, and the ability to easily scale as your needs grow.

Azure Service Bus client library can be used to communicate between applications and services and implement asynchronous messaging patterns.

  • Create Service Bus namespaces, queues, topics, and subscriptions, and modify their settings.
  • Send and receive messages within your Service Bus channels.
  • Utilize message locks, sessions, and dead letter functionality to implement complex messaging patterns.

Azure Storage client library

Azure Storage is a Microsoft-managed service providing cloud storage that is highly available, secure, durable, scalable, and redundant.

Azure Storage client library can be used for:

  • Blob management:
    • Serving images or documents directly to a browser
    • Storing files for distributed access
    • Streaming video and audio
    • Storing data for backup and restore, disaster recovery, and archiving
    • Storing data for analysis by an on-premises or Azure-hosted service
  • File share management:
    • Replace or supplement on-premises file servers
    • “Lift and shift” applications
    • Simplify cloud development with shared application settings, diagnostic share, and Dev/Test/Debug tools
  • Queue management:
    • Creating a backlog of work to process asynchronously
    • Passing messages between different parts of a distributed application

Azure Text Analytics client library

Azure Cognitive Services Text Analytics is a cloud-based service that provides advanced natural language processing over raw text, and includes the following main functions:

  • Sentiment Analysis
  • Named Entity Recognition
  • Linked Entity Recognition
  • Personally Identifiable Information (PII) Entity Recognition
  • Language Detection
  • Key Phrase Extraction
  • Batch Analysis

You can find code snippets how to use the client libraries in the reference documentation and the Azure Samples.

Next step

Azure SDK for Python (Conda) packages are now in preview and we be stable soon. If you want to give it a try and give us feedback, you can open issues on github. Your contribution will be more than appreciated.

Get help and connect with the SDK team

Azure SDK Links

Author

Xiang Yan
Senior Software Engineer

0 comments

Discussion are closed.