Skip to main content

License validation for Phantom Licensing System

Project description

🧩 Python — NovaCore LicenseCheck

NovaCore LicenseCheck is a lightweight module or CLI utility for license verification.
It handles all Phantom API response formats and allows silent or embedded use.


🧠 Features

  • ✅ Phantom Licenses API compatible
  • 🧾 POST verification using header LICENSE_KEY
  • 🔁 Auto-retry with JSON body on HTTP 500
  • 🧩 Skip logic for optional fields (discord_id, product.name)
  • 🧮 Deterministic exit codes (0–5) for automation

⚙ Implementation

Dependencies

  • Python 3.8+
  • requests package [Auto Installed]
pip install novacore

Code

from novacore import login, login_silent, login_noexit
import sys

# Call LicenseCheck normally (config file at config/config.json)
try:
    login()
except Exception as e:
    print("Something went wrong, Here's a preview for developers:"+"\n"+e)
    sys.exit(1)

# Call LicenseCheck silently so user doesn't know it's called unless Mismatches found (config file at config/config.json)
try:
    login_silent()
except Exception as e:
    print("Something went wrong, Here's a preview for developers:"+"\n"+e)
    sys.exit(1)

# Call LicenseCheck with no exit so even if any mismatches are found user does/can see logs but program is not exitted (config file at config/config.json)
try:   
    login_noexit()
except Exception as e:
    print("Something went wrong, Here's a preview for developers:"+"\n"+e)
    sys.exit(1)





# If you want to get license info from a json file not located at config/config.json but rather located at "path" then use
login(path)
login_noexit(path)
login_silent(path)  


# It will exit (not the noexit one) if mismatches found and will continue running normally if not

Config

{
  "license": {
    "url": "https://your_domain/api/license",
    "key": "license_key",
    "discord_id": "discord_ID___optional",
    "product_name": "product_name___optional"
  }
}

💡 Exit Codes

Code - Meaning

  • 0 - ✅ Success
  • 2 - ⚙️ Config error
  • 3 - 🌐 API/network error
  • 4 - ❌ Mismatch(es) found
  • 5 - 🔑 Invalid license key

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

novacore_pl-1.0.0.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

novacore_pl-1.0.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file novacore_pl-1.0.0.tar.gz.

File metadata

  • Download URL: novacore_pl-1.0.0.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for novacore_pl-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1244f082f0b82822bcb1e99edb53ec66a6f546b2052f5550e450ae11a1f3f0b7
MD5 4bcf0c974386328cc22c01ac6bcc4a5d
BLAKE2b-256 05d555fcc85b5721d6be7da5b7d8bd79ca9e21f4ba08d5dce8d7aba25575ee27

See more details on using hashes here.

File details

Details for the file novacore_pl-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: novacore_pl-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for novacore_pl-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2cd237350e2c860e84fd19032604f9e92226afab1e78af442b3659884ff0375f
MD5 ac363723035da59871de72748033f4f6
BLAKE2b-256 8ab4cc36c54bb53c13a1004d888b9854972809e197078c270468336995991e1f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page