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.8.1.tar.gz (203.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.8.1-py2.py3-none-any.whl (234.0 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: dimcli-0.9.8.1.tar.gz
  • Upload date:
  • Size: 203.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.8.1.tar.gz
Algorithm Hash digest
SHA256 c72b5add3c0e2c9a62b106a745fb36d8f21c38f02ede2456b516595d2a33e0ac
MD5 fc6be1c738a4fb0c909a5ee75ebe8c8b
BLAKE2b-256 425b1ceef0e7eeb773b840d7aab09ab7e0b8c697553dc36690f183e33383d99a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dimcli-0.9.8.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 234.0 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.8.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f0da03a8d801b504fc9c5d0a96b17ca6701b315dcd4838ff0af887fc887c7bc9
MD5 f8390b93bbcb41e35e3d7213c9f0debd
BLAKE2b-256 97e31ed4410dfbf6b75444f57dbd15525ded09d57e148497ef07fc37c0480a68

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