{"id":28578250,"url":"https://github.com/digitalocean/sample-functions-python-jokes","last_synced_at":"2025-06-11T01:09:20.072Z","repository":{"id":37708574,"uuid":"459141889","full_name":"digitalocean/sample-functions-python-jokes","owner":"digitalocean","description":null,"archived":false,"fork":false,"pushed_at":"2023-06-12T03:56:15.000Z","size":10,"stargazers_count":35,"open_issues_count":4,"forks_count":66,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-01-15T00:22:00.620Z","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/digitalocean.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":"2022-02-14T11:53:13.000Z","updated_at":"2024-11-28T14:32:21.000Z","dependencies_parsed_at":"2022-07-12T22:50:27.911Z","dependency_job_id":null,"html_url":"https://github.com/digitalocean/sample-functions-python-jokes","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fsample-functions-python-jokes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fsample-functions-python-jokes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fsample-functions-python-jokes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fsample-functions-python-jokes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digitalocean","download_url":"https://codeload.github.com/digitalocean/sample-functions-python-jokes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fsample-functions-python-jokes/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259178544,"owners_count":22817388,"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":"2025-06-11T01:09:19.275Z","updated_at":"2025-06-11T01:09:20.060Z","avatar_url":"https://github.com/digitalocean.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sample Function: Python Joke API\n\n## Introduction\n\nThis repository contains a sample joke API function written in Python. You can deploy it on DigitalOcean's App Platform as a Serverless Function component.\nDocumentation is available at https://docs.digitalocean.com/products/functions.\n\n### Requirements\n\n* You need a DigitalOcean account. If you don't already have one, you can sign up at [https://cloud.digitalocean.com/registrations/new](https://cloud.digitalocean.com/registrations/new).\n* To deploy from the command line, you will need the [DigitalOcean `doctl` CLI](https://github.com/digitalocean/doctl/releases).\n\n## Deploying the Function\n\n```\n# clone this repo\ngit clone git@github.com:digitalocean/sample-functions-python-jokes.git\n```\n\n```\n# deploy the project, using \"remote-build\" so that the build and runtime environments match\n\u003e doctl serverless deploy sample-functions-python-jokes --remote-build\nDeploying 'sample-functions-python-jokes'\n  to namespace 'fn-...'\n  on host 'https://faas-...'\nSubmitted action 'joke' for remote building and deployment in runtime python:default\nProcessing of 'joke' is still running remotely ...\n...\nDeployed functions ('doctl sbx fn get \u003cfuncName\u003e --url' for URL):\n  - joke\n```\n\n```\n# execute the function\n\u003e doctl serverless functions invoke joke\n{\n  \"body\": {\n    \"response_type\": \"in_channel\",\n    \"text\": \"Waiter: He's choking! Is anyone a doctor? Programmer: I'm a Vim user.\"\n  }\n}\n```\n\nNote the CLI command can be abbreviated as `doctl sls fn invoke joke`.\n\n\n### Learn More\n\nYou can learn more about Functions and App Platform integration in [the official App Platform Documentation](https://www.digitalocean.com/docs/app-platform/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalocean%2Fsample-functions-python-jokes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigitalocean%2Fsample-functions-python-jokes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalocean%2Fsample-functions-python-jokes/lists"}