Olivia Auth Python SDK
Python SDK for Olivia Auth protected apps.
Requirements
- Windows x64
- Python 3.8+
- The app-specific
OliviaAuth.dlldownloaded from the dashboard
Install
pip install oliviauth
Put OliviaAuth.dll beside your Python entrypoint. The DLL already contains
the app owner, app name, server URL, encryption keys, and SSL pin. Your code
only passes version and mode.
Quick Start
from oliviauth import OliviaAuth
api = OliviaAuth(version="1.0.0", mode="socket")
session = api.license(input("License key: ").strip())
if not session:
print(api.last_error)
raise SystemExit(1)
print(f"Welcome {session.username}")
api.close()
mode can be "socket" or "http". Socket mode is recommended for desktop
apps.
What The Customer Ships
your_app.exe or your_app.py
OliviaAuth.dll
Do not put owner_id, client_key, server_key, server URL, SSL pin, or HWID
code in the customer app. The DLL handles that internally.
License Auth
from oliviauth import OliviaAuth
api = OliviaAuth(version="1.0.0", mode="socket")
session = api.license("XXXX-XXXX-XXXX-XXXX")
if not session:
print(api.last_error)
raise SystemExit(1)
if not session.has_subscription():
print("No active subscription")
raise SystemExit(1)
print(session.username)
api.close()
Login
from oliviauth import OliviaAuth
api = OliviaAuth(version="1.0.0", mode="http")
session = api.login("username", "password")
if not session:
print(api.last_error)
raise SystemExit(1)
print(session.username)
api.close()
HWID is generated inside OliviaAuth.dll when you do not pass one.
App Variables
api = OliviaAuth(version="1.0.0")
session = api.license("XXXX-XXXX-XXXX-XXXX")
download_url = session.get_app_var("download_url")
api.close()
Errors
Use api.last_error after a failed authentication. DLL load/configuration
errors raise RuntimeError with the underlying OliviaAuth message.
| Error | Fix |
|---|---|
OliviaAuth.dll could not be loaded |
Put the app-specific DLL beside the app or on PATH |
OliviaAuth.dll is not configured for this app |
Download the DLL from the dashboard for this app |
| SSL pin / certificate error | Download a fresh DLL after the dashboard updates the pin |
HWID mismatch |
Reset the user's HWID in the dashboard |
Version mismatch |
Update the app version in code or dashboard |
Examples
The examples/ folder uses the protected DLL flow:
| File | Purpose |
|---|---|
quick_start.py |
Minimal license auth |
license_example.py |
License auth with subscription check |
login_example.py |
Username/password auth |
subscription_example.py |
Subscription check |
download_example.py |
Private download after auth |
websocket_example.py |
Socket mode app |
complete_example.py |
Common calls in one file |
OliviaShield
OliviaShield protects your compiled app and returns a bundle containing the
protected executable plus OliviaAuth.dll.
For local testing, download OliviaAuth.dll from the app settings page and run
your app beside that DLL before sending the executable through Shield.
Release files for oliviauth 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| oliviauth-1.0.2.tar.gz | 2.7 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| oliviauth-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.4 MB
Release files / oliviauth-1.0.2.tar.gz
| Download URL | oliviauth-1.0.2.tar.gz |
|---|---|
| Size | 2.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
45ea602be2274b913d4a917ca4aa64420dc0899ee4adb894808f45718fcd6ca0
|
|
BLAKE2b-256 checksum How to use checksums |
9bb122bbadb08a8d9ce936b94e99400fd94020251949ccebac9962ccaf8bfef6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Release files / oliviauth-1.0.2-py3-none-any.whl
| Download URL | oliviauth-1.0.2-py3-none-any.whl |
|---|---|
| Size | 2.7 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d6816ed8d0ea12f210d6419e22bc6073e559540494b0f4fdd1f2223f51da86e4
|
|
BLAKE2b-256 checksum How to use checksums |
f601ec0188d2b15da69c6f365c6ad2c9da4f33f4ff81f94afb14aaed3956b433
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|