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

Download files

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

Source Distribution

dimcli-0.9.9.1.tar.gz (206.1 kB view details)

Uploaded Source

Built Distribution

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

dimcli-0.9.9.1-py2.py3-none-any.whl (237.7 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: dimcli-0.9.9.1.tar.gz
  • Upload date:
  • Size: 206.1 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.9

File hashes

Hashes for dimcli-0.9.9.1.tar.gz
Algorithm Hash digest
SHA256 5ab0a68a6116b1ba6cfbc31d834df121b20ef888c8eafa459e8e7ee33d823e6d
MD5 84050b41e009bc21530b416a42c08201
BLAKE2b-256 9b312ceb23937ef5c2c38c92712ada9e717824753bc5f0e982152c81e53bb1a9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dimcli-0.9.9.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 237.7 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.9

File hashes

Hashes for dimcli-0.9.9.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0016008c3cc03eaa92bec0019d28a9e63874288f0ad3b0805527029447021c14
MD5 001ec262590f6f50711697c2dc05a1e1
BLAKE2b-256 223453c87b52b6246e5d767070c6e4dce135559fd28439379f131765d733c2db

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