Clients

Python

The DataJunction python client can be installed using pip. See the PyPI client library.

pip install datajunction

To use the read-only client:

from datajunction import DJClient

dj = DJClient("http://localhost:8000")

To use the full client:

from datajunction import DJBuilder

dj = DJBuilder("http://localhost:8000")

Javascript

The DataJunction javascript client can be installed using npm for use in a node project or using the UNPKG CDN for client-side use.

npm install datajunction
const { DJClient } = require('datajunction')

const dj = new DJClient('http://localhost:8000')
dj.metrics.get().then(data => console.log(data))
<script src="https://unpkg.com/datajunction/dist/datajunction.js"></script>
<script>
    const dj = new window.datajunction.DJClient("http://localhost:8000");
    dj.metrics.get().then(data => console.log(data));
</script>