{"id":26085131,"url":"https://github.com/msnonari/employee-rest-api","last_synced_at":"2026-04-09T02:02:38.138Z","repository":{"id":281395761,"uuid":"945142982","full_name":"msnonari/Employee-REST-API","owner":"msnonari","description":"A simple Employee CRUD (Create, Read, Update, Delete) REST API built using Python and Flask, with SQLite as the database. This API allows you to manage employee records, including creating new employees, retrieving employee details, updating existing employee information, and deleting employees.","archived":false,"fork":false,"pushed_at":"2025-03-09T16:23:25.000Z","size":51,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-26T13:38:17.640Z","etag":null,"topics":["api","backend","crud","crud-api","crud-application","database","flask","http","json","microservices","python","rest-api","sqlite","web-development"],"latest_commit_sha":null,"homepage":"https://github.com/msnonari/Employee-REST-API","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/msnonari.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,"zenodo":null}},"created_at":"2025-03-08T18:54:23.000Z","updated_at":"2025-03-24T15:05:50.000Z","dependencies_parsed_at":"2025-07-26T09:30:51.456Z","dependency_job_id":"7b064b5c-6b53-4dfe-ad34-646d4d975ae1","html_url":"https://github.com/msnonari/Employee-REST-API","commit_stats":null,"previous_names":["msnonari/employee-rest-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/msnonari/Employee-REST-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msnonari%2FEmployee-REST-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msnonari%2FEmployee-REST-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msnonari%2FEmployee-REST-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msnonari%2FEmployee-REST-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msnonari","download_url":"https://codeload.github.com/msnonari/Employee-REST-API/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msnonari%2FEmployee-REST-API/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31581864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"online","status_checked_at":"2026-04-09T02:00:06.848Z","response_time":112,"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":["api","backend","crud","crud-api","crud-application","database","flask","http","json","microservices","python","rest-api","sqlite","web-development"],"created_at":"2025-03-09T05:34:11.774Z","updated_at":"2026-04-09T02:02:38.123Z","avatar_url":"https://github.com/msnonari.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Employee CRUD API\n\nA simple Employee CRUD (Create, Read, Update, Delete) REST API built using Python and Flask, with SQLite as the database. This API allows you to manage employee records, including creating new employees, retrieving employee details, updating existing employee information, and deleting employees.\n\n## Features\n\n- Retrieve all employees\n- Retrieve an employee by their ID\n- Create a new employee\n- Update an existing employee's details\n- Delete an employee\n\n## Requirements\n\n- Python 3.6+\n- Flask\n- SQLite\n\n## Installation\n\n1. Clone the repository:\n\n   ```sh\n   git clone https://github.com/msnonari/Employee-REST-API.git\n   cd Employee-REST-API\n   ```\n\n2. Create a virtual environment and activate it:\n\n   ```sh\n   python -m venv venv\n   source venv/bin/activate  # On Windows use `venv\\Scripts\\activate`\n   ```\n\n3. Install the required packages:\n\n   ```sh\n   pip install -r requirements.txt\n   ```\n\n4. Create the SQLite database and the `Employee` table:\n\n   ```sh\n   sqlite3 EmpData.db \u003c schema.sql\n   ```\n\n## Usage\n\n1. Run the Flask application:\n\n   ```sh\n   python app.py\n   ```\n\n2. The API will be available at `http://127.0.0.1:5000`.\n\n## API Endpoints\n\n- `GET /`: Home route to check if the API is running.\n- `GET /emp`: Retrieve all employees.\n- `GET /emp/\u003cint:emp_id\u003e`: Retrieve an employee by their ID.\n- `POST /emp`: Create a new employee.\n- `PUT /emp/\u003cint:emp_id\u003e`: Update an existing employee's details.\n- `DELETE /emp/\u003cint:emp_id\u003e`: Delete an employee.\n\n## Example Requests\n\n### Retrieve all employees\n\n```sh\ncurl -X GET http://127.0.0.1:5000/emp\n```\n\n### Retrieve an employee by ID\n\n```sh\ncurl -X GET http://127.0.0.1:5000/emp/1\n```\n\n### Create a new employee\n\n```sh\ncurl -X POST http://127.0.0.1:5000/emp -H \"Content-Type: application/json\" -d '{\"first_name\": \"John\", \"last_name\": \"Doe\", \"age\": 30, \"email\": \"john.doe@example.com\", \"gender\": \"Male\", \"job_title\": \"Developer\", \"department\": \"IT\", \"salary\": 60000, \"hire_date\": \"2023-10-01\"}'\n```\n\n### Update an existing employee\n\n```sh\ncurl -X PUT http://127.0.0.1:5000/emp/1 -H \"Content-Type: application/json\" -d '{\"first_name\": \"John\", \"last_name\": \"Doe\", \"age\": 31, \"department\": \"HR\"}'\n```\n\n### Delete an employee\n\n```sh\ncurl -X DELETE http://127.0.0.1:5000/emp/1\n```\n\n## Creating the SQLite Database and Importing the Schema\n\nTo create the SQLite database and import the schema, follow these steps:\n\n1. Open a terminal and navigate to the project directory:\n\n   ```sh\n   cd path/to/Employee-REST-API\n   ```\n\n2. Open the SQLite command line interface:\n\n   ```sh\n   sqlite3 EmpData.db\n   ```\n\n3. Import the `schema.sql` file to create the `Employee` table and insert records:\n\n   ```sh\n   .read schema.sql\n   ```\n\n4. Verify that the `Employee` table has been created and records have been inserted:\n\n   ```sh\n   .tables\n   SELECT * FROM Employee;\n   ```\n\nThis will create the `Employee` table and insert the initial records as defined in the `schema.sql` file.\n\n## License\n\nThis project is licensed under the MIT License.\n\n## Contributing\n\nContributions are welcome! If you have any ideas, suggestions, or improvements, feel free to open an issue or submit a pull request.\n\n1. Fork the repository.\n2. Create a new branch (`git checkout -b feature-branch`).\n3. Make your changes.\n4. Commit your changes (`git commit -m 'Add some feature'`).\n5. Push to the branch (`git push origin feature-branch`).\n6. Open a pull request.\n\nPlease make sure to update tests as appropriate.\n\n---\n\nThank you for your interest in contributing to this project!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsnonari%2Femployee-rest-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsnonari%2Femployee-rest-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsnonari%2Femployee-rest-api/lists"}