{"id":15091172,"url":"https://github.com/christopheratkinson/application-programming-interface-template","last_synced_at":"2026-02-09T15:35:51.645Z","repository":{"id":248749249,"uuid":"829424365","full_name":"ChristopherAtkinson/application-programming-interface-template","owner":"ChristopherAtkinson","description":"Welcome to the Python REST API Template repository! This template is designed to help you quickly set up a new REST API service using FastAPI, and includes additional configurations for unit testing with pytest, and GitHub action integrations for CI/CD.","archived":false,"fork":false,"pushed_at":"2024-07-17T09:08:47.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T10:47:22.178Z","etag":null,"topics":["automated-testing","backend","continuous-integration","coverage","documentation","fastapi","github-actions","openapi","pytest","python","rest-api","server","swagger"],"latest_commit_sha":null,"homepage":"","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/ChristopherAtkinson.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-07-16T11:59:52.000Z","updated_at":"2024-07-17T09:52:41.000Z","dependencies_parsed_at":"2024-11-28T20:43:47.615Z","dependency_job_id":null,"html_url":"https://github.com/ChristopherAtkinson/application-programming-interface-template","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"e2b4e749b09854acc0fd74748dc20a55eef35bbc"},"previous_names":["christopheratkinson/application-programming-interface-template"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChristopherAtkinson%2Fapplication-programming-interface-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChristopherAtkinson%2Fapplication-programming-interface-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChristopherAtkinson%2Fapplication-programming-interface-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChristopherAtkinson%2Fapplication-programming-interface-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChristopherAtkinson","download_url":"https://codeload.github.com/ChristopherAtkinson/application-programming-interface-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244945596,"owners_count":20536295,"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":["automated-testing","backend","continuous-integration","coverage","documentation","fastapi","github-actions","openapi","pytest","python","rest-api","server","swagger"],"created_at":"2024-09-25T10:36:10.866Z","updated_at":"2026-02-09T15:35:51.581Z","avatar_url":"https://github.com/ChristopherAtkinson.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e [!IMPORTANT]\n\u003e Distributed under the MIT License. See [LICENSE](LICENSE) for more information.\n\n# Application Programming Interface [Template]\n\nWelcome to the Python REST API Template repository! This template is designed to help you quickly set up a new REST API service using FastAPI, and includes additional configurations for unit testing with `pytest`, and GitHub action integrations for CI/CD. Follow the steps below to get started.\n\n## Cloning Repository\n\n```console\n$ git clone https://github.com/ChristopherAtkinson/application-programming-interface-template.git\n```\n\n```console\n$ cd application-programming-interface-template\n```\n\n## Environment Variables\n\n\u003e [!CAUTION]\n\u003e Any environment variables which does not specify a default value is required to be added to your .env file.\n\n```console\n$ python -m venv .venv\n```\n\nThe project relies on the following environment variables. \n\n| Key       | Value     | Description                      | Default |\n|:----------|:----------|:---------------------------------|:--------|\n| `EXAMPLE` | `example` | An example environment variables | `None`  |\n\n## Installing Dependencies\n\n\u003e [!TIP]\n\u003e The venv module supports creating lightweight **virtual environments**, each with their own independent set of Python packages installed.\n\n```console\n$ pip install -r requirements.txt\n```\n\n## Running Development Server\n\n\u003e [!WARNING]\n\u003e The ```--reload``` option consumes much more resources and is unstable. This should not use it in production.\n\nFastAPI uses a standard for building Python web frameworks and servers called ASGI. FastAPI is an ASGI web framework.\n\nThis application is using the recommended uvicorn module, this is the one that comes by default in the fastapi command.\n\n```console\n$ uvicorn main:app --host 0.0.0.0 --port 8000 --reload\n\nINFO:     Will watch for changes in these directories: ['/home/user/code/awesomeapp']\nINFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)\nINFO:     Started reloader process [2248755] using WatchFiles\nINFO:     Started server process [2248757]\nINFO:     Waiting for application startup.\nINFO:     Application startup complete.\n```\n\n## Unit Test \u0026 Code Coverage \n\nThe following application has included unit tests using the pytest module. \n\n```console\n$ python -m pytest\n\n  tests\\test_main.py . \n```\n\nThis application also include cover coverage tools using the coverage module.\n\n```console\n$ coverage run -m pytest; coverage report -m\n\n  Name                 Stmts   Miss  Cover   Missing\n  --------------------------------------------------\n  main.py                  5      0   100%\n  tests\\test_main.py       7      0   100%\n  --------------------------------------------------\n  TOTAL                   12      0   100%\n```\n\n## Documentation\n\n\u003e [!TIP]\n\u003e Documentation available on http://127.0.0.1:8000/docs while server is running.\n\nFastAPI automatically generates interactive API documentation based on the Python code and type annotations. \n\nThis documentation includes detailed information about endpoints, request/response models, and parameter descriptions.\n\n## Continuous Integration \u0026 Continuous Deployment\n\nThis application includes some general GitHub actions and workflows for continuous integration \u0026 continuous deployment.\n\n| Workflow (filename)                                                         | Description                                                                                                                                                      |\n|:----------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `run_coverage_on_pytest_check_test_coverage_minimum_90_percent.yaml`        | Executes coverage to ensure test coverage meets a minimum threshold of 90%, validating comprehensive testing of Python code.                                     |\n| `run_pytest_python_source_unit_tests_ensures_correct_behavior.yaml`         | Executes pytest on Python source code, running unit tests to verify expected behaviors and ensure code functionality correctness.                                |\n| `static_code_analysis_pylint_python_source_validates_coding_standards.yaml` | Uses Pylint to perform static code analysis on Python source code, ensuring adherence to coding standards and identifying potential errors and style violations. |\n\n## License\n\nDistributed under the MIT License. See [LICENSE](LICENSE) for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristopheratkinson%2Fapplication-programming-interface-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchristopheratkinson%2Fapplication-programming-interface-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristopheratkinson%2Fapplication-programming-interface-template/lists"}