[Distutils] Mirroring PyPI JSON Locally

Nick Coghlan ncoghlan at gmail.com
Mon Aug 21 06:53:17 EDT 2017

On 21 August 2017 at 19:38, Paul Moore <p.f.moore at gmail.com> wrote:
> On 21 August 2017 at 09:54, Nick Coghlan <ncoghlan at gmail.com> wrote:
>> While I'm still generally negative on the idea of native reliance on
>> JSON-LD, I'll note one thing that has changed since I last looked at
>> it: I now see some potential concrete practical benefits to adopting
>> it, rather than purely theoretical ones. In particular,
>> https://github.com/scienceai/jsonld-vis now exists, and there wasn't
>> anything like that around at the time of previous discussions.
> Personally, I fairly often write adhoc scripts that use the JSON API,
> and as it stands it's very convenient for that. From what I can see of
> JSON-LD (which basically equates to "it adds some extra metadata keys
> that don't change the data content but do change the list of keys and
> maybe the nesting levels") it would be somewhat inconvenient for my
> scripts, and add no extra capability that I would ever use.

Right, and this is still my main concern with the idea as well: I'd
never be OK with a JSON-LD-only API, because it adds too much
irrelevant cognitive overhead for the vast majority of Python
packaging specific use cases. (I would see it as being akin to Python
itself deciding to require type annotations, rather than merely
allowing them).

However, where I'm starting to see a potential niche for it is as an
opt-in capability, whereby we explicitly define how our metadata can
be translated *to* JSON-LD, for folks that want to apply general
purpose tools that know how to manipulate arbitrary JSON-LD data (like
the graph visualiser I linked earlier).

That way, everybody wins - folks that have never heard of schema.org
or linked data in general won't need to learn any concepts that are
completely irrelevant to them, while folks that are aware of those
things and the related tools will be free to use them without first
having to figure out their own mapping from the Python specific
metadata formats to a JSON-LD compatible format.

That approach then doesn't even need to wait for PEP 426: it could be
done using the wheel METADATA file as a basis instead.

It will probably still be up to Wes to actually define that
transformation though - I don't think anybody else is anywhere near
keen enough to make use of the available JSON-LD tooling to spend any
time working on enabling it :)


Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Distutils-SIG mailing list