Skip to main content

Longleding Push Service SDK

Project description

Longleding Push Service SDK

Supported Python Versions

Python >= 3.6

Installation

longleding-push-service-sdk is available for Linux, macOS, and Windows.

$ pip install longleding-push-service-sdk

Basic Usage

# -*- coding: utf-8 -*-
from sdk import push_service

push_service_endpoint = "localhost:80"
source_name = "demo"

push_service.init_service(endpoint=push_service_endpoint, source=source_name)


def send_sms_register_code():
    push_service.send_sms_register_code("xxxxxxxxxxx", "xxxxxx")


def send_sms_login_code():
    push_service.send_sms_login_code("xxxxxxxxxxx", "xxxxxx")


def send_sms_change_password_code():
    push_service.send_sms_change_password_code("xxxxxxxxxxx", "xxxxxx")


def send_sms_follow_up_login_code():
    push_service.send_sms_follow_up_login_code("xxxxxxxxxxx", "xxxxxx")


def send_sms_follow_up_login_notification():
    push_service.send_sms_follow_up_login_notification("xxxxxxxxxxx", "xxx", "xxx", "xxxxxxx")


def send_sms_follow_up_login_notification_wechat():
    push_service.send_sms_follow_up_login_notification_wechat("xxxxxxxxxxx", "xxx", "xxx", "xxxxxxx", "xxxxxxx")


def send_sms_general_verification_code():
    push_service.send_sms_general_verification_code("xxxxxxxxxxx", "xxxxxx")


def send_email_register_code():
    push_service.send_email_register_code("xxxxxxxxxxx", "xxxxxx")


def send_email_login_code():
    push_service.send_email_login_code("xxxxxxxxxxx", "xxxxxx")


def send_email_change_password_code():
    push_service.send_email_change_password_code("xxxxxxxxxxx", "xxxxxx")


def send_email_general_verification_code():
    push_service.send_email_general_verification_code("xxxxxxxxxxx", "xxxxxx")


if __name__ == '__main__':
    send_sms_register_code()

Troubleshoot

If you encounter error messages similar to the following:

...
TypeError: Couldn't build proto file into descriptor pool!
Invalid proto descriptor for file "common.proto":
  common.proto: A file with this name is already in the pool.

Setting an environment variable the following before running:

export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION='python'

See also

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

longleding-push-service-sdk-0.2.2.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file longleding-push-service-sdk-0.2.2.tar.gz.

File metadata

  • Download URL: longleding-push-service-sdk-0.2.2.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.8.0

File hashes

Hashes for longleding-push-service-sdk-0.2.2.tar.gz
Algorithm Hash digest
SHA256 155f9d785ee7e044a6e3990cd8cdb8bc2c5f903d4116ea850982b8800e4ddefe
MD5 6950fb2b427d20061d24c4c1112cfcfa
BLAKE2b-256 96feb9b781c77297aa4630b6603f6793e2a2bcbdf2286c8e583ac81133a4ec6a

See more details on using hashes here.

File details

Details for the file longleding_push_service_sdk-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: longleding_push_service_sdk-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 21.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.8.0

File hashes

Hashes for longleding_push_service_sdk-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5ae047667bf0807ee1192415aea29e73cde897f301a28a7a8ecbbb08a19b3f20
MD5 4a4a0ce56b8086725ae995f8dbdbe803
BLAKE2b-256 fdc87d8df2fd7499ce8de19a0171b58dbbd3a5928e4c862e48454c53f30e9ff0

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