{"id":25105268,"url":"https://github.com/stanmiglight/lab1","last_synced_at":"2026-05-01T14:33:34.178Z","repository":{"id":264325131,"uuid":"864802355","full_name":"stanmiglight/Lab1","owner":"stanmiglight","description":"This FastAPI service handles a user database with CRUD operations for users identified by user_id and name.","archived":false,"fork":false,"pushed_at":"2025-01-30T04:22:55.000Z","size":14425,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T08:16:37.699Z","etag":null,"topics":["fastapi","python","school-project"],"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/stanmiglight.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-09-29T07:47:03.000Z","updated_at":"2025-01-30T05:00:10.000Z","dependencies_parsed_at":"2025-01-30T05:30:01.666Z","dependency_job_id":null,"html_url":"https://github.com/stanmiglight/Lab1","commit_stats":null,"previous_names":["stanmiglight/lab1"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stanmiglight/Lab1","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stanmiglight%2FLab1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stanmiglight%2FLab1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stanmiglight%2FLab1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stanmiglight%2FLab1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stanmiglight","download_url":"https://codeload.github.com/stanmiglight/Lab1/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stanmiglight%2FLab1/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32501402,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["fastapi","python","school-project"],"created_at":"2025-02-07T22:52:59.875Z","updated_at":"2026-05-01T14:33:34.149Z","avatar_url":"https://github.com/stanmiglight.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Factorial Calculator API\n\nThis is a simple FastAPI-based web service that calculates the factorial of a given integer. The API provides an endpoint where you can send a number, and it will return the factorial of that number.\n\n## Features\n\n- **FastAPI**: A modern, fast (high-performance) web framework for building APIs with Python 3.7+ based on standard Python type hints.\n- **Factorial Calculation**: The API calculates the factorial of a given integer using a while loop.\n- **Error Handling**: If the input number is 0, the API returns `{ \"result\": false }` since the factorial of 0 is not defined in this implementation.\n\n## Installation\n\n### Clone the repository:\n\n```bash\ngit clone https://github.com/yourusername/factorial-api.git\ncd factorial-api\n```\n\n### Set up a virtual environment (optional but recommended):\n\n```bash\npython -m venv venv\nsource venv/bin/activate  # On Windows use `venv\\Scripts\\activate`\n```\n\n### Install dependencies:\n\n```bash\npip install fastapi uvicorn\n```\n\n### Run the application:\n\n```bash\nuvicorn main:app --reload\n```\n\nThe `--reload` flag enables auto-reloading, so the server will restart whenever you make changes to the code.\n\n## Usage\n\nOnce the server is running, you can access the API at [http://127.0.0.1:8000](http://127.0.0.1:8000).\n\n### Endpoint\n\n`GET /factorial/{starting_number}`: Calculates the factorial of the provided integer.\n\n#### Example Request:\n\n```bash\ncurl -X GET \"http://127.0.0.1:8000/factorial/5\"\n```\n\n#### Example Response:\n\n```json\n{\n  \"result\": 120\n}\n```\n\n#### Example Request for 0:\n\n```bash\ncurl -X GET \"http://127.0.0.1:8000/factorial/0\"\n```\n\n#### Example Response:\n\n```json\n{\n  \"result\": false\n}\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n\n## Acknowledgments\n\n- **Sir Paulo** for the idea!\n- **FastAPI** for providing an easy-to-use and high-performance web framework.\n- **Python** for being awesome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstanmiglight%2Flab1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstanmiglight%2Flab1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstanmiglight%2Flab1/lists"}