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.6

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.6.tar.gz (216.2 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.6-py2.py3-none-any.whl (248.8 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: dimcli-1.6.tar.gz
  • Upload date:
  • Size: 216.2 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.6.tar.gz
Algorithm Hash digest
SHA256 fd8f39189ce0a673ea90ec951669d949b11f55d7e40d255afc41633dc66885f3
MD5 c000adc1982ffc3206c7a1fa67402485
BLAKE2b-256 668ac2ddf1a952acb2245ef488326675be74916522c7132b83d56d78ae25e4c4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dimcli-1.6-py2.py3-none-any.whl
  • Upload date:
  • Size: 248.8 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.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6858022ec6577581f8f7647be75258d7e80899e59f149e004268657316a5f0d3
MD5 d4cfff3362cd14fc978ff8a1fb818253
BLAKE2b-256 65ad0d97fc682c5264066ec285c4615dd984b22b26238772c6370566d676f867

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