- Notifications
You must be signed in to change notification settings - Fork13
Python samples for Media Services v3
License
Azure-Samples/media-services-v3-python
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
| page_type | languages | products | name | description | urlFragment | lastModified | |||
|---|---|---|---|---|---|---|---|---|---|
sample |
|
| Azure Media Services v3 Python Samples | This repository contains samples showing how to use Azure Media Services v3 API using Python | media-services-v3-python | 3/1/2023 |
IMPORTANT NOTE : Azure Media Services have been retired on June 30, 2024. Please see theretirement guide.
The samples in this repo are part ofAzure Media Services.Use this set of samples to get started with the Azure Media Service v3 API and Python client SDK.
NOTEOwned and maintained by Microsoft. Please do not push changes directly to this repo. Please fork the repo and set it as upstream and your own fork as origin. See the CONTRIBUTING.md file for more details.
- If you don't have an Azure subscription, create afree account before you begin.
- Create a resource group to use with these samples.
- Install Python 3.x
For every sample, we recommend that you always create and activate a virtual environment using the following steps:
- Open the sample folder in VSCode or other editor
- Create the virtual environment
# py -3 uses the global python interpreter. You can also use python -m venv .venv.py -3 -m venv .venvThis command runs the Python venv module and creates a virtual environment in a folder named .venv.
- Activate the virtual environment:
.venv\scripts\activate
A virtual environment is a folder within a project that isolates a copy of a specific Python interpreter. Once you activate that environment (which Visual Studio Code does automatically), running pip install installs a library into that environment only. When you then run your Python code, it runs in the environment's exact context with specific versions of every library. And when you run pip freeze, you get the exact list of the those libraries. (In many of the samples, you create a requirements.txt file for the libraries you need, then use pip install -r requirements.txt. A requirements file is generally needed when you deploy code to Azure.)
Set up andconfigure your local Python dev environment for Azure
Install the azure-identity library for Python. This module is needed for Azure Active Directory authentication. See the details atAzure Identity client library for Python
pip install azure-identity
Install the Python SDK forAzure Media Services
The Pypi page for the Media Services Python SDK with latest version details is located at -azure-mgmt-media
pip install azure-mgmt-media
Install theAzure Storage SDK for Python
pip install azure-storage-blob
pip install azure-mgmt-storage
You can optionally install ALL of the requirements for a given samples by using the "requirements.txt" file in the samples folder
pip install -r requirements.txt
You can also use pip to uninstall libraries and install specific versions, including preview versions. For more information, seeHow to install Azure library packages for Python.
Copy the contents from the sample.env file that is in your forked repo in the root folder. Then, create your own .env file by clicking on Add file -> Create new file. Name the file.env and fill in the variables.
Do not allow this .env file to be checked into your fork of the GitHub repository! This is disallowed in the .gitignore file, but be extra careful not to allow the credentials to leak into your source control for this file.
All samples will load the root ".env" file first, and some of the samples add additional .env variables needed for the samples to work inside each sample folder. Make sure to check each sample for additional environment settings that are required.
- See the Azure Media Servicesmanagement API.
- Learn how to use theStorage APIs with Python
- Learn more about theAzure Identity client library for Python
- Learn more aboutAzure Media Services v3.
- Learn about theAzure Python SDKs
- Learn more aboutusage patterns for Azure Python SDKs
- Find more Azure Python SDKs in theAzure Python SDK index
- Azure Storage Blob Python SDK reference
About
Python samples for Media Services v3
Resources
License
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors10
Uh oh!
There was an error while loading.Please reload this page.