Skip to content

Commit 54e216d

Browse files
author
Todd Bodnar
committed
pypi readme compatibility
1 parent 0963e75 commit 54e216d

File tree

3 files changed

+59
-37
lines changed

3 files changed

+59
-37
lines changed

MANIFEST.in

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include README.rst
2+
include documentation/img/logo.png

README.md README.rst

+48-36
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,99 @@
1-
<p align="center">
2-
<img src="https://raw.githubusercontent.com/Breinify/brein-api-library-python/master/documentation/img/logo.png" alt="Breinify API Python Library" width="250">
3-
</p>
1+
.. image:: https://raw.githubusercontent.com/Breinify/brein-api-library-python/master/documentation/img/logo.png
2+
:width: 250px
3+
:align: center
4+
:alt: Breinify API Java Library
5+
6+
.. class:: center
47

5-
<p align="center">
68
Breinify's DigitalDNA API puts dynamic behavior-based, people-driven data right at your fingertips.
7-
</p>
89

9-
### Step By Step Introduction
1010

11-
#### What is Breinify's DigitialDNA
11+
Step By Step Introductions
12+
==========================
13+
14+
What is Breinify's DigitialDNA
15+
------------------------------
1216

1317
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.
1418

1519
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.
1620

17-
### Quick start
21+
Quick start
22+
===========
1823

19-
#### Step 1: Download the Library
24+
Step 1: Download the Library
25+
----------------------------
26+
Download the library from Pypi and install it with
2027

21-
Download the wheel from <<more details to come>> and install it with ...
28+
.. code:: python
2229
30+
python3 setup.py install
2331
24-
#### Step 2: Integrate the library
2532
26-
Integrate the Library into your Python 3 project.
33+
Step 2: Integrate the library
34+
-----------------------------
35+
Integrate the Library into your Python 3 project.
2736

2837

29-
#### Step 3: Configure the library
38+
Step 3: Configure the library
39+
-----------------------------
3040

31-
In order to use the library you need a valid API-key, which you can get for free at [https://www.breinify.com](https://www.breinify.com). In this example, we assume you have the following api-key:
41+
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:
3242

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

35-
```python
36-
##this is a valid API key
37-
apiKey = "772A-47D7-93A3-4EA9-9D73-85B9-479B-16C6"
45+
.. code:: python
3846
39-
breinify.connect(apiKey)
40-
## Will always return True
47+
##this is a valid API key
48+
apiKey = "772A-47D7-93A3-4EA9-9D73-85B9-479B-16C6"
4149
42-
```
50+
breinify.connect(apiKey)
4351
4452
The Breinify class is now configured with a valid configuration object.
4553

4654

47-
#### Step 4: Start using the library
55+
Step 4: Start using the library
56+
-------------------------------
4857

49-
##### Placing activity triggers
58+
Placing activity triggers
59+
^^^^^^^^^^^^^^^^^^^^^^^^^
5060

5161
The engine powering the DigitalDNA API provides two 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.
5262

5363
The engine is informed of an activity by executing *breinify.activity(...)*.
5464

55-
```python
56-
# create a user you are interested in with their email (mandatory field) and any additional identification you want to pass
57-
user = breinify.user("[email protected]",lastname = "anywhere");
65+
.. code:: python
5866
59-
breinify.activity(user,"search","home","your activity description")
67+
#create a user you are interested in with their email (mandatory field) and any additional identification you want to pass
68+
user = breinify.user("[email protected]",lastname = "anywhere");
6069
61-
```
70+
breinify.activity(user,"search","home","your activity description")
6271
6372
That's it! The call will be run asynchronously in the background.
6473

6574

66-
##### Placing look-up triggers
75+
Placing look-up triggers
76+
^^^^^^^^^^^^^^^^^^^^^^^^
77+
78+
Look-ups are used to retrieve dedicated information for a given user.
6779

68-
Look-ups are used to retrieve dedicated information for a given user.
80+
.. code:: python
6981
70-
```python
71-
# define an array of subjects of interest
72-
dimensions = ["firstname",
82+
# define an array of subjects of interest
83+
dimensions = ["firstname",
7384
"gender",
7485
"age",
7586
"agegroup",
7687
"digitalfootprint",
7788
"images"]
7889
79-
result = breinify.lookup(user, dimensions);
90+
result = breinify.lookup(user, dimensions);
8091
81-
```
8292
83-
### Further links
93+
Further links
94+
-------------
95+
8496
To understand all the capabilities of Breinify's DigitalDNA API, take a look at:
8597

86-
* [Additional code snippets](documentation/more-snippets.md), or
98+
8799
* [Breinify's Website](https://www.breinify.com).

setup.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
from setuptools import setup
22

3+
4+
def readme():
5+
with open('README.rst') as f:
6+
return f.read()
7+
38
setup(name='brein-api',
49
version='0.1',
510
description='Access to Breinify\'s DigitalDNA API',
611
url='https://github.com/Breinify/brein-api-library-python',
712
author='Breinify',
813
author_email='[email protected]',
914
license='MIT',
15+
long_description=readme(),
1016
packages=['breinify'],
11-
zip_safe=False)
17+
install_requires=['requests'],
18+
zip_safe=False,
19+
include_package_data=True)

0 commit comments

Comments
 (0)