Azure Functions link shortener for calex.dev
Requires the following environment variables be set within local.settings.json.
BASE_URL= Base url (e.g.https://links.mydomain.com) used to create the short url (e.g.https://links.mydomain.com/a)STORAGE_ACCOUNT_NAME= Azure storage account name where the Azure table will be storedSTORAGE_ACCOUNT_KEY= Azure storage account key where the Azure table will be stored
Requires the following environment variables be set within the Azure Function Application settings.
BASE_URL= Base url (e.g.https://links.mydomain.com) used to create the short url (e.g.https://links.mydomain.com/a)STORAGE_ACCOUNT_NAME= Azure storage account name where the Azure table will be storedSTORAGE_ACCOUNT_KEY= Azure storage account key where the Azure table will be stored
There is a simple Python client within the client directory that can be used to call the WriteShortUrl, DeleteShortUrl, and GetAllUrls Azure Functions.
The following environment variable must be set locally.
AZURE_WRITESHORTURL_URL= Azure Function urlAZURE_GETALLURLS_URL= Azure Function urlAZURE_DELETESHORTURL_URL= Azure Function url
To get help, run the following.
python main.py --helpAlternatively, run help for a specific subcommand.
python main.py write --helppython main.py get --helppython main.py delete --help