No darkerd
HTTP API server similar to blackd
#59
Labels
Milestone
darkerd
HTTP API server similar to blackd
#59
A
darkerd
daemon should import and call Black in-process.In the comment below from #23, this approach is compared to a
darkerd
->blackd
solution:Let's consider a
darkerd
daemon which makes HTTP API calls to a separateblackd
daemon. That would meandarkerd
, andblack
Python API directly in thedarkerd
process).So the performance benefit would be achieved by just
darkerd
,darker
Python API, anddarker
in turn call theblack
and (and optionallyisort
) Python APIs internally.Compared to
blackd
, it's important to consider that it's not possible to pass only source code in the HTTP request.darker
needs to have access to the unmodified version of each file in GitHEAD
. Do do this,darkerd
must point to actual files on disk (either Git root dir + set of relative paths, or just a set of absolute paths)darkerd
process must have access to the filesystem, so in practice run in the same machine as the caller (i.e. the IDE)If we were to implement
darkerd
, I wouldblackd
(it's under 200 lines of code)aiohttp
,aiohttp-cors
and maybeclick
)Originally posted by @akaihola in #23 (comment)
The text was updated successfully, but these errors were encountered: