unkey-py


Nameunkey-py JSON
Version 0.4.2 PyPI version JSON
download
home_pagehttps://github.com/Jonxslays/unkey.py
SummaryAn asynchronous Python SDK for unkey.dev.
upload_time2023-08-18 03:31:46
maintainer
docs_urlNone
authorJonxslays
requires_python>=3.8
licenseGPL-3.0-only
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # unkey.py

An asynchronous Python SDK for [unkey.dev](https://unkey.dev/).

## Documentation

- [Stable](https://jonxslays.github.io/unkey.py/)
- [Development](https://jonxslays.github.io/unkey.py/dev/)

## Installation

**Python version 3.8 or greater is required to use unkey.py.**

### Stable

```sh
pip install -U unkey.py
```

### Development

```sh
pip install -U git+https://github.com/Jonxslays/unkey.py
```

For more information on using `pip`, check out the [pip documentation](https://pip.pypa.io/en/stable/).

## Example

```py
import asyncio
import os

import unkey


async def main() -> None:
    client = unkey.Client(api_key=os.environ["API_KEY"])
    await client.start()

    result = await client.keys.verify_key("prefix_123ABC")

    if result.is_ok:
        data = result.unwrap()
        print(data.valid)
        print(data.owner_id)
        print(data.meta)
        print(data.error)
    else:
        print(result.unwrap_err())

    await client.close()


if __name__ == "__main__":
    asyncio.run(main())

```

## What is unkey.dev

unkey.dev is a fully open source API key management solution. It allows you to create,
manage, and validate API keys for your applications users. You can even host it yourself,
that's the beauty of open source.

If you're interested in learning more about the project, consider checking out any of these links:

- [Website](https://unkey.dev/)
- [API documentation](https://docs.unkey.dev/)
- [Github repository](https://github.com/chronark/unkey)
- [Discord community](https://discord.gg/TmMczTKArw)

## Contributing

unkey.py is open to contributions. Check out the
[contributing guide](https://github.com/Jonxslays/unkey.py/blob/master/CONTRIBUTING.md) to learn how.

## License

unkey.py is licensed under the [GPLv3 License](https://github.com/Jonxslays/unkey.py/blob/master/LICENSE).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Jonxslays/unkey.py",
    "name": "unkey-py",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "Jonxslays",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/f8/bc/e2a76021135203971d2a218b8b953120ebc74a7e528b1f1db828bd3db422/unkey_py-0.4.2.tar.gz",
    "platform": null,
    "description": "# unkey.py\n\nAn asynchronous Python SDK for [unkey.dev](https://unkey.dev/).\n\n## Documentation\n\n- [Stable](https://jonxslays.github.io/unkey.py/)\n- [Development](https://jonxslays.github.io/unkey.py/dev/)\n\n## Installation\n\n**Python version 3.8 or greater is required to use unkey.py.**\n\n### Stable\n\n```sh\npip install -U unkey.py\n```\n\n### Development\n\n```sh\npip install -U git+https://github.com/Jonxslays/unkey.py\n```\n\nFor more information on using `pip`, check out the [pip documentation](https://pip.pypa.io/en/stable/).\n\n## Example\n\n```py\nimport asyncio\nimport os\n\nimport unkey\n\n\nasync def main() -> None:\n    client = unkey.Client(api_key=os.environ[\"API_KEY\"])\n    await client.start()\n\n    result = await client.keys.verify_key(\"prefix_123ABC\")\n\n    if result.is_ok:\n        data = result.unwrap()\n        print(data.valid)\n        print(data.owner_id)\n        print(data.meta)\n        print(data.error)\n    else:\n        print(result.unwrap_err())\n\n    await client.close()\n\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n\n```\n\n## What is unkey.dev\n\nunkey.dev is a fully open source API key management solution. It allows you to create,\nmanage, and validate API keys for your applications users. You can even host it yourself,\nthat's the beauty of open source.\n\nIf you're interested in learning more about the project, consider checking out any of these links:\n\n- [Website](https://unkey.dev/)\n- [API documentation](https://docs.unkey.dev/)\n- [Github repository](https://github.com/chronark/unkey)\n- [Discord community](https://discord.gg/TmMczTKArw)\n\n## Contributing\n\nunkey.py is open to contributions. Check out the\n[contributing guide](https://github.com/Jonxslays/unkey.py/blob/master/CONTRIBUTING.md) to learn how.\n\n## License\n\nunkey.py is licensed under the [GPLv3 License](https://github.com/Jonxslays/unkey.py/blob/master/LICENSE).\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-only",
    "summary": "An asynchronous Python SDK for unkey.dev.",
    "version": "0.4.2",
    "project_urls": {
        "Homepage": "https://github.com/Jonxslays/unkey.py",
        "Repository": "https://github.com/Jonxslays/unkey.py"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ec8a58e277e610833cd8ecd818f7876e2923d47991af397d507ced242a0fc21b",
                "md5": "b552d853c457b03526280a8705e1e2c8",
                "sha256": "905fdf0744c82d1349f1506e1e6f1c8e1a07905ebbf6fabcdc6771ac130902f8"
            },
            "downloads": -1,
            "filename": "unkey_py-0.4.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b552d853c457b03526280a8705e1e2c8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 30010,
            "upload_time": "2023-08-18T03:31:45",
            "upload_time_iso_8601": "2023-08-18T03:31:45.262145Z",
            "url": "https://files.pythonhosted.org/packages/ec/8a/58e277e610833cd8ecd818f7876e2923d47991af397d507ced242a0fc21b/unkey_py-0.4.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f8bce2a76021135203971d2a218b8b953120ebc74a7e528b1f1db828bd3db422",
                "md5": "8e1cbae3e4380da5153378720f28ebe3",
                "sha256": "7e177ddc017e0b42cd0e4b432b20ca4490aaca81d53ca382c185c6e3d40ea203"
            },
            "downloads": -1,
            "filename": "unkey_py-0.4.2.tar.gz",
            "has_sig": false,
            "md5_digest": "8e1cbae3e4380da5153378720f28ebe3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 24754,
            "upload_time": "2023-08-18T03:31:46",
            "upload_time_iso_8601": "2023-08-18T03:31:46.831805Z",
            "url": "https://files.pythonhosted.org/packages/f8/bc/e2a76021135203971d2a218b8b953120ebc74a7e528b1f1db828bd3db422/unkey_py-0.4.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-18 03:31:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Jonxslays",
    "github_project": "unkey.py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "unkey-py"
}
        
Elapsed time: 1.93649s