{"id":20159496,"url":"https://github.com/hvalfangst/azure-service-bus-queue-python","last_synced_at":"2026-05-06T15:32:59.156Z","repository":{"id":262421428,"uuid":"886941370","full_name":"hvalfangst/azure-service-bus-queue-python","owner":"hvalfangst","description":"Python FastAPI integrated with Azure Service Bus Queues","archived":false,"fork":false,"pushed_at":"2024-11-12T13:29:34.000Z","size":102,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-13T13:32:00.958Z","etag":null,"topics":["ampq","api","az-204","az-cli","azure","azure-service-bus","azure-service-bus-queue","fastapi","python","queue"],"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-11T22:15:10.000Z","updated_at":"2024-11-13T22:17:15.000Z","dependencies_parsed_at":"2024-11-14T00:08:32.180Z","dependency_job_id":null,"html_url":"https://github.com/hvalfangst/azure-service-bus-queue-python","commit_stats":null,"previous_names":["hvalfangst/azure-service-bus-python","hvalfangst/azure-service-bus-queue-python"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hvalfangst%2Fazure-service-bus-queue-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hvalfangst%2Fazure-service-bus-queue-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hvalfangst%2Fazure-service-bus-queue-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hvalfangst%2Fazure-service-bus-queue-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hvalfangst","download_url":"https://codeload.github.com/hvalfangst/azure-service-bus-queue-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241597240,"owners_count":19988211,"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":["ampq","api","az-204","az-cli","azure","azure-service-bus","azure-service-bus-queue","fastapi","python","queue"],"created_at":"2024-11-14T00:08:36.958Z","updated_at":"2026-05-06T15:32:54.126Z","avatar_url":"https://github.com/hvalfangst.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python API integrated with Azure Service Bus Queue\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. \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[Service Bus Namespace]\n    C --\u003e E[Service Bus 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\nTENANT_ID={TO_BE_SET_BY_YOU_MY_FRIEND}\nSUBSCRIPTION_ID={TO_BE_SET_BY_YOU_MY_FRIEND}\nLOCATION=northeurope\nRESOURCE_GROUP_NAME=hvalfangstresourcegroup\nSERVICE_BUS_NAMESPACE=hvalfangstservicebusnamespace\nQUEUE_NAME=hvalfangstqueue\n```\n\n## Deallocate resources\n\nThe shell script [delete_resources](infra/delete_resources.sh) deletes our Azure service bus queue, namespace and resource group.\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 **service_bus_config.env** is expected to exist in the\n[client](client) directory. It is used by our service bus [configuration](client/config/service_bus.py) class, which reads values from aforementioned files and maps them to it accordingly.\nIt contains the means to reach our Service Bus Namespace.\n\n### Structure of 'client/service_bus_config.env'\n```bash\nCONNECTION_STRING={TO_BE_SET_BY_YOU_MY_FRIEND}\nQUEUE_NAME=hvalfangstqueue\n```\n\nYou can get hold of the namespace connection string either by peeking in your terminal logs as it was actually echoed (yes, I know) as part of our [infrastructure provisioning](infra/provision_resources.sh)\nOR you can go for **ClickOps** approach and copy it from the **Shared access policies** under your **Service Bus Namespace** on Azure - as the screenshot below illustrates.\n\n![img.png](images/service_bus_namespace_sas.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) has been provided,\nwhich contains example requests for interacting with our [queue](client/routers/queue.py).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhvalfangst%2Fazure-service-bus-queue-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhvalfangst%2Fazure-service-bus-queue-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhvalfangst%2Fazure-service-bus-queue-python/lists"}