{"id":16988476,"url":"https://github.com/deepgram/deepgram-brain-python","last_synced_at":"2025-04-12T03:51:46.800Z","repository":{"id":52170863,"uuid":"105572690","full_name":"deepgram/deepgram-brain-python","owner":"deepgram","description":"Python API wrapper for the Deepgram API. Oh yes, it's cool. You should get it.","archived":false,"fork":false,"pushed_at":"2021-05-06T13:37:33.000Z","size":20,"stargazers_count":4,"open_issues_count":1,"forks_count":3,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-25T23:24:17.485Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deepgram.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-02T18:57:48.000Z","updated_at":"2024-03-09T15:14:14.000Z","dependencies_parsed_at":"2022-08-24T02:31:07.975Z","dependency_job_id":null,"html_url":"https://github.com/deepgram/deepgram-brain-python","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepgram%2Fdeepgram-brain-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepgram%2Fdeepgram-brain-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepgram%2Fdeepgram-brain-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepgram%2Fdeepgram-brain-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deepgram","download_url":"https://codeload.github.com/deepgram/deepgram-brain-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248514209,"owners_count":21116899,"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-14T03:04:06.133Z","updated_at":"2025-04-12T03:51:46.779Z","avatar_url":"https://github.com/deepgram.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# https://brain.deepgram.com is now live\nDuring testing/beta we were using https://api.deepgram.com for our rest API. This has now moved to https://brain.deepgram.com. This is the default URL in the python client so if you are using the client for the first time you shouldn't notice a change. For those users that were using the client anc connecting using the url parameter, just remove the url and let the default take over and you should be up and running!\n\n# deepgram-brain-python\nPython API wrapper for the Deepgram API. Oh yes, it's cool. You should get it.\nHere is a quick usage\n\n# install\nFrom git:\n\n    get clone https://github.com/deepgram/deepgram-brain-python.git\n    cd deepgram-brain-python\n    python setup install\n\nFrom pypi\n\n    pip install deepgram-brain\n\n# usage Python 3.X\n    from deepgram import Brain\n\n    ...\n\n    # Get your user_id and token from deepgram.com/console/documentation\n    brainAPI = Brain(user_id=\u003cuser_id\u003e, token=\u003ctoken\u003e)\n\n    # print asset information on all of your assets\n    for asset in brainAPI.assets:\n      print(brainAPI.asset(asset['asset_id'])\n\n    #just transcribe something\n    print(brainAPI.transcribeFromURL('http://some.server.com/someAudioFile.wav'))\n\n    #upload a new asset from a URL\n    result = brainAPI.createAssetFromURL('http://some.server.com/someAudioFile.wav')\n    print(brainAPI.asset(result['asset_id'])\n\n    #create it from a local file and give it a filename\n    with open(audioFileLocation, mode='rb') as audioFile:\n      asset = brainAPI.uploadAsset(audioFile, metadata={'filename': filename})\n\n# usage Python 2.X\nWe are not planning to support python 2.X so we highly encourage upgrading to 3.X. Having said that, the current version should work with 2.X, however when uploading a file you will need to send it as an array of bytes so the example above should now look like:\n\n    ...\n    #create it from a local file and give it a filename\n    with open(audioFileLocation, mode='rb') as audioFile:\n      asset = brainAPI.uploadAsset(audioFile.read(), metadata={'filename': filename})\n    ...\n\n\n## See the code for more usage and check out https://github.com/deepgram/brain-search-example for a good starting point!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepgram%2Fdeepgram-brain-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepgram%2Fdeepgram-brain-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepgram%2Fdeepgram-brain-python/lists"}