Skip to main content

Python wrapper for CaltechDATA API.

Project description



Python library for using the CaltechDATA API

  • caltechdata_write write files and a DataCite 4 standard json record to CaltechDATA repository
  • caltechdata_edit edits records in CaltechDATA
  • get_metadata gets metadata from CaltechDATA records

Requires Python 3 (Recommended via Anaconda with reqests library.


There are some example python scripts in the GitHub repository.

Create a record:

python example.json -fnames logo.gif
Successfully created record  

Edit a record (make changes to the example.json file to see a change)

python example.json -ids 352 -fnames logo.gif
Successfully modified record

Get geographic metadata from CaltechDATA with WKT representations in a csv file. You can import this to a GIS program like QGIS using a delimited text import and projection epsg:4326. You'll have to do one import for Geometry type Point and another for Geometry type Polygon.

python caltechdata_geo.csv

You can filter by keyword

python caltechdata_geo.csv -keywords TCCON


Install by typing 'pip install caltechdata_api'


Write API access is controlled by repository staff. Email us at with your request if you want to use the write API.

You need to acquire a personal access token from your CaltechDATA account (find it at the top right of your screen under "Applications"). Make sure you include the "deposit_api:write" and "file_manager:upload" scopes. Then copy the token to token.bash. Type source token.bash in the command line to load the token.

Only test your application on the test repository. Testing the API on the public repository will generate junk records that are annoying to delete.


Handle incorrect token on file upload

Project details

Download files

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

Files for caltechdata-api, version 0.3.0
Filename, size File type Python version Upload date Hashes
Filename, size caltechdata_api-0.3.0-py3-none-any.whl (16.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size caltechdata_api-0.3.0.tar.gz (14.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page