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.1.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.1-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: novacore_pl-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 3ae92cae1b54b94b37d8ad2f89499be8247803fe2bc4491ee6dc864ba34a73d3
MD5 f204a5d21d4be1627e64250168d67e6f
BLAKE2b-256 6e15460dffc174da4308afd45572099f7ed63fb4b454c8a3545787d8bd488c8f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: novacore_pl-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7f27384e612d88a1a7190fc8217e642768d58e9ebd8aa29ed8c055d186b5bfd1
MD5 00bf9de332900263a0ee761cb85dbb3b
BLAKE2b-256 d7d3085c927d9cc4b9bc8bb250d962dc4215c93949f97a1a11e043026e6e044a

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