{"id":13554493,"url":"https://github.com/wit-ai/pywit","last_synced_at":"2025-05-13T20:14:42.692Z","repository":{"id":21299846,"uuid":"24616128","full_name":"wit-ai/pywit","owner":"wit-ai","description":"Python library for Wit.ai","archived":false,"fork":false,"pushed_at":"2025-03-07T02:52:53.000Z","size":122,"stargazers_count":1483,"open_issues_count":21,"forks_count":359,"subscribers_count":91,"default_branch":"main","last_synced_at":"2025-04-28T11:51:26.652Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wit-ai.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2014-09-29T22:55:24.000Z","updated_at":"2025-04-27T02:47:45.000Z","dependencies_parsed_at":"2023-01-13T21:23:37.418Z","dependency_job_id":"3642aeb8-742e-435f-80ec-939df38b62f8","html_url":"https://github.com/wit-ai/pywit","commit_stats":{"total_commits":89,"total_committers":34,"mean_commits":"2.6176470588235294","dds":0.8089887640449438,"last_synced_commit":"a00aa122631ceb211a601eaa08a2554e7dd11b15"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wit-ai%2Fpywit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wit-ai%2Fpywit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wit-ai%2Fpywit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wit-ai%2Fpywit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wit-ai","download_url":"https://codeload.github.com/wit-ai/pywit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254020633,"owners_count":22000755,"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-08-01T12:02:48.963Z","updated_at":"2025-05-13T20:14:42.672Z","avatar_url":"https://github.com/wit-ai.png","language":"Python","readme":"# pywit\n\n`pywit` is the Python SDK for [Wit.ai](http://wit.ai).\n\n## Install\n\nUsing `pip`:\n```bash\npip install wit\n```\n\nFrom source:\n```bash\ngit clone https://github.com/wit-ai/pywit\npip install .\n```\n\n## Usage\n\nSee the `examples` folder for examples.\n\n## API\n\n### Versioning\n\nThe default API version is `20200513`.\nYou can target a specific version by setting the env variable `WIT_API_VERSION`.\n\n### Overview\n\n`pywit` provides a Wit class with the following methods:\n* `message` - the Wit [message API](https://wit.ai/docs/http/20200513#get-intent-via-text-link)\n* `speech` - the Wit [speech API](https://wit.ai/docs/http/20200513#post--speech-link)\n* `interactive` - starts an interactive conversation with your bot\n\n### Wit class\n\nThe Wit constructor takes the following parameters:\n* `access_token` - the access token of your Wit instance\n\nA minimal example looks like this:\n\n```python\nfrom wit import Wit\n\nclient = Wit(access_token)\nclient.message('set an alarm tomorrow at 7am')\n```\n\n### .message()\n\nThe Wit [message API](https://wit.ai/docs/http/20200513#get-intent-via-text-link).\n\nTakes the following parameters:\n* `msg` - the text you want Wit.ai to extract the information from\n\nExample:\n```python\nresp = client.message('what is the weather in London?')\nprint('Yay, got Wit.ai response: ' + str(resp))\n```\n\n### .speech()\n\nThe Wit [speech API](https://wit.ai/docs/http/20200513#post--speech-link).\n\nTakes the following parameters:\n* `audio_file` - a file handler opened in binary mode\n* `headers` - (optional) the dict of headers (e.g. \"Content-Type\")\n\nExample:\n```python\nresp = None\nwith open('test.wav', 'rb') as f:\n  resp = client.speech(f, {'Content-Type': 'audio/wav'})\nprint('Yay, got Wit.ai response: ' + str(resp))\n```\n\n### .interactive()\n\nStarts an interactive conversation with your bot.\n\nExample:\n```python\nclient.interactive()\n```\n\nSee the [docs](https://wit.ai/docs) for more information.\n\n\n### Logging\n\nDefault logging is to `STDOUT` with `INFO` level.\n\nYou can set your logging level as follows:\n``` python\nfrom wit import Wit\nimport logging\nclient = Wit(token)\nclient.logger.setLevel(logging.WARNING)\n```\n\nYou can also specify a custom logger object in the Wit constructor:\n``` python\nfrom wit import Wit\nclient = Wit(access_token=access_token, logger=custom_logger)\n```\n\nSee the [logging module](https://docs.python.org/2/library/logging.html) and\n[logging.config](https://docs.python.org/2/library/logging.config.html#module-logging.config) docs for more information.\n\n\n## License\n\nThe license for pywit can be found in LICENSE file in the root directory of this source tree.\n\n\n## Terms of Use\n\nOur terms of use can be found at https://opensource.facebook.com/legal/terms.\n\n\n## Privacy Policy\n\nOur privacy policy can be found at https://opensource.facebook.com/legal/privacy.\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwit-ai%2Fpywit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwit-ai%2Fpywit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwit-ai%2Fpywit/lists"}