Skip to main content

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.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for luaward 0.1.2
File Size Uploaded Provenance Actions
luaward-0.1.2.tar.gz 10.3 kB Without provenance Details for luaward-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for luaward 0.1.2
File Interpreter ABI Platform Actions
luaward-0.1.2-py3-none-any.whl Python 3 none any Details for luaward-0.1.2-py3-none-any.whl

Total release size: 18.3 kB

Release files / luaward-0.1.2.tar.gz

Download URL luaward-0.1.2.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
cb286924b6724ad537601f7e901906554e83646ca39abdd8dd37c0433d89b62e
BLAKE2b-256 checksum
How to use checksums
3beaa777f4641d8c2be5c5e707a04c4aec3135465887d6b8b64303ffbf1a2202
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.2-py3-none-any.whl

Download URL luaward-0.1.2-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e1887604ea79eb7e6779f5364c308126dc54427adfad76ac8785c681cf840b6b
BLAKE2b-256 checksum
How to use checksums
f5398d45a1a4723ad8407f10f7856f1b5dcea4a731cd696c86d96e1f3c5066e4
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.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page