{"id":20159505,"url":"https://github.com/hvalfangst/azure-queue-storage-python","last_synced_at":"2026-05-09T19:37:09.163Z","repository":{"id":262097074,"uuid":"886003560","full_name":"hvalfangst/azure-queue-storage-python","owner":"hvalfangst","description":"FastAPI intregrated with Azure Storage Queues","archived":false,"fork":false,"pushed_at":"2024-11-12T09:14:26.000Z","size":107,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-13T13:32:00.021Z","etag":null,"topics":["az-204","azure","azure-storage","azure-storage-queue","fastapi","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hvalfangst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-09T23:38:55.000Z","updated_at":"2024-11-12T09:14:30.000Z","dependencies_parsed_at":"2024-11-10T14:50:24.963Z","dependency_job_id":null,"html_url":"https://github.com/hvalfangst/azure-queue-storage-python","commit_stats":null,"previous_names":["hvalfangst/azure-queue-storage-python"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hvalfangst%2Fazure-queue-storage-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hvalfangst%2Fazure-queue-storage-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hvalfangst%2Fazure-queue-storage-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hvalfangst%2Fazure-queue-storage-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hvalfangst","download_url":"https://codeload.github.com/hvalfangst/azure-queue-storage-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241597250,"owners_count":19988213,"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":["az-204","azure","azure-storage","azure-storage-queue","fastapi","python"],"created_at":"2024-11-14T00:08:40.235Z","updated_at":"2026-05-09T19:37:04.138Z","avatar_url":"https://github.com/hvalfangst.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python API integrated with Azure Storage Queues\n\n## Requirements\n\n- **Platform**: x86-64, Linux/WSL\n- **Programming Language**: [Python 3](https://www.python.org/downloads/)\n- **Cloud Account**: [Azure](https://azure.microsoft.com/en-us/pricing/purchase-options/azure-account)\n- **Resource provisioning**: [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/)\n\n\n## Allocate resources\n\nThe shell script [provision_resources](infra/provision_resources.sh) creates Azure resources by calling the Azure CLI, which in turn\nmakes HTTP calls to the resource-specific API on Azure (Storage Account API). \n\nIt will create the following hierarchy of resources:\n\n```mermaid\ngraph TD\n    A[Subscription]\n    A --\u003e B[Resource Group]\n    B --\u003e C[Storage Account]\n    C --\u003e E[Queue]\n\n    A --\u003e|Contains| B\n    B --\u003e|Contains| C\n    C --\u003e|Contains| E\n```\n\nFor this script to work it is necessary to have a configuration file named **infra_config.env** in your [infra](infra) directory. It contains sensitive information\nsuch as tenant and subscription id as well as information used to reference resources. The file has been added to our [.gitignore](.gitignore) so that you don't accidentally commit it.\n### Structure of 'infra/infra_config.env'\n```bash\nLOCATION=northeurope\nRESOURCE_GROUP_NAME=hvalfangstresourcegroup\nSTORAGE_ACCOUNT_NAME=hvalfangststorageaccount\nQUEUE_NAME=hvalfangstqueue\nTENANT_ID={TO_BE_SET_BY_YOU_MY_FRIEND}\nSUBSCRIPTION_ID={TO_BE_SET_BY_YOU_MY_FRIEND}\n```\n\n## Client config\n\nOnce you have provisioned the Azure resources, there is one last configuration file which has to be created. The file **storage_account_config.env** is expected to exist in the\n [client](client) directory. It is used by our storage account [config](client/config/storage_account.py) class, which reads values from aforementioned files and maps them to the class accordingly.\nIt contains the means to reach our Storage Account, which again contains our beloved Queue. It is important to note that we are here utilizing connection string for sake of simplicity. In\nproduction, you should probably opt for a **SAS token** or **Managed Identity**.\n\n### Structure of 'client/storage_account_config.env'\n```bash\nCONNECTION_STRING={TO_BE_SET_BY_YOU_MY_FRIEND}\nQUEUE_NAME=hvalfangstqueue\n```\n\nYou can get hold of the storage account connection string either by peeking in your terminal logs as it was actually echoed as part of our [infrastructure provisioning](infra/provision_resources.sh)\nOR you can go for **ClickOps** approach and copy it from your **Storage Account** on Azure as the screenshot below illustrates.\n\n![img.png](images/img.png)\n\n\n## Running API\n\nThe shell script [run_client](client/run_client.sh) creates a new virtual environment based on our [requirements](client/requirements.txt) file and serves our \nAPI on port 8000 using uvicorrn.\n\n\n\nA [Postman Collection](client/postman/hvalfangst-azure-queue-storage.postman_collection.json) has been provided,\nwhich contains example requests for interacting with our [queue](client/routers/queue.py).\n\n\n## Delete resources\n\nThe shell script [delete_resources](infra/delete_resources.sh) deletes our queue, storage account and resource group. \n\n## On Azure Storage Queues\n\nAzure Storage Queues provide a basic but highly scalable queuing solution within the Azure ecosystem. \nThese queues are ideal for applications requiring a **simple** queuing mechanism with large storage capacity, allowing up to **500 TB** of storage per queue. Each message can be up to **64 KB** in size, and for larger payloads, you can use Azure Blobs to store additional data. \n\nBy default, Storage Queues offer an infinite Time-to-Live (TTL) for messages, and they allow configurable visibility timeouts, which help manage message processing and redelivery.\nIn terms of ordering and delivery guarantees, Azure Storage Queues offer basic queuing capabilities but do **not strictly enforce FIFO** (First-In-First-Out) ordering. \nIf a message's visibility timeout expires, it may be processed again, resulting in **potential message reordering**. \nAdditionally, the queues guarantee only **At-Least-Once delivery**, which ensures that messages will eventually be processed but may result in duplicates under certain conditions.\n\nThis queue type is best suited for applications that handle large volumes of simple messages (above 80 GB) without needing advanced processing features, \nsuch as logging systems, basic process workflows, or applications that primarily need a scalable and straightforward message storage solution.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhvalfangst%2Fazure-queue-storage-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhvalfangst%2Fazure-queue-storage-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhvalfangst%2Fazure-queue-storage-python/lists"}