{"id":28318605,"url":"https://github.com/ahmed-gelemli/api-flask-project","last_synced_at":"2026-05-06T11:38:09.352Z","repository":{"id":163576697,"uuid":"633409955","full_name":"ahmed-gelemli/API-Flask-Project","owner":"ahmed-gelemli","description":"This is a simple Flask app that provides an API to manage students. The app uses PostgreSQL as a database to store student information.","archived":false,"fork":false,"pushed_at":"2025-04-30T22:44:59.000Z","size":552,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-24T18:49:34.736Z","etag":null,"topics":["flask","postgresql","python3","restful-api"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/ahmed-gelemli.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}},"created_at":"2023-04-27T12:43:39.000Z","updated_at":"2025-04-30T22:45:03.000Z","dependencies_parsed_at":"2025-06-24T18:35:20.466Z","dependency_job_id":"37043b5a-0c5f-4815-bf11-52ce8776adde","html_url":"https://github.com/ahmed-gelemli/API-Flask-Project","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ahmed-gelemli/API-Flask-Project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmed-gelemli%2FAPI-Flask-Project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmed-gelemli%2FAPI-Flask-Project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmed-gelemli%2FAPI-Flask-Project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmed-gelemli%2FAPI-Flask-Project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahmed-gelemli","download_url":"https://codeload.github.com/ahmed-gelemli/API-Flask-Project/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmed-gelemli%2FAPI-Flask-Project/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32692612,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T08:33:17.875Z","status":"ssl_error","status_checked_at":"2026-05-06T08:33:17.221Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["flask","postgresql","python3","restful-api"],"created_at":"2025-05-25T08:11:08.436Z","updated_at":"2026-05-06T11:38:09.306Z","avatar_url":"https://github.com/ahmed-gelemli.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flask Students API\n\nThis is a simple Flask app that provides an API to manage students. The app uses PostgreSQL as a database to store student information.\n\n## Requirements\n\nYou'll need the following installed on your system to run this app:\n\n- Python 3.7 or later\n- PostgreSQL\n\n## Python Dependencies\n\nTo install the required Python dependencies, run the following command:\n\n```bash\npip install Flask Flask-SQLAlchemy psycopg2 flask-cors\n```\n\n## Database Setup\n\nCreate a PostgreSQL database and a table with the following SQL command:\n\n```sql\nCREATE TABLE students (  \n  id SERIAL PRIMARY KEY,  \n  name VARCHAR(18) NOT NULL,  \n  phone INTEGER NOT NULL,  \n  gender VARCHAR(10) NOT NULL,  \n  created INTEGER NOT NULL,  \n  modified INTEGER\n);\n```\n\nMake sure to update the `app.config['SQLALCHEMY_DATABASE_URI']` in the start of Flask app code with the correct connection string for your PostgreSQL database.\n\n## Running the App\n\nTo run the Flask app in your local system, execute the following command:\n\n```bash\npython app.py\n```\n\nThe app will start running on [http://127.0.0.1:5000/](http://127.0.0.1:5000/).\n\n## API Endpoints\n\nThe following API endpoints are available:\n\n- `GET /api/hello`: A simple \"Hello\" endpoint for testing\n- `GET /api/students`: Fetch all students\n- `POST /api/students`: Create a new student\n- `GET /api/students/\u003cint:studentID\u003e`: Fetch a specific student by ID\n- `PUT /api/students/\u003cint:studentID\u003e`: Update a specific student by ID\n- `DELETE /api/students/\u003cint:studentID\u003e`: Delete a specific student by ID\n- `PATCH /api/students/\u003cint:studentID\u003e`: Update a specific student partially by ID\n- `GET /api/students/search`: Search for students by name or gender\n\n## Web Views\n\nAdditionally, the app provides web views for managing students:\n\n- `/`: Home page\n- `/view`: List all students\n- `/students/addNew`: Add a new student\n- `/students/\u003cint:studentID\u003e`: View a specific student by ID\n- `/students/edit/\u003cint:studentID\u003e`: Edit a specific student by ID\n- `/api/docs`: API documentation","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmed-gelemli%2Fapi-flask-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahmed-gelemli%2Fapi-flask-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmed-gelemli%2Fapi-flask-project/lists"}