Skip to content

raiyaj/ods-explore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Python client for Opendatasoft's Explore API (v2). ods-explore provides a querying interface inspired by the Django Queryset API, which converts queries to the Opendatasoft Query Language ODSQL internally.  ๐Ÿ ๐Ÿ“Š

Contents

Installation

pip install ods_explore

Getting started

from ods_explore.opendatasoft import Opendatasoft

ods = Opendatasoft(subdomain='documentation-resources')

# get datasets in a catalog
ods.catalog.datasets.get()

# get one dataset
ods.catalog.dataset('doc-geonames-cities-5000').get()

# get records in a dataset
ods.catalog.dataset('doc-geonames-cities-5000').records.get()

# get the least-populated cities only
(
  ods
  .catalog
  .dataset('doc-geonames-cities-5000')
  .records
  .filter(population__lt=500)
  .get()
)

# get one record
(
  ods
  .catalog
  .dataset('doc-geonames-cities-5000')
  .record('24eec8bff4f5b55afdeeeacb326167ed6b1e933a')
  .get()
)

API docs

See docs/api.md for detailed documentation of ods_explore classes and usage patterns.

About

Django query-inspired client for Opendatasoft's Explore API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages