{"id":22148153,"url":"https://github.com/auth0-developer-hub/api_flask_python_hello-world","last_synced_at":"2025-07-26T02:32:11.952Z","repository":{"id":39624359,"uuid":"436009093","full_name":"auth0-developer-hub/api_flask_python_hello-world","owner":"auth0-developer-hub","description":null,"archived":false,"fork":false,"pushed_at":"2022-06-24T17:51:14.000Z","size":17,"stargazers_count":14,"open_issues_count":4,"forks_count":13,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-04-23T21:56:32.733Z","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/auth0-developer-hub.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}},"created_at":"2021-12-07T19:54:39.000Z","updated_at":"2024-02-23T16:02:08.000Z","dependencies_parsed_at":"2022-07-13T09:10:37.304Z","dependency_job_id":null,"html_url":"https://github.com/auth0-developer-hub/api_flask_python_hello-world","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/auth0-developer-hub%2Fapi_flask_python_hello-world","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auth0-developer-hub%2Fapi_flask_python_hello-world/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auth0-developer-hub%2Fapi_flask_python_hello-world/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auth0-developer-hub%2Fapi_flask_python_hello-world/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/auth0-developer-hub","download_url":"https://codeload.github.com/auth0-developer-hub/api_flask_python_hello-world/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227644212,"owners_count":17798155,"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-12-01T23:26:10.767Z","updated_at":"2024-12-01T23:26:11.606Z","avatar_url":"https://github.com/auth0-developer-hub.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hello World API: Flask Auth0 Sample\n\nThis Python code sample demonstrates how to implement authorization in a Flask API server using Auth0.\n\n## Run the Project\n\nCreate a virtual environment under the root project directory:\n\n**macOS/Linux:**\n\n```bash\npython3 -m venv venv\n```\n\n**Windows:**\n\n```bash\npy -3 -m venv venv\n```\n\nActivate the virtual environment:\n\n**macOS/Linux:**\n\n```bash\n. venv/bin/activate\n```\n\n**Windows:**\n\n```bash\nvenv\\Scripts\\activate\n```\n\nInstall the project dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\nCreate a `.env` file under the root project directory and populate it with the following content:\n\n```bash\nCLIENT_ORIGIN_URL=http://localhost:4040\nAUTH0_AUDIENCE=\nAUTH0_DOMAIN=\n```\n\nRun the project in development mode:\n\n```bash\nflask run\n```\n\n## API Endpoints\n\nThe API server defines the following endpoints:\n\n### 🔓 Get public message\n\n```bash\nGET /api/messages/public\n```\n\n#### Response\n\n```bash\nStatus: 200 OK\n```\n\n```json\n{\n  \"message\": \"The API doesn't require an access token to share this message.\"\n}\n```\n\n### 🔐 Get protected message\n\n```bash\nGET /api/messages/protected\n```\n\n#### Response\n\n```bash\nStatus: 200 OK\n```\n\n```json\n{\n  \"message\": \"The API successfully validated your access token.\"\n}\n```\n\n### 🔐 Get admin message\n\n```bash\nGET /api/messages/admin\n```\n\n#### Response\n\n```bash\nStatus: 200 OK\n```\n\n```json\n{\n  \"message\": \"The API successfully recognized you as an admin.\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauth0-developer-hub%2Fapi_flask_python_hello-world","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fauth0-developer-hub%2Fapi_flask_python_hello-world","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauth0-developer-hub%2Fapi_flask_python_hello-world/lists"}