Skip to main content

The official Python library for Nucle Cloud service.

Project description

Nucle Cloud Python Library

In order to make life easier for you, we have created a Nucle Cloud Python library that you can download and use. This tool will allow you instant access to the Nucle Cloud API service in a Python environment, you will be writing less lines of code and save a lot of time.

Instalation

pip install nucle.cloud

Content

First thing to do when using the library is to import it like bellow

from Nucle.Cloud import *

User

  • Create(projectId,userName,email,password)
    Create new user, return the user created (UserModel)
  • Login(projectId,email,password )
    Login a user, return (LoginResult)
  • RevokeToken(userToken)
    Revoke a user token, return (LoginResult)
  • SendResetPassword(projectId,email)
    Send password reset email to email user
  • SendEmailConfirmation(projectId,email)
    Send email confirmation to email user
  • Upgrade(userToken,userName,email,password)
    Upgrade anonymous to real user, return upgraded user (UserModel)
  • GetById(userToken,userId)
    Get user by id ,return user (UserModel)
  • GetType(userToken)
    Get user type(REAL/ANONYMOUS/EXTERNALLOGIN), return type (string)
  • SetDisplayName(userToken,displayName)
    Set user displayName, return user (UserModel)
  • GetGeolocalizationData(userToken)
    Get user geolocalization data , return (GeolocalizationModel)
  • Delete(userToken)
    Delete user, return deleted user (UserModel)

Anonymous

  • Login(projectId,deviceId)
    Login anonymous user, return (LoginResult)
  • Create(projectId,deviceId)
    Create anonymous user, return (LoginResult)

External Login

  • Create(projectId,loginProvider,providerKey,providerDisplayName,userEmail,userName)
    Create external login, return (UserModel)
  • Login(projectId,loginProvider,providerKey)
    Login using external login, return (LoginResult)
  • Get(userToken,loginProvider,providerKey)
    Get external login, return (ExternalLoginModel)
  • Delete(userToken,loginProvider,providerKey)
    Delete external login, return deleted external login (ExternalLoginModel)

Preset

  • GetById(userToken,presetId)
    Get preset by id, return (PresetModel)
  • GetByName(userToken,presetName)
    Get preset by name, return (PresetModel)

Variable

  • Update(userToken,presetId, value)
    Update variable, if it does not exists this will create a new variable with the value provided, return (VariableModel).
  • Get(userToken,presetId)
    Get variable, return (VariableModel)
  • Delete(userToken,presetId)
    Delete variable, return deleted variable (VariableModel)
  • GetList(userToken,presetId,skip,take,orderType, searchValue)
    Get variables list, return (VariablesModel), VariablesModel: has a list of (VariableModel) and totalCount of variables without pagination applied
  • Count(userToken,presetId, searchValue)
    Count of variables without pagination applied

Example

Create a new user and print its id.

from Nucle.Cloud import *

projectId ='b943b785-********************8ec173'
newUser = User.Create(projectId,'ross88@gmail.com', 'P@ssw0rd', 'ross')
print('New user id= '+newUser.id)

Login a user and print its token.

from Nucle.Cloud import *

projectId ='b943b785-********************8ec173'
loginResult = User.Login(projectId,'ross88@gmail.com', 'P@ssw0rd')
print('User token= '+loginResult.userToken)

GitHub

You can always check the source code on GitHub, report any bugs or contribute if you would like.

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

nucle.cloud-0.0.7.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

nucle.cloud-0.0.7-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file nucle.cloud-0.0.7.tar.gz.

File metadata

  • Download URL: nucle.cloud-0.0.7.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.9

File hashes

Hashes for nucle.cloud-0.0.7.tar.gz
Algorithm Hash digest
SHA256 23749a71f70b5ae8a0a4a5c5d9193dbc87c8eefc48629b13dbee7959dfbd0eb5
MD5 bfb436a52462590b5ced5c080fefb774
BLAKE2b-256 25e687a990388ad4dba38a4d2ab5e45da6688f92487844e24e661de90ef2f545

See more details on using hashes here.

File details

Details for the file nucle.cloud-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: nucle.cloud-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.9

File hashes

Hashes for nucle.cloud-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 88980cc0324f2db898f7dc890837cd8eacea35da293fdea3bfc9da2e95e03706
MD5 4afe2c0eb415b205641b3df811c22d9f
BLAKE2b-256 b88a194c6d497de4644b911d0b927bd440412dd17a2d2f6c6088b9ffe8ba2fb4

See more details on using hashes here.

Supported by

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