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
UserModel Create(string projectId,string userName,string email,string password)
Create new user, return the user created.LoginResult LoginWithEmail(string projectId,string email,string password )
Login a user with email.LoginResult LoginWithUserName(string projectId,string userName,string password )
Login a user with userName.LoginResult RevokeToken(string userToken)
Revoke a user token.SendResetPassword(string projectId,string email)
Send password reset email to email user.SendEmailConfirmation(string projectId,string email)
Send email confirmation to email user.UserModel Upgrade(string userToken,string userName,string email,string password)
Upgrade anonymous to real user, return upgraded user.UserModel GetById(string userToken,string userId)
Get user by id.string GetType(string userToken)
Get user type(REAL/ANONYMOUS/EXTERNALLOGIN).UserModel SetDisplayName(string userToken,string displayName)
Set user displayName.GeolocalizationModel GetGeolocalizationData(string userToken)
Get user geolocalization data.UserModel Delete(string userToken)
Delete user, return deleted user.
Anonymous
LoginResult Login(string projectId,string deviceId)
Login anonymous user.LoginResult Create(string projectId,string deviceId)
Create anonymous user.
External Login
UserModel Create(string projectId,string loginProvider,string providerKey,string providerDisplayName,string userEmail,string userName)
Create external login.LoginResult Login(string projectId,string loginProvider,string providerKey)
Login using external login.ExternalLoginModel Get(string userToken,string loginProvider,string providerKey)
Get external login.ExternalLoginModel Delete(string userToken,string loginProvider,pstring roviderKey)
Delete external login, return deleted external login.
Preset
PresetModel GetById(string userToken,string presetId)
Get preset by id.PresetModel GetByName(string userToken,string presetName)
Get preset by name.
Variable
VariableModel Update(string userToken,string presetId, string value)
Update variable, if it does not exists this will create a new variable with the value provided.VariableModel Get(string userToken,string presetId)
Get variable.VariableModel Delete(string userToken,string presetId)
Delete variable, return deleted variable.VariablesModel GetList(string userToken,string presetId,int skip,int take,orderType orderType, string searchValue)
Get variables list.
orderType: (argument) enum HighToLow=0, LowToHigh=1, Newest=2, Oldest=3.
VariablesModel: (return type )an object that contains a list of (VariableModel) and totalCount of variables without pagination applied.int Count(string userToken,string presetId,string searchValue)
Get the count of variables without pagination applied.
Example
Create a new user and print its id.
Project Id to get from Nucle.cloud dashboard.
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.
Project Id to get from Nucle.cloud dashboard.
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
Built Distribution
File details
Details for the file nucle.cloud-0.0.8.tar.gz
.
File metadata
- Download URL: nucle.cloud-0.0.8.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bc39b1ab2264a2b78d7aa46834dd2181db7a02c82ef608559806a47b1a53f33 |
|
MD5 | feacf5b4732014d9ac07736aaaa6a545 |
|
BLAKE2b-256 | 4348637ee0907008bfd835cd7b01b0ced14334f87d8ba420a3c79232560c726c |
File details
Details for the file nucle.cloud-0.0.8-py3-none-any.whl
.
File metadata
- Download URL: nucle.cloud-0.0.8-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | afc93cafe33d2e8e7423880afdcdeb1df3310bcda53fc7fbb4b97b9ad10cfeae |
|
MD5 | 346779e3b8190ac023baebc72bc7954a |
|
BLAKE2b-256 | 569a7c81ffb5e898242305b368b2953770e0d0050e0d1f18e15b6d76888e1173 |