Skip to main content
# UReact.me Python client

## Instalation

It's on pip. Just `pip install ureactme` and it's done.

## Usage

```python
from ureactme import Client
from ureactme.models import Metric, User, Event

c = Client("put your token here")

# Get the list of Metrics sent by users:
metrics = c.get_object_list(Metric)
for m in metrics:
print m.id

# Get the list of Users, and print his ID, the data and the auto-collected data
users = c.get_object_list(User)
for u in users:
print u.id, u.data, u.auto_data

# Get the list of events of a certain type sent by the user in a given day
u = User(id="user_id_test")
for e in u.get_events('redbutton_click', '2016-05-18'):
print e.created_at, e.value, e.data


# Send an event
c.send_event("suggestion_click", "user_123", 10)

# Get detailed statistics for a given date range, for all users and metrics
print list(c.get_statistics(['2015-01-01', '2017-01-01']))
[{u'avg_value': 15.0,
u'count': 1,
u'day': u'2016-05-19',
u'device_user': u'user1',
u'max_value': 15.0,
u'metric': u'login',
u'min_value': 0.0,
u'sum_value': 15.0},
{u'avg_value': 15.0,
u'count': 1,
u'day': u'2016-05-19',
u'device_user': u'user2',
u'max_value': 15.0,
u'metric': u'login',
u'min_value': 0.0,
u'sum_value': 15.0}]


# Get detailed user statistics (regardless of the metric)
print list(c.get_statistics(['2015-01-01', '2017-01-01'], fields=["user"]))
[{u'avg_value': 15.0,
u'count': 1,
u'device_user': u'user1',
u'max_value': 15.0,
u'min_value': 0.0,
u'sum_value': 15.0},
{u'avg_value': 15.0,
u'count': 2,
u'device_user': u'user2',
u'max_value': 15.0,
u'min_value': 0.0,
u'sum_value': 30.0}]

# Get detailed metric statistics per day (regardless of the user)
print list(c.get_statistics(['2015-01-01', '2017-01-01'], fields=["metric", "day"]))
[{u'avg_value': 15.0,
u'count': 3,
u'day': u'2016-05-19',
u'max_value': 15.0,
u'metric': u'login',
u'min_value': 0.0,
u'sum_value': 45.0},
{u'avg_value': 13.75,
u'count': 4,
u'day': u'2016-05-19',
u'max_value': 15.0,
u'metric': u'suggestion_click',
u'min_value': 0.0,
u'sum_value': 55.0}]

```

Release files for ureactme 0.2.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ureactme 0.2.7
File Size Uploaded
ureactme-0.2.7.tar.gz 3.5 kB Details

Release files / ureactme-0.2.7.tar.gz

Download URL ureactme-0.2.7.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
17778fed2367780aefe5707e437b30517681083df6003ae83820e70988018e0d
BLAKE2b-256 checksum
How to use checksums
1a91286853f8a32951b7ca7aa574797e633fbbdd93c6f2191bde0a9730415a4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2.7 This release

1 release file

0.2.6

1 release file

0.2.5

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.3

1 release file

0.1.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page