{"id":17710930,"url":"https://github.com/engageintellect/fast-api-mysql","last_synced_at":"2025-03-31T09:21:32.791Z","repository":{"id":137703194,"uuid":"559801916","full_name":"engageintellect/fast-api-mysql","owner":"engageintellect","description":null,"archived":false,"fork":false,"pushed_at":"2022-11-01T08:12:46.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-06T13:49:22.233Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/engageintellect.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":"2022-10-31T05:49:03.000Z","updated_at":"2022-10-31T05:50:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"7c7d9205-97c7-469f-9cd0-d43a3289dc7b","html_url":"https://github.com/engageintellect/fast-api-mysql","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engageintellect%2Ffast-api-mysql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engageintellect%2Ffast-api-mysql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engageintellect%2Ffast-api-mysql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engageintellect%2Ffast-api-mysql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/engageintellect","download_url":"https://codeload.github.com/engageintellect/fast-api-mysql/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246443538,"owners_count":20778252,"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":[],"created_at":"2024-10-25T07:43:55.415Z","updated_at":"2025-03-31T09:21:32.771Z","avatar_url":"https://github.com/engageintellect.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fast API Demo\n\n## Description:\nFastAPI framework, high performance, easy to learn, fast to code, ready for production\n\n## The key features are:\n- **Fast** --\u003e Very high performance, on par with NodeJS and Go (thanks to Starlette and Pydantic). One of the fastest Python frameworks available.\nFast to code: Increase the speed to develop features by about 200% to 300%.\n- **Fewer bugs** --\u003e Reduce about 40% of human (developer) induced errors.\n- **Intuitive** --\u003e Great editor support. Completion everywhere. Less time debugging.\n- **Easy** --\u003e Designed to be easy to use and learn. Less time reading docs.\n- **Short** --\u003e Minimize code duplication. Multiple features from each parameter declaration. Fewer bugs.\n- **Robust** --\u003e Get production-ready code. With automatic interactive documentation.\n- **Standards-based** --\u003e Based on (and fully compatible with) the open standards for APIs: OpenAPI (previously known as Swagger) and JSON Schema.\n# Getting Started\n\n1. clone repository\n```\ngit clone \u003crepo name\u003e\n```\n\n2. install dependencies\n```\ncd fast_api \u0026\u0026 sudo pip install -r requirements.txt\n```\n\n3. Setup MySQL\n\t* Create a local MySQL database called \"py_crud\"\n\n\t* Create a table like this one:\n\t```sql\n\tCREATE TABLE releases(  \n\t\tid int NOT NULL PRIMARY KEY AUTO_INCREMENT COMMENT 'Primary Key',\n\t\tdate VARCHAR(255),\n\t\ttitle VARCHAR(255),\n\t\tdescription VARCHAR(255),\n\t\tlink VARCHAR(255),\n\t) COMMENT '';\n\t```\n\n3. run code (dev)\n```\nuvicorn main:app --reload\n```\n\n4. run code (prod)\n```\nuvicorn main:app --host localhost --port 3000\n```\nTo keep a persistent connection, and to refesh during updates, add the ```--reload``` switch.\n\n```\nuvicorn main:app --host localhost --port 3000 --reload\n```\n\n\n4. test endpoints\n* [/](http://localhost:3000)\n* [/api/info](http://localhost:3000/api/info)\n* [/api/release](http://localhost:3000/api/release)\n* [/api/projects](http://localhost:3000/api/release)\n* [/api/products](http://localhost:3000/api/release)\n\nOR\n\n* ```curl http://localhost:3000```\n* ```curl http://localhost:3000/info```\n* ```curl http://localhost:3000/release```\n\u003cbr\u003e\n\n5. Additionally, FastAPI is self-documenting. You can access this by appending 'docs' to the end of an endpoint:\n```\nhttp://localhost:3000/docs\n```\n\n\n# Sending data externally using Python.\n```python\n\nimport requests\n \nurl = \"https://httpbin.org/post\"\n \ndata = {\n    'date': 'date',\n    'title': 'title',\n    'description': 'desc',\n    'link': 'link',\n}\n \nresponse = requests.post(url, json=data)\n \nprint(f'Status: {response.status_code}\\n Response: {response.json()}')\n```\n\n\n# Resources\n* [YouTube Tutorial](https://www.youtube.com/watch?v=yEMbfK6f3aw\u0026t=967s)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fengageintellect%2Ffast-api-mysql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fengageintellect%2Ffast-api-mysql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fengageintellect%2Ffast-api-mysql/lists"}