{"id":15502907,"url":"https://github.com/amicks/cruzhacks19-dev-app","last_synced_at":"2026-01-18T02:02:47.177Z","repository":{"id":50207522,"uuid":"133866796","full_name":"amicks/CruzHacks19-Dev-App","owner":"amicks","description":"REST API Hacker Model for CruzHacks 2019 developer application","archived":false,"fork":false,"pushed_at":"2022-12-08T02:05:46.000Z","size":14,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-19T17:29:50.478Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/amicks.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}},"created_at":"2018-05-17T20:47:16.000Z","updated_at":"2024-10-08T19:54:27.000Z","dependencies_parsed_at":"2023-01-24T05:15:35.912Z","dependency_job_id":null,"html_url":"https://github.com/amicks/CruzHacks19-Dev-App","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/amicks/CruzHacks19-Dev-App","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amicks%2FCruzHacks19-Dev-App","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amicks%2FCruzHacks19-Dev-App/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amicks%2FCruzHacks19-Dev-App/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amicks%2FCruzHacks19-Dev-App/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amicks","download_url":"https://codeload.github.com/amicks/CruzHacks19-Dev-App/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amicks%2FCruzHacks19-Dev-App/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28526560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"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":[],"created_at":"2024-10-02T09:11:32.553Z","updated_at":"2026-01-18T02:02:47.161Z","avatar_url":"https://github.com/amicks.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CruzHacks19-Dev-App\nFirst install dependencies:\n\n``` bash\npip3 install -r requirements.txt\n```\n\nThen export your SQL database URI as an environment variable for Flask SQLAlchemy hooks.\nThe following are examples for MySQL, Postgres, and SQLite:\n\n``` bash\nexport SQLALCHEMY_DATABASE_URI='mysql+pymysql://user:password@localhost:port/db_name'\nexport SQLALCHEMY_DATABASE_URI='postgresql://user:password@localhost:port/db_name'\nexport SQLALCHEMY_DATABASE_URI='sqlite:////path/db_name.db'\n```\n\nStart the Flask Server:\n\n``` bash\npython3 ./src/app.py\n```\n\nYou can now GET, POST, PUT, or DELETE from the Hacker DB model on the route `http://localhost:5000/hackers/`\nRead ./src/api.py for arguments and types that each type of request accepts.  In general, everything except GET requires a `public_id` integer.  GET can filter the DB model on any categories.\n\nThere is a test.py file that POSTs 5 users and prints the response if you want to run it in another shell.\nOr POST manually (the following arguments are *required* for any POST, there are more optional ones in the source code):\n\n``` bash\ncurl -H \"Content-Type: application/json\" -d '{\"age\": 20, \"email\": \"amicks@github.com\", \"first_name\": \"Allston\", \"last_name\": \"Mickey\", \"shirt_size\": \"M\", \"needs_transportation\": true}' http://localhost:5000/hackers/\n```\n\nResponse:\n\n``` bash\n{\n    \"public_id\": 6629,\n    \"team_id\": null,\n    \"first_name\": \"Allston\",\n    \"last_name\": \"Mickey\",\n    \"email\": \"amicks@github.com\",\n    \"gender\": null,\n    \"age\": 20,\n    \"needs_transportation\": true,\n    \"rsvp_status\": null,\n    \"app_status\": null,\n    \"shirt_size\": \"M\",\n    \"university\": null,\n    \"class_year\": null\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famicks%2Fcruzhacks19-dev-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famicks%2Fcruzhacks19-dev-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famicks%2Fcruzhacks19-dev-app/lists"}