{"id":15009730,"url":"https://github.com/basemax/simplefastpyapi","last_synced_at":"2025-04-09T17:51:39.002Z","repository":{"id":167201133,"uuid":"625300271","full_name":"BaseMax/SimpleFastPyAPI","owner":"BaseMax","description":"This is a simple REST API built with Python and FastAPI and SQLAlchemy for CRUD operations (Create, Read, Update, Delete) on users. FastAPI is a powerful web framework for building APIs.","archived":false,"fork":false,"pushed_at":"2025-04-04T09:32:04.000Z","size":73,"stargazers_count":23,"open_issues_count":0,"forks_count":17,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-09T04:03:17.650Z","etag":null,"topics":["api","api-restful","fastapi","fastapi-crud","fastapi-example","fastapi-py","fastapi-python","fastapi-sample","fastapi-user","fastapi-users","py","python","python-fastapi","python3","restful","restful-api","sqlalchemy"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BaseMax.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":"2023-04-08T17:25:25.000Z","updated_at":"2025-04-04T09:32:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"db69a115-6df5-49ce-9d88-e7f3cda2c36c","html_url":"https://github.com/BaseMax/SimpleFastPyAPI","commit_stats":{"total_commits":27,"total_committers":4,"mean_commits":6.75,"dds":0.6666666666666667,"last_synced_commit":"3732c9a4476b4a23428b7bd3a0ae02fc9e596b7a"},"previous_names":["basemax/simplefastpyapi"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FSimpleFastPyAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FSimpleFastPyAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FSimpleFastPyAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FSimpleFastPyAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BaseMax","download_url":"https://codeload.github.com/BaseMax/SimpleFastPyAPI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248083139,"owners_count":21045049,"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":["api","api-restful","fastapi","fastapi-crud","fastapi-example","fastapi-py","fastapi-python","fastapi-sample","fastapi-user","fastapi-users","py","python","python-fastapi","python3","restful","restful-api","sqlalchemy"],"created_at":"2024-09-24T19:28:03.988Z","updated_at":"2025-04-09T17:51:38.997Z","avatar_url":"https://github.com/BaseMax.png","language":"Python","readme":"# Simple FastAPI Py\n\n## My Awesome FastAPI Project\n\nThis is a simple REST API built with Python and FastAPI and SQLAlchemy for CRUD operations (Create, Read, Update, Delete) on users.\nFastAPI is a powerful web framework for building APIs.\n\n## Installation\n\nClone this repository to your local machine:\n```bash\ngit clone https://github.com/BaseMax/SimpleFastPyAPI\n```\n\nChange into the project directory:\n\n```bash\ncd SimpleFastPyAPI\n```\n\nBuild Docker:\n\n```bash\ndocker build -t SimpleFastPyAPI .\n```\n\nRun the application:\n\n```bash\ndocker run -p 8000:8000 -v $(pwd)/users.db:/app/users.db SimpleFastPyAPI\n```\n\nInstall the project dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\nRun the application directly without Docker:\n\n```bash\nuvicorn main:app --reload\n```\n\nThe application will start and be available at http://localhost:8000.\n\n## API Endpoints\n\n### Retrieve a list of users:\n\n```http\nGET /users\n```\n\nReturns a list of all users in the system:\n\n```console\ncurl http://localhost:8000/users/ -H \"Accept: application/json\"\n```\nResponse:\n\n```json\n[\n    {\n        \"email\": \"alice@example.com\",\n        \"id\": 1,\n        \"password\": \"password1\",\n        \"name\": \"Alice\"\n    },\n    {\n        \"email\": \"bob@example.com\",\n        \"id\": 2,\n        \"password\": \"password2\",\n        \"name\": \"Bob\"\n    },\n    {\n        \"email\": \"charlie@example.com\",\n        \"id\": 3,\n        \"password\": \"password3\",\n        \"name\": \"Charlie\"\n    }\n]\n```\n\n### Retrieve details for a specific user:\n\n```http\nGET /users/{user_id}\n```\nReturns details for a specific user with the given user_id:\n\n```console\ncurl http://localhost:8000/users/1 -H \"Accept: application/json\"\n```\nResponse:\n```json\n{\n    \"email\": \"alice@example.com\",\n    \"id\": 1,\n    \"password\": \"password1\",\n    \"name\": \"Alice\"\n}\n```\n\n### Add a new user\n\n```http\nPOST /users\n```\n\nAdds a new user to the system. The request body should include a JSON object with the following properties:\n\n  - `name` (string, required): the name of the user\n  - `email` (string, required): the email address of the user\n  - `password` (string, required): the password for the user\n\n```console\ncurl -X POST http://localhost:8000/users/\n   -H 'Content-Type: application/json'\n   -d '{\"name\":\"Ali\",\"password\":\"123456\", \"email\": \"AliAhmadi@gmail.com\"}'\n```\nResponse:\n\n```json\n{\n    \"email\": \"AliAhmadi@gmail.com\",\n    \"password\": \"123456\", \n    \"id\": 4, \n    \"name\": \"Ali\"\n}\n```\n\n\n### Update an existing user\n```http\nPUT /users/{user_id}\n```\n\nUpdates an existing user with the given user_id. The request body should include a JSON object with the following properties:\n\n  -  `name` (string): the new name for the user\n  -  `email` (string): the new email address for the user\n\n```console\ncurl -X PUT http://localhost:8000/users/1\n     -H \"Accept: application/json\"\n     -d '{\"name\": \"Reza\", \"email\": \"reza@yahoo.com\"}'\n```\nResponse:\n```json\n{\"message\": \"User updated successfully\"}\n```\n\n### Delete a user\n\n```http\nDELETE /users/{user_id}\n```\n\nDeletes the user with the given user_id:\n\n```console\ncurl -X DELETE http://localhost:8000/2\n```\n\nResponse:\n```json\n{\"message\": \"User deleted successfully\"}\n```\n\n## License\n\nThis project is licensed under the GPL-3.0 License - see the LICENSE file for details.\n\nCopyright 2023, Max Base\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Fsimplefastpyapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasemax%2Fsimplefastpyapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Fsimplefastpyapi/lists"}