This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Breinify’s DigitalDNA API puts dynamic behavior-based, people-driven data right at your fingertips.

Step By Step Introductions

What is Breinify’s DigitialDNA

Breinify’s DigitalDNA API puts dynamic behavior-based, people-driven data right at your fingertips. We believe that in many situations, a critical component of a great user experience is personalization. With all the data available on the web it should be easy to provide a unique experience to every visitor, and yet, sometimes you may find yourself wondering why it is so difficult.

Thanks to Breinify’s DigitalDNA you are now able to adapt your online presence to your visitors needs and provide a unique experience. Let’s walk step-by-step through a simple example.

Quick start

Step 1: Download the Library

Download the library from PyPi and install it with

python3 setup.py install

Step 2: Integrate the library

Integrate the Library into your Python 3 project by importing the library in the relevant blocks of code.

import breinify

Step 3: Configure the library

In order to use the library you need a valid API-key, which you can get for free at https://www.breinify.com. In this example, we assume you have the following api-key:

772A-47D7-93A3-4EA9-9D73-85B9-479B-16C6

##this is a valid API key
apiKey = "772A-47D7-93A3-4EA9-9D73-85B9-479B-16C6"

breinify.setup(apiKey)

The Breinify class is now configured with a valid configuration object.

Step 4: Start using the library

Placing activity triggers

The engine powering the DigitalDNA API provides three endpoints. The first endpoint is used to inform the engine about the activities performed by visitors of your site. The activities are used to understand the user’s current interest and infer the intent. It becomes more and more accurate across different users and verticals as more activities are collected. It should be noted, that any personal information is not stored within the engine, thus each individual’s privacy is well protected. The engine understands several different activities performed by a user, e.g., landing, login, search, item selection, or logout.

For this example, pretend that a user named “John Doe” is logged in to your site with his email address (john.doe@email.com) and is searching for a B2B big data company. You can log this activity with the Breinify API using the following code:

#create a user you are interested in with their email and last name
example_user = breinify.user(email="john.doe@email.com")

breinify.send_activity(user,"search","services","b2b big data companies")

That’s it! The call will be run asynchronously in the background. All fields in the user class are optional, but the more data you can supply, the more accurate the results will be.

Temporal Data Lookup

At the same time, you may want to customize the user’s experience based on their local environment.

#create a user you are interested in based on their ip. Other fields (coordinates, time, etc) can also be included
example_user = breinify.user(ip="143.127.128.10")

result = breinify.temporal_data(example_user)

The result variable will contain a dictionary with information about the place the user is at, for example:

print(result)

{'location': {'state': 'CA', 'lon': -121.827179, 'granularity': 'city', 'city': 'San Jose', 'lat': 37.366051,
'country': 'US'}, 'holidays': [{'source': 'United Nations', 'types': ['SPECIAL_DAY'], 'holiday':
'World Cities Day'}, {'source': 'Public Information', 'types': ['HALLMARK'], 'holiday': 'Halloween'}], 'time':
{'localDay': 31, 'epochYear': 2016, 'localMonth': 10, 'localDayName': 'Monday', 'epochMonth': 10,
'localFormatIso8601': '2016-10-31T13:17:42-07:00', 'localHour': 13, 'localYear': 2016, 'epoch': 1477945062,
'epochHour': 20, 'timezone': 'America/Los_Angeles', 'epochDay': 31, 'localMinute': 17, 'localSecond': 42,
'epochSecond': 42, 'epochDayName': 'Monday', 'epochMinute': 17, 'epochFormatIso8601': '2016-10-31T20:17:42+00:00'},
'weather': {'description': 'scattered clouds', 'temperature': 13.161000000000001, 'lastMeasured': 1477935065,
'precipitation': {'precipitationAmount': 0.0, 'precipitationType': 'none'}, 'windStrength': 1.4, 'measuredAt':
{'lon': -121.767731, 'lat': 37.23328}, 'cloudCover': 48.0}}

Placing look-up triggers

Some time later, you may want to send a message to this user, but you only have their email address. You can query the Breinify lookup API to find necessary fields to personalize the message.

example_user = breinify.user(email="john.doe@email.com")

result = breinify.lookup(example_user,["firstname","gender"])
## should return "{'gender': {'result': 'MALE', 'accuracy': 1.0},
##              'firstname': {'result': 'John', 'accuracy': 0.92}}"
name = result["firstname"]["result"]
honorific = " "
if result["gender"]["result"]=='MALE' and result["gender"]["accuracy"] > 0.80:
    honorific = " Mr. "
if result["gender"]["result"]=='FEMALE' and result["gender"]["accuracy"] > 0.80:
    honorific = " Mrs. "
if result["firstname"]["accuracy"] < 0.8: #don't customize if we're not sure about their name
    honorific = ""
    name = ""
print("Hi"+honorific+name+"! What can we at Breinify do for you today?")
##should print "Hi Mr. John! What can we at Breinify do for you today?"

A demonstration function is available in demo.py.

With Breinify’s advanced artificial intelligence engine, you were able to customize a user’s experience and probably increase their engagement with just a few lines of code!

Release History

Release History

1.2.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
brein_api-1.2.2-py3.egg (12.9 kB) Copy SHA256 Checksum SHA256 3.5 Egg Nov 3, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting