Skip to main content

No project description provided

Project description

Upollo Python Client

The Upollo Python library can be used identify users before they login or if they visit from multiple devices.

The Python library runs on your server and can be paired with the web or mobile to protect logins or payments.

Get your API Keys

Sign up for our beta at upollo.ai/beta to get your Private API key.

Getting started

Import the package and create a client with your api key.

from upollo import upollo

privateApiKey = "ADD_PRIVATE_API_KEY_HERE"
upolloClient = upollo.Upollo(privateApiKey)

Validate a User

To validate a user you need a token from the javascript library. See the Upollo Javascript Client Guide for how to get the token.

You also need a userId and possibly their email address or phone number, whichever is available to improve detection. You can use an email address as the id if you don't have another id.

from upollo import upollo
from upollo import upollo_public_pb2

upolloToken = "GET FROM THE WEB CLIENT"

userInfo = upollo_public_pb2.UserInfo(
    user_id="u_1234", # provide your user id if you have it.
    user_name="foo", # provide user name if you have it.
    user_email="foo@bar.com", # provide the email address if you have it.
    user_phone="+6100000000", # provide the phone number if you have it
)

eventType = upollo_public_pb2.EVENT_TYPE_LOGIN

analysis = upolloClient.verify(
  upolloToken,
  userInfo
)

flagTypes = list(map(lambda f: f.type, analysis.flags))
isAccountSharing = upollo_public_pb2.ACCOUNT_SHARING in flagTypes
isRepeatedTrial = upollo_public_pb2.REPEATED_SIGNUP in flagTypes

if isAccountSharing:
    print("user is account sharing")

if isRepeatedTrial:
    print("user is repeating trial")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

upollo_python-0.1.1-py3-none-any.whl (24.0 kB view details)

Uploaded Python 3

File details

Details for the file upollo_python-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: upollo_python-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 24.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for upollo_python-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d85f3a94e9436914d0d02eb9ed3fbf442222c32e63896289e03bdd2b23bfa057
MD5 2b94e2275dc3a6e2bbc07dde88e40e87
BLAKE2b-256 276788b59698ce6c9a3d66983236eff8dec5707ebe5cb0e329441b0ff61bc078

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