Skip to main content

Python REPL/API for accessing dimensions.ai.

Project description

Dimcli

Dimcli is a Python client for accessing the Dimensions Analytics API. It makes it easier to authenticate against the API, send queries to it and process the JSON data being returned.

>>> import dimcli

>>> dimcli.login(key="private-key-here",  
                 endpoint="https://app.dimensions.ai/api/dsl/v2")
               
>>> dsl = dimcli.Dsl()

>>> res = dsl.query("""search grants for "malaria" return researchers""")

>>> print(res.json)
{'researchers': [{'id': 'ur.01332073522.49',
   'count': 75,
   'last_name': 'White',
   'first_name': 'Nicholas J'},
  {'id': 'ur.01343654360.43',
   'count': 59,
   'last_name': 'Marsh',
   'first_name': 'Kevin'},
  .............
  ],
 '_stats': {'total_count': 8735}}

CLI

Dimcli includes also a command line interface (CLI) that aims at simplifying the process of learning the grammar of the Dimensions Search Language (DSL).

dimcli_animation

Jupyter

Dimcli plays nice with Jupyter notebooks too. It comes with various magic commands for querying the API, transforming JSON data into dataframes and turning them into interactive tables with hyperlinks - so that data can be inspected further on external websites.

dimcli_animation_jupyter

More info

For more information see the Getting Started with Dimcli tutorial.

Current version: see pypi homepage. Source code hosted on github.

Downloads

Comments, bug reports

Dimcli lives on Github. You can file issues or pull requests there. Suggestions, pull requests and improvements welcome!

Project details


Release history Release notifications | RSS feed

This version

1.7

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dimcli-1.7.tar.gz (218.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dimcli-1.7-py2.py3-none-any.whl (251.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file dimcli-1.7.tar.gz.

File metadata

  • Download URL: dimcli-1.7.tar.gz
  • Upload date:
  • Size: 218.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.22

File hashes

Hashes for dimcli-1.7.tar.gz
Algorithm Hash digest
SHA256 f92c96861ed3314827967dce1050b807836ec8a0c648d015a60b8610a015718c
MD5 8a7159f35541f4bde1fea9fe0444da0f
BLAKE2b-256 7ffb8048fb9c3673402f8d4ce0fd3d2ec05cc5942e7c7b8a5900e4884b527eb6

See more details on using hashes here.

File details

Details for the file dimcli-1.7-py2.py3-none-any.whl.

File metadata

  • Download URL: dimcli-1.7-py2.py3-none-any.whl
  • Upload date:
  • Size: 251.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.22

File hashes

Hashes for dimcli-1.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 331a082eb390b7a1c1a722bc6a3bdaad7374e0e9d9d0c253e0835c72d6a48506
MD5 e0a4b5d04c54ea10892ac10d75028a00
BLAKE2b-256 e7915f264724140a5305d4f1ccf5aa79e58e052964fc10d2bca354410859a352

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page