{"id":21566337,"url":"https://github.com/abynxv/crud-fastapi","last_synced_at":"2026-05-18T22:08:29.464Z","repository":{"id":249696057,"uuid":"832287641","full_name":"abynxv/CRUD-FastAPI","owner":"abynxv","description":"This project demonstrates a simple CRUD (Create, Read, Update, Delete) application using the FastAPI framework. It is designed to manage departments and employees within an organization. The project includes endpoints for creating, reading, updating, and deleting records in a SQLite database, leveraging SQLAlchemy for ORM ","archived":false,"fork":false,"pushed_at":"2024-07-22T18:29:54.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-24T12:12:06.753Z","etag":null,"topics":["fastapi","python","sqlalchemy","sqlite3"],"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/abynxv.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-07-22T17:53:26.000Z","updated_at":"2024-07-22T18:29:57.000Z","dependencies_parsed_at":"2024-07-22T20:38:21.194Z","dependency_job_id":null,"html_url":"https://github.com/abynxv/CRUD-FastAPI","commit_stats":null,"previous_names":["abynxv/crud-fastapi"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abynxv%2FCRUD-FastAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abynxv%2FCRUD-FastAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abynxv%2FCRUD-FastAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abynxv%2FCRUD-FastAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abynxv","download_url":"https://codeload.github.com/abynxv/CRUD-FastAPI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244160447,"owners_count":20408103,"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":["fastapi","python","sqlalchemy","sqlite3"],"created_at":"2024-11-24T10:24:40.208Z","updated_at":"2026-05-18T22:08:29.423Z","avatar_url":"https://github.com/abynxv.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CRUD-FastAPI\n\nThis project demonstrates a simple CRUD (Create, Read, Update, Delete) application using the FastAPI framework. It is designed to manage departments and employees within an organization. The project includes endpoints for creating, reading, updating, and deleting records in a SQLite database, leveraging SQLAlchemy for ORM (Object-Relational Mapping) and Pydantic for data validation.\n\n# Setup Instructions\n\n  -\u003e Create a directory, open cmd in directory path  and clone CRUD-FastAPI project\n  \n      https://github.com/abynxv/CRUD-FastAPI.git\n\n  -\u003e Install Virtual environment\n  \n      pip install virtualenv\n\n  -\u003e Create virtual environment within the directory. \n  \n      python -m venv venv_name  # On Windows\n      python3 -m venv venv_name  # On macOS/Linux\n\n  -\u003e Activate virtual environmant    \n  \n      venv_name\\Scripts\\activate       # On Windows           \n      source venv_name/bin/activate     # On macOS/Linux\n\n  -\u003e Install requirements.txt\n  \n      pip install -r requirements.txt\n\n  -\u003e Open Project in VScode\n \n      code .\n\n  -\u003e Open terminal in vscode, navigate to project directory, Run the server and follow link\n\n      cd fastapi_project\n      uvicorn app.main:app --reload\n\n# CRUD-FastAPI Project API Endpoints\n\nDepartments\n\n1.Create a Department\n\n    Endpoint    : POST /departments/\n    Description : Create a new department.\n    Request Body:\n    {\n      \"name\"                : \"string\",\n      \"number_of_employees\" : 0\n    }\n    Response:\n    {\n      \"id\"                  : \"integer\",\n      \"name\"                : \"string\",\n      \"number_of_employees\" : \"integer\"\n    }\n2.Get a Department by ID\n\n    Endpoint    : GET /departments/{department_id}\n    Description : Retrieve a department by its ID.\n    Response    :\n    {\n      \"id\"                  : \"integer\",\n      \"name\"                : \"string\",\n      \"number_of_employees\" : \"integer\"\n    }\n\n3.Get All Departments\n\n    Endpoint    : GET /departments/\n    Description : Retrieve a list of all departments.\n    Parameters  :\n                skip    : Integer, number of records to skip (default: 0)\n                limit   : Integer, maximum number of records to return (default: 100)\n    Response:\n    [\n    {\n      \"id\"                 : \"integer\",\n      \"name\"               : \"string\",\n      \"number_of_employees\": \"integer\"\n    }\n    ]\n\n4.Update a Department by ID\n\n    Endpoint    : PUT /departments/{department_id}\n    Description : Update an existing department by its ID.\n    Request Body:\n    {\n      \"name\": \"string\",\n      \"number_of_employees\": \"integer\"\n    }\n    Response    :\n    {\n      \"id\"                  : \"integer\",\n      \"name\"                : \"string\",\n      \"number_of_employees\" : \"integer\"\n    }\n5.Delete a Department by ID\n\n    Endpoint    : DELETE /departments/{department_id}\n    Description : Delete a department by its ID.\n    Response    :\n    {\n      \"id\"                  : \"integer\",\n      \"name\"                : \"string\",\n      \"number_of_employees\" : \"integer\"\n    }\n\nEmployees\n\n1.Create an Employee\n\n    Endpoint    : POST /employees/\n    Description : Create a new employee.\n    Request Body:\n    {\n      \"name\"          : \"string\",\n      \"department_id\" : \"integer\"\n    }\n    Response:\n    {\n      \"id\"            : \"integer\",\n      \"name\"          : \"string\",\n      \"department_id\" : \"integer\"\n    }\n\n2.Get an Employee by ID\n\n    Endpoint    : GET /employees/{employee_id}\n    Description : Retrieve an employee by its ID.\n    Response    :\n    {\n      \"id\"            : \"integer\",\n      \"name\"          : \"string\",\n      \"department_id\" : \"integer\"\n    }\n\n3.Get All Employees\n\n    Endpoint    : GET /employees/\n    Description : Retrieve a list of all employees.\n    Parameters  :\n                skip  : Integer, number of records to skip (default: 0)\n                limit : Integer, maximum number of records to return (default: 100)\n    Response````:\n    [\n    {\n     \"id\": \"integer\",\n     \"name\": \"string\",\n     \"department_id\": \"integer\"\n    }\n    ]\n\n4.Update an Employee by ID\n\n    Endpoint    : PUT /employees/{employee_id}\n    Description : Update an existing employee by its ID.\n    Request Body:\n    {\n      \"name\"          : \"string\",\n      \"department_id\" : \"integer\"\n    }\n    Response:\n    {\n      \"id\"            : \"integer\",\n      \"name\"          : \"string\",\n      \"department_id\" : \"integer\"\n    }\n\nDelete an Employee by ID\n\n    Endpoint    : DELETE /employees/{employee_id}\n    Description : Delete an employee by its ID.\n    Response    :\n    {\n      \"id\": \"integer\",\n      \"name\": \"string\",\n      \"department_id\": \"integer\"\n    }\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabynxv%2Fcrud-fastapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabynxv%2Fcrud-fastapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabynxv%2Fcrud-fastapi/lists"}