{"id":16212522,"url":"https://github.com/p4irin/turn_ephemeral_credentials","last_synced_at":"2025-10-12T20:05:27.297Z","repository":{"id":192558755,"uuid":"687246633","full_name":"p4irin/turn_ephemeral_credentials","owner":"p4irin","description":"Generate time limited, i.e. ephemeral, long term credentials to authenticate against and use a TURN server","archived":false,"fork":false,"pushed_at":"2023-10-08T19:47:03.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-12T20:03:38.781Z","etag":null,"topics":["ice","stun","turn","turn-servers"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/p4irin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-09-05T00:54:16.000Z","updated_at":"2023-09-05T01:45:23.000Z","dependencies_parsed_at":"2025-04-07T21:59:28.782Z","dependency_job_id":null,"html_url":"https://github.com/p4irin/turn_ephemeral_credentials","commit_stats":null,"previous_names":["p4irin/turn_ephemeral_credentials"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/p4irin/turn_ephemeral_credentials","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p4irin%2Fturn_ephemeral_credentials","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p4irin%2Fturn_ephemeral_credentials/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p4irin%2Fturn_ephemeral_credentials/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p4irin%2Fturn_ephemeral_credentials/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/p4irin","download_url":"https://codeload.github.com/p4irin/turn_ephemeral_credentials/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p4irin%2Fturn_ephemeral_credentials/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279012792,"owners_count":26085187,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ice","stun","turn","turn-servers"],"created_at":"2024-10-10T10:52:50.804Z","updated_at":"2025-10-12T20:05:27.245Z","avatar_url":"https://github.com/p4irin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TURN Ephemeral Credentials - v1.0.1\n\nGenerate time limited, i.e. ephemeral, long term credentials to authenticate against a TURN server. The _default_ duration for the validity of the credentials is set to _one day_ as recommended in [A REST API For Access To TURN Services](https://datatracker.ietf.org/doc/html/draft-uberti-behave-turn-rest-00#section-2.1:~:text=ttl%3A%20the%20duration%20for%20which%20the%20username%20and%20password%20are%20valid%2C%0A%20%20%20%20%20%20in%20seconds.%20%20A%20value%20of%20one%20day%20(86400%20seconds)%20is%20recommended). The same document describes how to generate the _username_ and _password_ [here](https://datatracker.ietf.org/doc/html/draft-uberti-behave-turn-rest-00#section-2.1:~:text=username%3A%20the%20TURN,algorithm%0A%20%20%20%20%20%20and%20secret.).\n\n## Stack\n\n- Python 3.8.10 on Ubuntu 20.04.2 LTS\n\n## Installation\n\n### From PyPI\n\n```bash\n(venv) $ pip install turn-ephemeral-credentials\n```\n\n### From GitHub\n\n```bash\n(venv) $ pip install git+https://github.com/p4irin/turn_ephemeral_credentials.git\n```\n\n## Usage\n\n```python\nfrom turn_ephemeral_credentials import generate\n\n\n# Generate a username and use the default ttl of one day\ncredentials = generate(shared_secret='A shared secret with a TURN server')\n\n# Pass a username and use the default ttl\ncredentials = generate(username='username', shared_secret='A shared secret with a TURN server')\n\n# Generate a username and use a ttl of half a day\ncredentials = generate(shared_secret='A shared secret with a TURN server', ttl=43200)\n\nturn_username=credentials['turn_username']\nturn_password=credentials['turn_password']\n```\n\n## Reference\n\n- [A REST API For Access To TURN Services](https://datatracker.ietf.org/doc/html/draft-uberti-behave-turn-rest-00#section-2.1)\n- [RFC 5766. Traversal Using Relays around NAT (TURN):Relay Extensions to Session Traversal Utilities for NAT (STUN)](https://datatracker.ietf.org/doc/html/rfc5766)\n- [RFC 5389, Session Traversal Utilities for NAT (STUN)](https://datatracker.ietf.org/doc/html/rfc5389#section-10.2)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp4irin%2Fturn_ephemeral_credentials","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp4irin%2Fturn_ephemeral_credentials","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp4irin%2Fturn_ephemeral_credentials/lists"}