{"id":20005642,"url":"https://github.com/digitaldias/python-examples","last_synced_at":"2026-05-09T12:34:18.342Z","repository":{"id":90536449,"uuid":"168131263","full_name":"digitaldias/Python-Examples","owner":"digitaldias","description":"Examples of stuff I find useful for developing my Python skills","archived":false,"fork":false,"pushed_at":"2019-12-04T11:36:03.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-12T13:51:20.701Z","etag":null,"topics":["azure-devops","azure-functions","ci-cd","python36"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/digitaldias.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2019-01-29T09:53:52.000Z","updated_at":"2019-12-04T11:36:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"7a6296e1-a328-41fa-af62-d264a75a47c1","html_url":"https://github.com/digitaldias/Python-Examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaldias%2FPython-Examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaldias%2FPython-Examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaldias%2FPython-Examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaldias%2FPython-Examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digitaldias","download_url":"https://codeload.github.com/digitaldias/Python-Examples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241444073,"owners_count":19963754,"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":["azure-devops","azure-functions","ci-cd","python36"],"created_at":"2024-11-13T05:41:36.588Z","updated_at":"2026-05-09T12:34:13.312Z","avatar_url":"https://github.com/digitaldias.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python-Examples\nThis is a collection of scripts and other useful stuff that I'm collecting for my journey in learning Python. \n\n| Things I've struggled with that are now resolved | \n| ---------------- |\n| [Tree Kata - Python version](https://github.com/digitaldias/Python-Examples/blob/master/code/TreeKata_NonOop.py) |\n| [FunctionApp Build Script for Azure Devops](https://github.com/digitaldias/Python-Examples/blob/master/build-and-test.yaml) |\n| [FunctionApp Release Script for Azure Devops](https://github.com/digitaldias/Python-Examples/blob/master/deploy-to-functionapp.sh) |\n\n\nLook below for a brief explanation of the rationale behind each of the solutions I've found\n\n-----\n### Tree Kata - Python Version\nOne of my more popular code katas, \"The animated Tree\", originally designed by Seb-Lee Delisle (@seblee) was a fun challenge to port over to Python. In this example, I've opted for the non-OOP version of the code, and I am lacking the render speed to animate the tree properly. Future versions will include animation. \n\n### Build script for Azure FunctionApp written in Python\nWell, Python does NOT produce a build output as it is an interpreted language, so what is the reasoning for looking at this as a \"Build\"?\nThe answer is simple, during build, what we aim to do is two things:\n* Create a virtual execution environment for Python to operate in, so that if the host changes versions, the function will not be affected\n* Execute all unit-tests within the function space, so we can rely on the logic not having changed as a cause of the commit\n\nThe output of this \"build\" is therefore a drop folder where the virtual environment is part of the items that will be deployed. \n\n### Release script for the Azure Function app\nThe scripts as well as the virtual environment are now deployed to a drop folder that can be picked up by a bash script in the release pipeline. The steps here are simply: \n* Install the Azure Functions Core tools in order to be able to publish the functionapp\n* Activate the virtual environment produced during build\n* Retrieve all settings from the existing function app in azure (this step is required as the settings are encrypted)\n* Calling \"publish\" to transfer the code into a working python FunctionApp in Azure\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitaldias%2Fpython-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigitaldias%2Fpython-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitaldias%2Fpython-examples/lists"}