Skip to main content

Description

The dace-query package lets easily query DACE and access public and private data using a simple utility tool.

Installation

The dace-query package is available on PyPi and can be installed using pip or conda:

# Install using pip
pip install dace-query

# Make sure you have the latest version of the DACE API
pip show dace-query

# Update using pip
pip install dace-query --upgrade
# Using conda
conda install -c conda-forge dace-query

# Make sure you have the latest version of the DACE API
conda list dace-query

# Upgrade de DACE APIs
conda update dace-query

Make sure the package is installed correctly :

# Import dace
import dace_query

# List content of the dace package
help(dace)

Authentication

In order to access the private data of DACE, an authentication system has been implemented. This one works very simply, it just requires three things detailed in the following subsections:

  • A DACE account

  • An API key

  • A local .dacerc file

1. Create an account

Register on the DACE web portal with a university email address.

2. Generate the DACE API key

To obtain an API key:

  1. Login on DACE (https://dace.unige.ch)

  2. Go to the user profile

  3. Click on [Generate a new API key]

  4. Copy this new API key into the .dacerc file

3. The .dacerc file

The .dacerc file, (you have to create it), located by default in the home directory (~/.dacerc) and in TOML format, defines a user section with a key-value pair specifying the user’s API key (see below).

[user]
key = apiKey:<xxx-xxx-xxx>

For example, if your API key is 12345678-1234-5678-1234-567812345678, then the .dacerc file will be :

[user]
key = apiKey:12345678-1234-5678-1234-567812345678

To create the .dacerc file on Linux or macOs, open a terminal window and type :

printf '[user]\nkey = apiKey:%s\n' "your-api-key-here" > ~/.dacerc

Quickstart

# Import the ready-to-use exoplanet instance
from dace_query.exoplanet import Exoplanet

# Retrieve data from the exoplanet database
result: dict = Exoplanet.query_database(limit=10, output_format='dict')

# Get the planet names
planet_names: list = result.get('obj_id_catname')

# Print the planet names
print(planet_names)

For more examples of uses, such as filtering bad quality data (see Usage examples)

Documentation

The official documentation for the dace-query package is available on Read the Docs.

Contact

In case of questions, proposals or problems, feel free to contact the DACE support .

Metadata

Release files for dace-query 3.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dace-query 3.0.2
File Size Uploaded Provenance Actions
dace_query-3.0.2.tar.gz 79.6 kB Without provenance Details for dace_query-3.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dace-query 3.0.2
File Interpreter ABI Platform Actions
dace_query-3.0.2-py3-none-any.whl Python 3 none any Details for dace_query-3.0.2-py3-none-any.whl

Total release size: 168.8 kB

Release files / dace_query-3.0.2.tar.gz

Download URL dace_query-3.0.2.tar.gz
Size 79.6 kB
Tags Source
SHA-256 checksum
How to use checksums
edf893dbdc4dab64d7cde23f270978c89997899ccc99539494ce910dc2159b94
BLAKE2b-256 checksum
How to use checksums
6520b4875ab6716c5823d8e05a7d47585ce234b2c9fe7109546ac84090c15f9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / dace_query-3.0.2-py3-none-any.whl

Download URL dace_query-3.0.2-py3-none-any.whl
Size 89.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
644659e3e3118002059c8a3d5ffffa94b2e38985cbd02dd8182df60e3e89d1fd
BLAKE2b-256 checksum
How to use checksums
2b8d13877a2a3e089cb05c2fcc490d990f36724c7cace0236058462b6e4b8f38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Security for dace-query 3.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page