Skip to main content

pydxp: A Python wrapper for Nectar DXP

pydxp is a python wrapper around the Nectar DXP dashboard REST API.

Installation

pip install pydxp

Getting started

The first thing to do to get started is import module and authenticate with your credentials.

from pydxp import NectarAuth

login = NectarAuth(
    domain="https://demo.us.nectar.services", tenant="regex", authusr="demo1@nectarcorp.com",
    authpwd="PASSWORD"
)

print(login.retrieve_credentials())
Parameter Description
domain The Nectar DXP domain you would like to connect to (defaults to https://us.nectar.services if not specified). Optional.
tenant Tenant name (use it for user’s that have access to multiple tenants). Optional.
authusr Username of the account which has got access to Nectar DXP.
authpwd Corresponding password for the username being used.

List of Available Endpoints

User Endpoints

Search users by query string

import json
from pydxp import NectarAuth
from pydxp import UserEndpoints

login = NectarAuth(
    domain="https://demo.us.nectar.services", tenant="regex", authusr="demo1@nectarcorp.com",
    authpwd="PASSWORD"
)

data = UserEndpoints.search_users_by_query_string(login, username="jane.doe@regex.com")
print(json.dumps(data))
Parameter Description
username Username to be queried on Nectar DXP.
pagenumber Page number for paged response (starts from 1, default = 1). Optional. Example: pagenumber=1
pagesize Page size for paged response (starts from 1, default = 10). Optional. Example: pagesize=10
tenant Tenant name (use it for user’s that have access to multiple tenants. Defaults to tenant name used during authentication). Optional.

Output

{"totalElements": 1, "elements": [{"id": "837", "userId": "837_1_10_*", "photo": null, "userName": "jane.doe", "firstName": "Jane", "lastName": "Doe", "email": "jane.doe@regex.com", "phone": "123-456-7890", "location": null, "address": null, "uri": null, "deleted": false, "city": null, "postalCode": null, "country": null, "postOfficeBox": null, "pbxName": null, "userPbxNumber": null, "displayName": "Jane Doe", "sipAddress": null, "lineUri": null, "platform": "AD", "platformUserName": null, "platforms": ["TEAMS", "ENDPOINT_CLIENT"], "ispName": null, "locationType": null, "hasAdId": true, "hasPlatformId": null, "lastSessionDate": null, "sessionCount": null, "sessionGood": null, "sessionPoor": null, "sessionUnknown": null}]}

Get user quantity summary

UserEndpoints.get_user_quantity_summary(login, username="jane.doe@regex.com", timeperiod="LAST_DAY")
Parameter Description
username Username to be queried on Nectar DXP.
timeperiod Time period for data fetching (LAST_HOUR, LAST_DAY, LAST_WEEK, LAST_MONTH, LAST_QUARTER, LAST_YEAR, CUSTOM) Optional.
tenant Tenant name (use it for user’s that have access to multiple tenants. Defaults to tenant name used during authentication). Optional.

Get user quality summary

UserEndpoints.get_user_quality_summary(login, username="jane.doe@regex.com", timeperiod="LAST_DAY")
Parameter Description
username Username to be queried on Nectar DXP.
timeperiod Time period for data fetching (LAST_HOUR, LAST_DAY, LAST_WEEK, LAST_MONTH, LAST_QUARTER, LAST_YEAR, CUSTOM) Optional.
tenant Tenant name (use it for user’s that have access to multiple tenants. Defaults to tenant name used during authentication). Optional.

Get user server summary

UserEndpoints.get_user_server_summary(login, username="jane.doe@regex.com", timeperiod="LAST_DAY")
Parameter Description
username Username to be queried on Nectar DXP.
timeperiod Time period for data fetching (LAST_HOUR, LAST_DAY, LAST_WEEK, LAST_MONTH, LAST_QUARTER, LAST_YEAR, CUSTOM) Optional.
tenant Tenant name (use it for user’s that have access to multiple tenants. Defaults to tenant name used during authentication). Optional.

Get user client types summary

UserEndpoints.get_user_client_types_summary(login, username="jane.doe@regex.com", timeperiod="LAST_DAY")
Parameter Description
username Username to be queried on Nectar DXP.
timeperiod Time period for data fetching (LAST_HOUR, LAST_DAY, LAST_WEEK, LAST_MONTH, LAST_QUARTER, LAST_YEAR, CUSTOM) Optional.
tenant Tenant name (use it for user’s that have access to multiple tenants. Defaults to tenant name used during authentication). Optional.

Get user devices summary

UserEndpoints.get_user_devices_summary(login, username="jane.doe@regex.com", timeperiod="LAST_DAY")
Parameter Description
username Username to be queried on Nectar DXP.
timeperiod Time period for data fetching (LAST_HOUR, LAST_DAY, LAST_WEEK, LAST_MONTH, LAST_QUARTER, LAST_YEAR, CUSTOM) Optional.
tenant Tenant name (use it for user’s that have access to multiple tenants. Defaults to tenant name used during authentication). Optional.

Get user network types summary

UserEndpoints.get_user_network_types_summary(login, username="jane.doe@regex.com", timeperiod="LAST_DAY")
Parameter Description
username Username to be queried on Nectar DXP.
timeperiod Time period for data fetching (LAST_HOUR, LAST_DAY, LAST_WEEK, LAST_MONTH, LAST_QUARTER, LAST_YEAR, CUSTOM) Optional.
tenant Tenant name (use it for user’s that have access to multiple tenants. Defaults to tenant name used during authentication). Optional.

Get user info

UserEndpoints.get_user_info(login, username="jane.doe@regex.com", timeperiod="LAST_DAY")
Parameter Description
username Username to be queried on Nectar DXP.
tenant Tenant name (use it for user’s that have access to multiple tenants. Defaults to tenant name used during authentication). Optional.

Get advanced user info

UserEndpoints.get_advanced_user_info(login, username="jane.doe@regex.com", timeperiod="LAST_DAY")
Parameter Description
username Username to be queried on Nectar DXP.
tenant Tenant name (use it for user’s that have access to multiple tenants. Defaults to tenant name used during authentication). Optional.

Get user advanced info only status

UserEndpoints.get_user_advanced_info_only_status(login, username="jane.doe@regex.com", timeperiod="LAST_DAY")
Parameter Description
username Username to be queried on Nectar DXP.
tenant Tenant name (use it for user’s that have access to multiple tenants. Defaults to tenant name used during authentication). Optional.

Get pinned users

UserEndpoints.get_pinned_users(login,tenant="regex")
Parameter Description
tenant Tenant name (use it for user’s that have access to multiple tenants. Defaults to tenant name used during authentication). Optional.

Release files for pydxp 0.1.5

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

Source distribution (sdist)

Source distribution for pydxp 0.1.5
File Size Uploaded
pydxp-0.1.5.tar.gz 8.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pydxp 0.1.5
File Interpreter ABI Platform
pydxp-0.1.5-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 14.8 kB

Release files / pydxp-0.1.5.tar.gz

Download URL pydxp-0.1.5.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0d456b0470416a8ad3e4bf53e30be5bf3a0d14a9602e7517dcc57dceb29ed2ce
BLAKE2b-256 checksum
How to use checksums
63840d457d925c775d54fe227ea1153e7390c3f39f8fe86e5cbd157b401ccd68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release files / pydxp-0.1.5-py2.py3-none-any.whl

Download URL pydxp-0.1.5-py2.py3-none-any.whl
Size 6.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
c87e77e319728c6ea0359ece84ac97c6f4bbf8137d5e563c43d74f69e4816135
BLAKE2b-256 checksum
How to use checksums
7c755e78b3dabe325f1cf7695dc2164e7d0df70d0538a00b41a05aa348998123
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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