Woopra Python client with Django support
========================================
A Pythonic Woopra client with Django support.
Installation
============
::
pip install woopra.py
Usage
=====
Client configuration
--------------------
At a base level, you can set up the client using keywords or a configuration
dictionary::
>>> import woopra_tracker
>>> config = {'domain': 'www.example.com'}
>>> woopra = woopra_tracker.client(**config)
User identification
-------------------
If you have the user information when you create the tracker instance, you can
add it then::
>>> config = {'domain': 'www.example.com'}
>>> woopra = woopra_tracker.client(user={'email': "bug@insects.com"}, **config)
To add identifying information::
>>> woopra.identify(name="Stick Bug")
{"email": "bug@insects.com", "name": "Stick Bug"}
>>> woopra.identify(order="Phasmatodea")
{"email": "bug@insects.com", "name": "Stick Bug", "order": "Phasmatodea"}
As you can see the `identify` method updates the user with parameters and then returns
the fully updated user data dictionary.
Of course that dictionary can be directly modified, too::
>>> woopra.user['name'] = "Stick Bug"
To then identify the user to Woopra::
>>> woopra.push()
Event tracking
--------------
Track an event::
>>> woopra.track('purchase')
Add information to the event::
>>> woopra.track('purchase', item='Terrarium', price='50.00')
Django integration
------------------
The Django client construction is a shortcut to use a an HttpRequest instance
to create the tracker.
>>> woopra = woopra_tracker.django(request)
You can pass in missing or alternative values using the keyword pattern here too::
>>> woopra = woopra_tracker.django(request, **config)
However you should be careful doing that as config values added here will *override*
values from the request.
License
=======
MIT license
=======
History
=======
0.1.0 (2018-03-08)
------------------
* First release on PyPI.
Metadata
Release files for woopra.py 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| woopra.py-0.3.0.tar.gz | 7.9 kB | Without provenance | Details for woopra.py-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| woopra.py-0.3.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for woopra.py-0.3.0-py2.py3-none-any.whl |
Total release size: 14.1 kB
Release files / woopra.py-0.3.0.tar.gz
| Download URL | woopra.py-0.3.0.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eb36759e9d4ec67e0b8e42b3e76ac877a5a316e744cdeb60d3d422852da8c520
|
|
BLAKE2b-256 checksum How to use checksums |
6573d6af92d36f790fed96bb806fcd82f5971288d9cc1fd9c8e10973423a510d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / woopra.py-0.3.0-py2.py3-none-any.whl
| Download URL | woopra.py-0.3.0-py2.py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a32b140dbffa31f6a4344daaeb5bb6ed120476eeaac0c3062a2890a003f2471d
|
|
BLAKE2b-256 checksum How to use checksums |
5fdd89904c94e7c6521162187876a31f1ad6425668e57dc4a1dbd6230d01aa8f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for woopra.py 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.