{"id":20675602,"url":"https://github.com/bitwarden/passwordless-python","last_synced_at":"2025-10-20T04:36:23.262Z","repository":{"id":196231678,"uuid":"692046546","full_name":"bitwarden/passwordless-python","owner":"bitwarden","description":"Bitwarden Passwordless.dev Python SDK.","archived":false,"fork":false,"pushed_at":"2025-08-16T23:07:59.000Z","size":460,"stargazers_count":23,"open_issues_count":5,"forks_count":4,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-08-17T01:05:09.904Z","etag":null,"topics":["bitwarden","python"],"latest_commit_sha":null,"homepage":"https://bitwarden.com/","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/bitwarden.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-09-15T12:51:31.000Z","updated_at":"2025-07-25T23:10:24.000Z","dependencies_parsed_at":"2023-12-21T00:46:21.775Z","dependency_job_id":"0e8ce13b-e9b4-4fef-a953-e62a99fe6a18","html_url":"https://github.com/bitwarden/passwordless-python","commit_stats":null,"previous_names":["passwordless/passwordless-python","bitwarden/passwordless-python"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/bitwarden/passwordless-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitwarden%2Fpasswordless-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitwarden%2Fpasswordless-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitwarden%2Fpasswordless-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitwarden%2Fpasswordless-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitwarden","download_url":"https://codeload.github.com/bitwarden/passwordless-python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitwarden%2Fpasswordless-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271746551,"owners_count":24813570,"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-08-23T02:00:09.327Z","response_time":69,"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":["bitwarden","python"],"created_at":"2024-11-16T21:09:57.336Z","updated_at":"2025-10-20T04:36:23.181Z","avatar_url":"https://github.com/bitwarden.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Passwordless Python SDK\n\n[![Build](https://img.shields.io/github/actions/workflow/status/bitwarden/passwordless-python/ci.yml?branch=main)](https://github.com/bitwarden/passwordless-python/actions)\n[![Version](https://img.shields.io/pypi/v/Passwordless.svg)](https://pypi.org/project/passwordless/)\n[![Downloads](https://img.shields.io/pypi/dm/Passwordless.svg)](https://pypi.org/project/passwordless/)\n\nThe official [Bitwarden Passwordless.dev](https://passwordless.dev/) Python library, for Python 3+.\n\n## Installation\n\nInstall with `python -m pip install passwordless`.\n\n### Dependencies\n\n- [Requests][requests] for HTTP API\n- [marshmallow][marshmallow] for JSON (de)serialization\n\n## Getting Started\n\nFollow the [Get started guide][api-docs].\n\n### Create `PasswordlessClient` instance:\n\n```python\nfrom passwordless import (\n    PasswordlessClient,\n    PasswordlessClientBuilder,\n    PasswordlessOptions,\n)\n\n\nclass PasswordlessPythonSdkExample:\n    client: PasswordlessClient\n\n    def __init__(self):\n        options = PasswordlessOptions(\"your_api_secret\")\n\n        self.client = PasswordlessClientBuilder(options).build()\n\n```\n\n### Register a passkey\n\n```python\nimport uuid\nfrom passwordless import PasswordlessClient, RegisterToken, RegisteredToken\n\n\nclass PasswordlessPythonSdkExample:\n    client: PasswordlessClient\n\n    def get_register_token(self, alias: str) -\u003e str:\n        # Get existing userid from session or create a new user.\n        user_id = str(uuid.uuid4())\n\n        # Options to give the Api\n        register_token = RegisterToken(\n            user_id=user_id,  # your user id\n            username=alias,  # e.g. user email, is shown in browser ui\n            aliases=[alias]  # Optional: Link this userid to an alias (e.g. email)\n        )\n\n        response: RegisteredToken = self.client.register_token(register_token)\n\n        # return this token\n        return response.token\n```\n\n### Verify user\n\n```python\nfrom passwordless import PasswordlessClient, VerifySignIn, VerifiedUser\n\n\nclass PasswordlessPythonSdkExample:\n    client: PasswordlessClient\n\n    def verify_sign_in_token(self, token: str) -\u003e VerifiedUser:\n        verify_sign_in = VerifySignIn(token)\n\n        # Sign the user in, set a cookie, etc,\n        return self.client.sign_in(verify_sign_in)\n```\n\n### Customization\n\nCustomize `PasswordlessOptions` by providing `api_secret` with your Application's Api Secret.\nYou can also change the `api_url` if you prefer to self-host.\n\nCustomize `PasswordlessClientBuilder` by providing `session` [requests Session][requests] instance.\n\n### Examples\n\nSee [Passwordless Python Example](examples/flask) for Flash Web application.\n\n## Documentation\n\nFor a comprehensive list of examples, check out the [API documentation][api-docs].\n\n## Contributing\n\nThis library is compatible with Python 3 and requires minimum Python 3.9 installed.\nInstall [Poetry][poetry] if not already installed.\n\nActivate shell: `poetry shell`\n\nInstall dependencies: `poetry install --with dev,test`\n\nBuild: `poetry build`\n\n[api-docs]:https://docs.passwordless.dev/guide/get-started.html\n\n[poetry]:https://python-poetry.org/docs/#installation\n\n[requests]:https://requests.readthedocs.io/en/latest/\n\n[marshmallow]:https://marshmallow.readthedocs.io/en/stable/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitwarden%2Fpasswordless-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitwarden%2Fpasswordless-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitwarden%2Fpasswordless-python/lists"}