Skip to content
This repository was archived by the owner on Jun 25, 2019. It is now read-only.

rosskarchner/socratic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Socrata publisher written in Python

This library provides a Python interface to the Socrata Publishing API, and a nifty command line client ('socratic').

API docs are coming soon, but here is the command line usage:

usage: socratic [-h] [--replace XXXX-XXXX] [--append XXXX-XXXX]
                [--blueprint blueprint.json] [--publish]
                {import} target

import or export data from a SODA source

positional arguments:
  {import}              operation to perform (currently, only "import" is
                        supported)
  target                (import only) file to upload

optional arguments:
  -h, --help            show this help message and exit
  --replace XXXX-XXXX   Socrata view to replace with the uploaded data
  --append XXXX-XXXX    Socrata view to append the uploaded data to
  --blueprint blueprint.json
                        Path to a json document describing column layout for a
                        NEW dataset
  --publish             Operations above will produce a working copy. Use this
                        flag to actually publish

Authentication

Authentication currently depends on environment variables:

  • SOCRATA_USER: Your userID, the thing that looks like 'XXXX-XXX' in the URL, when looking at your user profile
  • SOCRATA_PASSWORD: Your password
  • SOCRATA_TOKEN: Your App Token, from the "Your Applications" page.

History

Socrata-python is dead (or, at least "deprecated"). Long live socratic.

We are starting with a fork of that deprecated codebase, but it will evolve in ways that break backward compatability. This will NOT be a drop-in replacement for socrata-python!

Thanks to Aiden Scandella and Socrata for getting it this far!

Goals

  • clean up and modernize the library, including adding tests and docs
  • more flexible configuration options
  • a command-line wrapper for common socrata operations
  • Clear separation between Socrata-proprietary methods and the SODA2 API

About

Socrata-python is dead (or, at least "deprecated"). Long live socratic!

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors