[ckan-dev] Create Package programmatically
Nigel Babu
nigel.babu at okfn.org
Fri Mar 8 13:52:36 UTC 2013
Hi Ryan,
`ckan.logic.action.package_create` is probably the right way to do it. Can
you explain more about there not being an HTTP call associated with your
code? You could use the action API via the paster post command, but you'd
need to be on the server for that. Or from Python via the plugins
toolkit[1] (again, you have to be on the server).
[1] http://docs.ckan.org/en/latest/toolkit.html
Nigel
On 7 March 2013 04:21, Ryan Clark <ryan.clark at azgs.az.gov> wrote:
> I'm trying to generate Packages from ISO 19139 documents. What is the best
> way to create a new package programmatically? I was thinking that
> ckan.logic.action.package_create looked like it might be the best place,
> but I'd rather not have to spoof the context object, since there won't be
> an HTTP request associated with the code I'm writing.
>
> Thanks!!
> ____________________
>
> Ryan Clark
> ryan.clark at azgs.az.gov
> (520) 302-4871
>
>
>
>
>
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20130308/ca4f3604/attachment-0001.html>
More information about the ckan-dev
mailing list