{"id":23329056,"url":"https://github.com/code-and-sorts/cookie-py-az-func-api","last_synced_at":"2025-04-07T08:59:05.783Z","repository":{"id":254366583,"uuid":"846313389","full_name":"Code-and-Sorts/cookie-py-az-func-api","owner":"Code-and-Sorts","description":"Example Python Azure Function App project using the Cookiecutter API template.","archived":false,"fork":false,"pushed_at":"2024-08-23T01:00:40.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T12:42:55.514Z","etag":null,"topics":["azure-functions","cookiecutter","example","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"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/Code-and-Sorts.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":"2024-08-23T00:21:56.000Z","updated_at":"2024-11-25T04:01:44.000Z","dependencies_parsed_at":"2024-08-23T02:18:05.720Z","dependency_job_id":null,"html_url":"https://github.com/Code-and-Sorts/cookie-py-az-func-api","commit_stats":null,"previous_names":["code-and-sorts/cookie-py-az-func-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-and-Sorts%2Fcookie-py-az-func-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-and-Sorts%2Fcookie-py-az-func-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-and-Sorts%2Fcookie-py-az-func-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-and-Sorts%2Fcookie-py-az-func-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Code-and-Sorts","download_url":"https://codeload.github.com/Code-and-Sorts/cookie-py-az-func-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247623009,"owners_count":20968574,"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-functions","cookiecutter","example","python"],"created_at":"2024-12-20T21:31:28.639Z","updated_at":"2025-04-07T08:59:05.750Z","avatar_url":"https://github.com/Code-and-Sorts.png","language":"Python","readme":"# Kitten-Claws API\n\n\u003e [!IMPORTANT]  \n\u003e This example Python Azure Function API was generated using the [Cookiecutter API](https://github.com/Code-and-Sorts/cookiecutter-api) template.\n\n## Overview\n\nThis project is a Python-based REST API built using [Azure Function Apps](https://learn.microsoft.com/en-us/azure/azure-functions/). The API leverages Azure's serverless architecture, allowing you to deploy and scale functions effortlessly in the cloud. The HTTP-triggered functions serve as the endpoints for the API, providing a seamless way to handle client requests.\n\nThe REST API has the following endpoints:\n- GET (by ID)\n- GET (list)\n- POST\n- PATCH\n- DELETE (soft-delete)\n\nDependency management is handled using [Poetry](https://python-poetry.org/), ensuring a streamlined and consistent environment for managing Python packages and their dependencies.\n\n## Features\n\n- Azure Function Apps: Utilizes Azure's serverless platform to create scalable and efficient endpoints with HTTP triggers.\n\n- Python-Based: Written entirely in Python, leveraging its rich ecosystem and libraries for rapid development.\n\n- Poetry for Dependency Management: Manages all Python dependencies with Poetry, making the development environment consistent and easy to set up.\n\n- Cosmos DB NoSQL Account: This project uses Cosmos DB NoSQL database.\n\n## Prerequisites\n\n- Python \u003e=3.7, \u003c=3.11\n\n- [Azure Functions Core Tools](https://github.com/Azure/azure-functions-core-tools): To run the Function Apps locally.\n\n- [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/): To deploy and manage Azure Function Apps.\n\n- [Poetry](https://python-poetry.org/): For dependency management and virtual environment setup.\n\n- Azure Account: An active Azure subscription for deploying the Function App.\n\n- Cosmos DB NoSQL Account either deployed in Azure or [emulated](https://learn.microsoft.com/en-us/azure/cosmos-db/how-to-develop-emulator?tabs=docker-linux%2Ccsharp\u0026pivots=api-nosql).\n\n## Setup and Installation\n\n1. Install Azure Functions Core Tools\n\n    Follow the [documentation](https://learn.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=windows%2Cisolated-process%2Cnode-v4%2Cpython-v2%2Chttp-trigger%2Ccontainer-apps\u0026pivots=programming-language-python#install-the-azure-functions-core-tools) to install Azure Function Core Tools based on your operating system.\n\n2. Install Poetry\n\n    If you haven't already installed Poetry, you can do so by following the [official installation guide](https://python-poetry.org/docs/).\n\n3. Install Dependencies\n\n    Install all dependencies and set up the virtual environment:\n\n    ```console\n    make install\n    ```\n\n    To be able to run the project locally, set the environment variable values in the local.settings.json project file.\n\n4. Run the API Locally\n\n    ```console\n    make run\n    ```\n\n    This command starts the local development server using the Azure Function Core Tools, where you can interact with your API endpoints.\n\n5. Thunderclient\n\n    Included in the project is a [Thunderclient](https://www.thunderclient.com/) collection in the .thunderclient directory to easily test the locally hosted APIs.\n\n## Development Workflow\n\n### Adding a New Dependency\n\n```bash\npoetry add \u003cpackage-name\u003e\n```\n\n### Removing a Dependency\n\n```bash\npoetry remove \u003cpackage-name\u003e\n```\n\n## Running Tests\n\nEnsure your code is working as expected by running unit tests using pytest:\n\n```bash\nmake test\n```\n\n## Repository structure\n\n```text\n├── cookiecutter-template-python\n│   ├── .thunderclient     - Thunderclient collection\n│   ├── blueprints         - Function App methods\n│   ├── controllers        - Controllers\n│   ├── errors             - Custom errors\n│   ├── models             - Pydantic models\n│   ├── repositories       - Cosmos DB repository\n│   ├── services           - Services\n│   └── utils              - Error detect \u0026 response generator utilities\n│\n└── function_app.py        - Function App entry method\n```\n\n## License\n\nThis project is licensed under the MIT License. See the LICENSE file for details.\n\n---\n\nRepository generated with [Code-and-Sorts/cookiecutter-api](https://github.com/Code-and-Sorts/cookiecutter-api).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-and-sorts%2Fcookie-py-az-func-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode-and-sorts%2Fcookie-py-az-func-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-and-sorts%2Fcookie-py-az-func-api/lists"}