luaward - Python SDK
Sync and async Python client for the Luaward Developer REST API (/v3), including LuarmorCompat. Requires Python 3.10+.
Installation
pip install luaward
Official Python SDK for Luaward. Supports both synchronous and asynchronous calls with zero external dependencies (the async client delegates to the sync HTTP client via asyncio.to_thread() using Python's standard urllib; see luaward.com/docs and github.com/luaward).
Credentials and URL
Pass a Developer API key (lwa_live_...) from your workspace's Developer API settings via api_key (not token, and not a CLI/IDE/MCP personal token lwm_...). The default base_url is https://api.luaward.com (the client appends /v3 automatically). Project and script IDs are 32-character hexadecimal IDs from the dashboard or API. Keep credentials strictly in a server-side environment.
Sync client
import os
from luaward import LuawardClient, LuarmorCompat
lw = LuawardClient(
api_key=os.environ["LUAWARD_API_KEY"],
project_id=os.environ["LUAWARD_PROJECT_ID"],
)
created = lw.keys.create(
discord_id="123456789012345678",
key_days=30,
note="Monthly access",
)
print("Generated key:", created["user_key"])
lw.keys.reset_hwid(created["user_key"])
queued = lw.scripts.upload(
os.environ["LUAWARD_SCRIPT_ID"],
'print("Hello from SDK")',
preset="balanced",
)
print("Queued build:", queued["build_id"])
compat = LuarmorCompat(
api_key=os.environ["LUAWARD_API_KEY"],
project_id=os.environ["LUAWARD_PROJECT_ID"],
)
compat.reset_hwid(user_key=created["user_key"], force=True)
key_days starts counting on first key use, while auth_expire sets an explicit Unix timestamp expiration in seconds and takes precedence over key_days when both are provided. Valid preset values are fast, balanced, or max. Once a new build reaches Ready, the loader switches to it automatically unless a newer build has been selected.
Async client
import os
from luaward import AsyncLuawardClient
lw = AsyncLuawardClient(
api_key=os.environ["LUAWARD_API_KEY"],
project_id=os.environ["LUAWARD_PROJECT_ID"],
)
async def on_redeem(discord_id: str):
created = await lw.keys.create(discord_id=discord_id, key_days=30, note="Discord redeem")
return created["user_key"]
The sync client provides keys, scripts, and stats, while the async client exposes keys and request(). Use await lw.request(method, path, body) for other endpoints, verifying fields and scopes against the REST reference. Full parity with every third-party Luarmor wrapper is not guaranteed; test existing automation separately before migrating.
By default, requests retry HTTP 429 and 503 responses up to 3 times (configurable via max_retries and retry_base_delay). Typed exceptions are defined in luaward.exceptions, with raw API responses available on error.payload.
Metadata
Release files for luaward 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| luaward-0.1.1.tar.gz | 10.2 kB | Without provenance | Details for luaward-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| luaward-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for luaward-0.1.1-py3-none-any.whl |
Total release size: 18.3 kB
Release files / luaward-0.1.1.tar.gz
| Download URL | luaward-0.1.1.tar.gz |
|---|---|
| Size | 10.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
48cbddebf9a0889fe84f544ac064cdbd123414d91860486623fd2752ba8a865e
|
|
BLAKE2b-256 checksum How to use checksums |
a80286c03fe9fe70121b624c3bb19dd097e7671eb76cecdbb8caa72c25198997
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|
Release files / luaward-0.1.1-py3-none-any.whl
| Download URL | luaward-0.1.1-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0db3fa08ce6741a6c01e2f3545cfcbe58a18ec31cd30bc02b203856b66d1c087
|
|
BLAKE2b-256 checksum How to use checksums |
0e2890532de73458587f79d0fd1f0c1425f391b85b45b24824450b78077f6842
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|
Security for luaward 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.