{"id":31751452,"url":"https://github.com/appsolves/pylocalauth","last_synced_at":"2025-10-09T16:23:23.102Z","repository":{"id":318016457,"uuid":"1069713417","full_name":"AppSolves/pylocalauth","owner":"AppSolves","description":"Cross-platform local authentication library for Python applications.","archived":false,"fork":false,"pushed_at":"2025-10-04T14:43:02.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-04T15:24:56.885Z","etag":null,"topics":["abstraction","api","authentication","cross-platform","localauthentication","native","python","python3"],"latest_commit_sha":null,"homepage":"https://www.appsolves.dev","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/AppSolves.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"AppSolves"}},"created_at":"2025-10-04T13:29:20.000Z","updated_at":"2025-10-04T14:43:05.000Z","dependencies_parsed_at":"2025-10-04T15:25:00.249Z","dependency_job_id":"ffb9392c-40fe-47ff-b3b2-6a8aa32ec634","html_url":"https://github.com/AppSolves/pylocalauth","commit_stats":null,"previous_names":["appsolves/pylocalauth"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/AppSolves/pylocalauth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppSolves%2Fpylocalauth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppSolves%2Fpylocalauth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppSolves%2Fpylocalauth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppSolves%2Fpylocalauth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AppSolves","download_url":"https://codeload.github.com/AppSolves/pylocalauth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppSolves%2Fpylocalauth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001767,"owners_count":26083171,"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-09T02:00:07.460Z","response_time":59,"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":["abstraction","api","authentication","cross-platform","localauthentication","native","python","python3"],"created_at":"2025-10-09T16:23:20.413Z","updated_at":"2025-10-09T16:23:23.096Z","avatar_url":"https://github.com/AppSolves.png","language":"Python","funding_links":["https://github.com/sponsors/AppSolves"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ckbd\u003e\u003cimg src=\"https://raw.githubusercontent.com/AppSolves/pylocalauth/refs/heads/main/assets/github/repo_card.png?sanitize=true\" alt=\"pylocalauth\"\u003e\u003c/kbd\u003e\n\u003c/p\u003e\n\u003cbr\u003e\n\n# `pylocalauth`\n\n\u003cp align=\"center\"\u003eCross-platform local authentication library for Python applications.\u003c/p\u003e\n\u003cbr\u003e\n\n[![build](https://github.com/AppSolves/pylocalauth/workflows/Build/badge.svg)](https://github.com/AppSolves/pylocalauth/actions)\n[![PyPI version](https://badge.fury.io/py/pylocalauth.svg)](https://badge.fury.io/py/pylocalauth)\n[![Downloads](https://pepy.tech/badge/pylocalauth)](https://pepy.tech/project/pylocalauth)\n\n---\n\n**Documentation**: \u003ca href=\"https://github.com/AppSolves/pylocalauth/blob/main/README.md\" target=\"_blank\"\u003eREADME\u003c/a\u003e\n\n**Source Code**: \u003ca href=\"https://github.com/AppSolves/pylocalauth\" target=\"_blank\"\u003eRepository\u003c/a\u003e\n\n---\n\nAdd local authentication to your Python applications with ease. `pylocalauth` provides a simple and secure way to authenticate users using platform-specific methods such as passwords, biometrics, and PINs.\n\n## Features\n\n| Feature | Status |\n|---------|:------:|\n| **Cross-platform**: Works on Windows, macOS, and Linux. (*macOS is still in beta, but it should work reliably*) | ✅ |\n| **Multiple authentication methods**: Supports password-based, biometric (Windows Hello, Touch ID, etc.), and PIN-based authentication. | ✅ |\n| **Easy integration**: Simple API for integrating local authentication into your Python applications. | ✅ |\n| **Secure**: Utilizes platform-specific security features to ensure user data is protected. | ✅ |\n| **Lightweight**: Minimal dependencies and easy to install. | ✅ |\n\n\u003cbr\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003cb\u003eWindows Example\u003c/b\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003cb\u003eLinux Example\u003c/b\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\n      \u003ckbd\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/AppSolves/pylocalauth/refs/heads/main/assets/usage/windows.png?sanitize=true\" alt=\"Windows Example\" width=\"400\"/\u003e\n      \u003c/kbd\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n      \u003ckbd\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/AppSolves/pylocalauth/refs/heads/main/assets/usage/linux.png?sanitize=true\" alt=\"Linux Example\" width=\"400\"/\u003e\n      \u003c/kbd\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\u003cbr\u003e\n\n## Installation\n\nYou can install `pylocalauth` via pip:\n\n```bash\npip install pylocalauth --upgrade\n```\n\n## Usage\n\nHere's a very simple example of how to use `pylocalauth` to authenticate a user:\n\n```python\nfrom pylocalauth import authenticate # Import the authenticate function for your platform\nresult = authenticate()\nif result:\n    print(\"Authentication successful!\")\nelse:\n    print(\"Authentication failed.\")\n```\n\nYou can also customize the message displayed during authentication:\n\n```python\nfrom pylocalauth import authenticate\nresult = authenticate(message=\"Please authenticate to proceed.\")\n```\n\nBy default, `pylocalauth` will raise an `AuthUnavailableError` if authentication is not available on the current platform. You can disable this behavior by setting the `check_availability` parameter to `False` (You should only do this if you plan to handle the unavailability yourself):\n\n```python\nfrom pylocalauth import authenticate, is_available\nfrom pylocalauth.exceptions import AuthError, AuthUnavailableError\n\n# Let it handle availability automatically\ntry:\n    result = authenticate(check_availability=True) # default\n    print(f\"Authentication successful?: {result}\")\nexcept AuthUnavailableError:\n    print(\"Authentication is not available on this platform.\")\nexcept AuthError as e:\n    print(f\"An error occurred: {e}\")\n\n# Handle availability yourself\ntry:\n    if not is_available():\n        print(\"Authentication is not available on this platform.\")\n    else:\n        result = authenticate(check_availability=False)\n        print(f\"Authentication successful?: {result}\")\nexcept AuthError as e:\n    print(f\"An error occurred: {e}\")\n```\n\n## Contributing\n\nWe welcome contributions from the community! If you'd like to contribute, please follow the steps explained in the [CONTRIBUTORS](CONTRIBUTORS.md) file.\n\n#### Contributions Needed\n\nWe are especially looking for help with the following:\n\n- **macOS support:** Testing, bug reports, and improvements for the macOS backend.\n- **Documentation \u0026 Tests:** Examples, API docs, tests (using `pytest` and `pytest-asyncio`) and usage guides.\n- **CI/CD:** Enhancements to cross-platform test automation.\n- **New authentication methods:** Suggestions or PRs for additional local authentication backends.\n- **Issue triage:** Help us reproduce and resolve open issues.\n\nIf you want to help, please see [CONTRIBUTORS](CONTRIBUTORS.md) and open an issue or pull request!\n\n## Development\n\n### Setup environment\n\nWe use [Hatch](https://hatch.pypa.io/latest/install/) to manage the development environment and production build. Ensure it's installed on your system.\n\n### Run unit tests\n\nYou can run all the tests with:\n\n```bash\nhatch run test\n```\n\n### Format the code\n\nExecute the following command to apply `isort` and `black` formatting:\n\n```bash\nhatch run lint\n```\n\n## License\n\nThis project is licensed under the terms of the Apache 2.0 license.\nSee the [LICENSE](LICENSE) file for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappsolves%2Fpylocalauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappsolves%2Fpylocalauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappsolves%2Fpylocalauth/lists"}