{"id":18509905,"url":"https://github.com/abdelhai/fastapp","last_synced_at":"2026-04-26T22:31:23.298Z","repository":{"id":69796067,"uuid":"359781386","full_name":"abdelhai/fastapp","owner":"abdelhai","description":null,"archived":false,"fork":false,"pushed_at":"2021-04-20T11:19:15.000Z","size":1,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-24T04:37:52.795Z","etag":null,"topics":["deta","fastapi"],"latest_commit_sha":null,"homepage":"","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/abdelhai.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":"2021-04-20T10:52:47.000Z","updated_at":"2021-12-07T13:02:42.000Z","dependencies_parsed_at":"2023-07-13T15:30:23.940Z","dependency_job_id":null,"html_url":"https://github.com/abdelhai/fastapp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/abdelhai/fastapp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdelhai%2Ffastapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdelhai%2Ffastapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdelhai%2Ffastapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdelhai%2Ffastapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abdelhai","download_url":"https://codeload.github.com/abdelhai/fastapp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdelhai%2Ffastapp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32315711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T21:09:39.134Z","status":"ssl_error","status_checked_at":"2026-04-26T21:09:21.240Z","response_time":129,"last_error":"SSL_read: 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":["deta","fastapi"],"created_at":"2024-11-06T15:19:31.038Z","updated_at":"2026-04-26T22:31:23.280Z","avatar_url":"https://github.com/abdelhai.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A simple API with FastAPI and Deta\n\nDo not clone the repo if you are learning, just follow along.\n\n## Make sure you have a Deta account\n\n[Make an account](https://web.deta.sh/) and confirm it, it's free.\n\n\n## Install the Deta CLI and make sure you're logged in\n\n[Follow these instruction](https://docs.deta.sh/docs/cli/install) to get the Deta CLI up and running.\n\n## Create a project directory and files\n\nTo create a directory, in the terminal, run the following:\n\n```\nmkdir fastapp\n```\n\nThen change into the directory:\n\n```\ncd fastapp\n```\n\nand make two empty files:\n\n```\ntouch main.py requirements.txt\n```\n\n## Add FastAPI to your dependancies\n\nIn the `requirements.txt` file add `fastapi`:\n\n```\nfastapi\n```\n\n## Import FastAPI and write your first endpoint\n\nIn `main.py`, add the following code:\n\n```py\nfrom fastapi import FastAPI\n\napp = FastAPI()\n\n@app.get(\"/\")\ndef hello():\n    return \"Hello from Deta!\"\n```\n\n## Deploy you code to Deta and test\n\nTo deploy to Deta, run the following command inside the project directory, aka `fastapp`:\n\n```\ndeta new\n```\n\nThe deployment should take a few seconds. Make sure to notice the Micro URL, it will look somethign like this:\n\n```\nhttps://xyz.deta.dev/\n```\n\nYou can open it in your browser and it if everything has worked, then you will see:\n\n```\nHello from Deta!\n```\n\n## Deploy changes\n\nYou can deploy changes to Deta using this command:\n\n```\ndeta deploy\n```\n\nYou could also use the convenient `watch` command for auto-deploys\n\n## See the logs and debug your API using VISOR\n\nTo open VISOR, run the following:\n\n```\ndeta visor open\n```\n\n## Protect your API\n\nTo protect your API, so no one else but you could access it, run the following:\n\n```\ndeta auth enable\n```\n\nYou can re-open you API by running:\n\n```\ndeta auth disable\n```\n\nTo create an API key, run the following command\n\n```\ndeta auth create-api-key --name name-of-the-key \n```\n\nMake sure to keep it in a secure place.\n\n\n## Resources\n\n- [Deta Docs](https://docs.deta.sh/docs/home) / [Deta Base](https://docs.deta.sh/docs/base/about)\n- [FastAPI Docs](https://fastapi.tiangolo.com/) / [Official tutorial](https://fastapi.tiangolo.com/deployment/deta/)\n- [Awesome Deta](https://github.com/deta/awesome-deta)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdelhai%2Ffastapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabdelhai%2Ffastapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdelhai%2Ffastapp/lists"}