authlyx-api 2.2.0__tar.gz → 3.0.0b1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,10 @@
1
+ Metadata-Version: 2.4
2
+ Name: authlyx-api
3
+ Version: 3.0.0b1
4
+ Summary: AuthlyX v3 client
5
+ License-Expression: MIT
6
+ Requires-Python: >=3.11
7
+ License-File: LICENSE
8
+ Requires-Dist: cryptography<51,>=50.0.2
9
+ Requires-Dist: aiohttp<4,>=3.14.5
10
+ Dynamic: license-file
@@ -0,0 +1,83 @@
1
+ # AuthlyX Python package
2
+
3
+ The `authlyx-api` package on PyPI. Official Python SDK for AuthlyX V3 (3.0.0 beta).
4
+
5
+ Full documentation: https://docs.authlyx.dev
6
+
7
+ ## Requirements
8
+
9
+ - Windows
10
+ - Python 3.11 or newer
11
+
12
+ ## Run the example
13
+
14
+ This repo is the package itself. For a full console example, see [AuthlyX-PY-Example](https://github.com/authlyx/AuthlyX-PY-Example). To try the package from this folder:
15
+
16
+ ```bat
17
+ pip install .
18
+ ```
19
+
20
+ You can find your app key under your app's credentials in the [dashboard](https://dash.authlyx.dev).
21
+
22
+ ## Add it to your own project
23
+
24
+ ```bat
25
+ pip install --pre authlyx-api
26
+ ```
27
+
28
+ ```python
29
+ import asyncio
30
+ from authlyx_api import AuthlyX
31
+
32
+ async def main():
33
+ app = AuthlyX("YOUR_APP_KEY", "1.0.0")
34
+ connected = await app.initialize()
35
+ print("Connected" if connected.ok else connected.message)
36
+
37
+ asyncio.run(main())
38
+ ```
39
+
40
+ Every method can be awaited. You can also pass `completed=` with a callback instead.
41
+
42
+ ## Signing in
43
+
44
+ ```python
45
+ await app.login("YOUR_USERNAME", "YOUR_PASSWORD")
46
+ await app.login("YOUR_LICENSE_KEY")
47
+ await app.deviceLogin()
48
+ ```
49
+
50
+ Device login signs in the current Windows user without a form. The device has to be approved in your app first. See [Device login](https://docs.authlyx.dev/guides/device-login).
51
+
52
+ After signing in, the account details are in `userData`:
53
+
54
+ ```python
55
+ username = app.userData["Username"]
56
+ plan = app.userData["Plan"]
57
+ expiry = app.userData["ExpiryDate"]
58
+ ```
59
+
60
+ Every method has its own page with examples under [SDK methods](https://docs.authlyx.dev/sdks/methods/login).
61
+
62
+ ## Offline access
63
+
64
+ Once someone is signed in, saving offline access stores a signed permit on that PC:
65
+
66
+ ```python
67
+ saved = await app.saveOfflineAccess()
68
+ available = await app.hasOfflineAccess()
69
+ ```
70
+
71
+ If they open your app later without internet, they sign in with the same username and password or license key, and the SDK checks it against the saved permit. Each permit belongs to one app and one account, and signing out removes it. More in [Offline access](https://docs.authlyx.dev/guides/offline).
72
+
73
+ ## Errors
74
+
75
+ A failed call gives you a `code` and a `message` you can show to the user. Network problems and some setup errors raise `AuthlyXError` instead, so wrap `initialize()` in `try` like the example does. All codes are listed in [Errors](https://docs.authlyx.dev/api-reference/errors).
76
+
77
+ ## Coming from 2.4
78
+
79
+ V3 is a new SDK, not a drop-in update. Apps use an app key instead of the old owner ID, app name and secret, and the method names changed. Read [Move from V2 to V3](https://docs.authlyx.dev/api-reference/migration) before you switch.
80
+
81
+ ## License
82
+
83
+ MIT. See `LICENSE`.
@@ -0,0 +1,16 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "authlyx-api"
7
+ version = "3.0.0b1"
8
+ description = "AuthlyX v3 client"
9
+ requires-python = ">=3.11"
10
+ license = "MIT"
11
+ license-files = ["LICENSE"]
12
+ dependencies = ["cryptography>=50.0.2,<51", "aiohttp>=3.14.5,<4"]
13
+
14
+ [tool.setuptools.packages.find]
15
+ where = ["src"]
16
+ include = ["authlyx_api*"]
@@ -1,4 +1,4 @@
1
- [egg_info]
2
- tag_build =
3
- tag_date = 0
4
-
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+