pip install python-dace-clientFor future upgrades:
pip install python-dace-client --upgrade
[user] key = apiKey:Your API key hereTo generate an API key, go to DACE website and log in. Then go to Profile and Generate a new API key. You can finally copy/paste the key into your .dacerc file or directly download the .dacerc file.
When using the API you will find often filters and sorting possibility. See example :
exoplanet_data = Exoplanet.query_database(filters={'db_info_name':{'contains':'Exoplanets.org'}}
, sort={'db_info_name':'asc'})
In this example, a filter is set on column 'db_info_name' containing 'Exoplanets.org' and ascending sorted (sort={'db_info_name': 'asc'})
See below the possibilities for filters and sorting
It depends the column type
filters={'obj_mag_v':{'min':0.0, 'max':10.0}
filters={'obj_id_catname':{'contains':'HD', 'notContains':'WASP', 'empty':False}}
filters={'prog_type':{'min':0, 'max':10}
or
filters={'prog_type':{'equal':10}
filters={'db_lc_available':{'is':True}}
sort={'db_info_name': 'asc'}
sort={'db_info_name': 'desc'}