Skip to main content

A description of your package

Project description

Python SDK licensing

This SDK helps to manage client licenses, generate keys, and interact with a license server.

Installation

You can install My Package using pip:

For all systems:

pip install ./dist/license_bb-0.1.0-py3-none-any.whl

or:

pip install git+https://github.com/Adannak24/python_SDK_licensing

Functions

init(base_url, license_key, client_details)

Initializes the client's configuration by creating an init file and generating necessary keys.

  • Args:

    • base_url (str): License server API base URL without the API endpoints.
    • license_key (str): License key received by the user on requesting or subscribing.
    • client_details (dict): Dictionary containing 'email', 'org_id', 'phone', 'user_name', 'org_name', and 'server_name' (optional).
  • Returns:

    • dict: Combined information including client and system details.

do_exchange(org_id, client_details)

Exchanges the client's public key with the license server and retrieves the server's public key.

  • Args:

    • org_id (str): Unique ID for each organization.
    • client_details (dict): Full configuration from the init() function.
  • Returns:

    • dict: Response from the licensing server.

get_license(org_id, client_details)

Retrieves the available/assigned license for the client from the license server.

  • Args:

    • org_id (str): Unique ID for each organization.
    • client_details (dict): Full configuration from the init() function.
  • Returns:

    • dict: Response from the licensing server.

update_license(license_key, org_id, assign_type)

Updates the client's license key and assigns type in the init() configuration.

  • Args:

    • license_key (str): New license key.
    • org_id (str): Unique ID for each organization.
    • assign_type (str): Assign type, either 'update' or 'default'.
  • Returns:

    • dict: Response from the licensing server.

get_feature(org_id, feature_name)

Retrieves the specified feature details from the license file.

  • Args:

    • org_id (str): Unique ID for each organization.
    • feature_name (str): Specific feature name or 'all' for all features.
  • Returns:

    • dict: Feature details.

Example Usage

command to make whl: python setup.py sdist bdist_wheel

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

license_bb-0.1.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

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

license_bb-0.1.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file license_bb-0.1.0.tar.gz.

File metadata

  • Download URL: license_bb-0.1.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.9

File hashes

Hashes for license_bb-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f522eed6246d3daea6da224ae5d6086769c6b4c4aa475f71738b3d61d67d39e5
MD5 5cc2186efd33b2f1f1ae4d2a21938f0d
BLAKE2b-256 f159321285d4d95dde11e9f9a9b8980b554afed519185d3760d2ef941a971512

See more details on using hashes here.

File details

Details for the file license_bb-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: license_bb-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.9

File hashes

Hashes for license_bb-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f1c81585fe88736077dc806c3cecaefc3788d244c1735c90db6dcdf4b491df29
MD5 07227b19cfde6c61d2d203fa7b6cd4a9
BLAKE2b-256 8057abd69477cbaf6e48e8636a3ae2bddc4541fb539a2cfe85fa0c41d1efe2fb

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