Ipfs: IPFS API bindings

Created on 19 Aug 2015  ·  76Comments  ·  Source: ipfs/ipfs

We've reached a pretty stable API, and IPFS now runs pretty reliably. People are already using IPFS from other languages, primarily JS through https://www.npmjs.com/package/ipfs-api

There's been talk about organizing an effort to get API bindings for more languages. Maybe we can start with:

The API is very simple -- it is just a REST-like HTTP + JSON API. Do we have any volunteers to help out with languages listed above (or others)? Please respond here if you can dedicate a good chunk of time. (I'll prepare a guideline doc for implementors in the meantime.) Then we can have a bunch of people working on this at the same time, which will make it go way faster. And then we can release them all in one go!

Most helpful comment

Is there any interest in a Dart and/or Elixir implementation of the API? I know neither languages are specifically listed but I personally would use both for various different applications.

All 76 comments

I can offer code review for Ruby

I have the beginnings of Rust API bindings.

I would be interested in working on Ruby bindings, but I don't know enough about the project yet, so would need some guidance.

C/C++ I am willing to volunteer.

I'd like to add an implementation for Julia.

Thanks @lgierth @rschulman @Fryie @PayasR and @rened -- I'll follow up with a quick dock here.

In the meantime check out https://github.com/ipfs/node-ipfs-api for a gist of how it works. The key parts are in:

@jbenet maybe update the OP with links to existing binding projects? ipfs/py-ipfs, etc

@cryptix py-ipfs i think is not bindings, but aiming to be an impl? maybe someone can make ipfs/py-ipfs-api

Thanks everyone who is helping! Ok,

but can already start, given node-ipfs-api is so trivially simple.

I'm starting a Java implementation. Will post a link once I have something non trivial.

API Blueprint is a markdown specification for describing APIs. It has a conceptualization of endpoints and request types and responses and whatnot.

It's a subset of markdown, so it will always render, but apiary.io provides a more complex display.

For example, this is the markdown and this is the rendering for a blueprint I've been working on recently.

I've perused the node-api index and assume I know the endpoint names. I'm still clueless on the data model.

If anyone who groks the data structures and interactions is interested in pairing on this, I'd love to contribute, but I don't get the system well enough to do it just yet.

My Java implementation is going here: https://github.com/ianopolous/IPFS-API-Java I'm aiming to make it self contained and simple.

Just finished rudimentary python bindings: https://github.com/amstocker/python-ipfs-api

Any advice or testing would be greatly appreciated. It is already somewhat tested on my local machine (Ubuntu 14.04.2/Python 2.7.6).

I'm expecting to do slow but steady progress on the Ruby bindings here. :)

Moved @amstocker python bindings to https://github.com/ipfs/python-ipfs-api/ (thanks!). If anyone else wants their moved as well, let me know. (it's easier for the community to all collaborate in one set of bindings)

@dysbulic happy to help with the API data model. maybe drop by #ipfs or ask questions on https://github.com/ipfs/go-ipfs or https://github.com/ipfs/node-ipfs-api ?

@Fryie coolio, I'll try to have a look at what you already have, but if you want me to look at anything in particular, feel free to ping me on IRC

I have the start of a C++ API binding here: https://github.com/MichaelMure/Arbore-qt/tree/master/src/ipfs

It's not really general purpose and Qt based, but still ...

Hello, I've started on a wrapper in Scala for the IPFS HTTP-API here: https://github.com/cboddy/scala-ipfs-api/

If anyone else is interested in contributing (or has requests or suggestions) please let me know, otherwise I'll update once it is complete.

Looking good! @MichaelMure and @cboddy let me know when it reaches some level of completion and we can move them into ipfs/ org (if you want)

@jbenet the Scala/JVM bindings are now complete for the basic commands enumerated in the

ipfs --help

message, along with most of the data-structure commands and some coverage of the others. The rest should be straight forward to plumb-in in the next week with more formal integration tests, please feel free to add it to ipfs/ in the mean time.

@cboddy this is great news!! would you like to transfer the repo to the ipfs org, the way we're doing for the others? I added you to the org-- just transfer the repo to ipfs user (or me if it doesn't work). I'll then make sure you have admin and so on.

@jbenet thanks and sure, have done!

I've updated the listing in the first post to include the awesome new Python, Java, and Scala api bindings! Thanks so much to everyone involved! :clap: :clap:

We should make our Go bindings as nice... @whyrusleeping

I'll do Lua!

I'll do Lua!

Great thanks! Lmk when you have a repo to put into the ipfs org! :)

I'm working on Swift API bindings.

Any fun one liner examples using cURL I can run straight from the command line (Linux)?

By looking at the ipfs --help ipfs add --help and such, combining with
the API document ( https://ipfs.io/docs/api/ ) and you should be able to understand the HTTP API.

May or may not fit in with your "fun" requirement :)

Sincerely,
Victor Bjelkholm
(+34) 672 15 90 89

On Thu, Nov 5, 2015 at 8:24 AM, bitcoinmeetups.org <[email protected]

wrote:

Any fun one liner examples using cURL I can run straight from the command
line (Linux)?


Reply to this email directly or view it on GitHub
https://github.com/ipfs/ipfs/issues/83#issuecomment-153976500.

I have been working on an API binding in PHP. Right now it's only the subset of IPFS commands we needed for ipfs.pics, but ping me if you need more and I will add them!

@cloutier if you want, we can make you a repo under the ipfs org called php-ipfs-api and you can put the code there

@whyrusleeping I'd like to publish it with the same strong copyleft licence and I know that might be a bit controversial. Is that okay with you?

I have now completed the first pass of the Swift API bindings. Feel free to comment and to use for your awesome iOS/OS X IPFS projects and to move into the ipfs org :)

@whyrusleeping I'd like to publish it with the same strong copyleft licence and I know that might be a bit controversial. Is that okay with you?

Hm. im undecided on this, but would lean strongly to keeping everything under ipfs org permissive so users dont make mistakes accidentally.

@cloutier curious why need a strong copy left for bindings? that strictly precludes commercial use, the place where users would most need bindings.

orthogonal to that -- thinking more about this -- we'll definitely need official bindings in php that are permissive (MIT/BSD/Apache2). if @cloutier doesn't want to make them so, we'll need a different one.

@cloutier @jbenet Would LGPL be a reasonable compromise?

No, AFAIK LGPL is not compatible with MIT/BSD/Apache2.0

I've thought about it some more and it would be better to have it under a lax licence in order to get more projects using an open standard like IPFS, and thus better for free software in general. Apache 2.0 would be good.

@davidar LGPL could be a good idea. It would allow embedding in a lot of licence (including MIT and even proprietary code) if the source code of at least the binding is available, but PHP is a peculiar case as it is almost only run on servers, and the copyleft clause is not triggered on a server's code. Might as well release it under a permisive licence.

@jbenet For the record, AGPL doesn't mean non-commercial. I don't need strong copyleft for technical reasons, but I want it for political reasons.

thanks very much @cloutier!

@cloutier Yeah, I think copyleft makes more sense for applications _on top of_ IPFS (like ipfs.pics), rather than lower-level libraries like this.

From https://www.gnu.org/licenses/license-recommendations.html

Some libraries implement free standards that are competing against restricted standards, such as Ogg Vorbis (which competes against MP3 audio) and WebM (which competes against MPEG-4 video). For these projects, widespread use of the code is vital for advancing the cause of free software, and does more good than a copyleft on the project's code would do.

In these special situations, we recommend the Apache License 2.0.

@davidar Sums up very well what I have been thinking about, thanks! :+1:

I have the start of the PHP bindings: https://github.com/cloutier/php-ipfs-api

It's basically the same code we have running in production at ipfs.pics, but relicensed under Apache 2.0.

cc @mekarpeles

Thanks, what if I aggregate these API client-libraries into a file within ipfs/ipfs/clients (and similarly ipfs/ipfs/implementations) which we can keep up to date?

This will likely also be a better experience for people trying to search through client libraries (than this issue). We can additionally link to this issue in the doc so people can contribute to the discussion.

Any opposed?

C#/.NET here. I'm using this project for work so it'll be supported/improved for a year or two at the very least.

Hello everybody and @PayasR @jbenet @MichaelMure in particular,

I have implemented a C++ API bindings here: https://github.com/vasild/cpp-ipfs-api and just got its test coverage to 100% after some fights with Travis and Coveralls.

So far the block, config, files, generic, object, pin and swarm set of methods of the API (https://github.com/ipfs/interface-ipfs-core/tree/master/API) have been implemented. What remains is the dag and dht ones which I will try to get done soon.

Cheerz!

Hello everyone! I hope you are doing well! I was wondering if there were any plans to make an API binding in Visual Basic .NET?

There was reference to .NET implementation.

@Coder206 See https://github.com/richardschneider/net-ipfs-core and https://github.com/richardschneider/net-ipfs-api.

It's written in C# but should be accessible from VB.Net.

@jbenet i would like to dedicate my php client for ipfs https://github.com/digitalkaoz/php-ipfs. its api complete, covers both http+cli "drivers", autogenerated from the official docs and well tested (at least in a few days ;) )

its licenced under the MIT, so there are no issues i think.

i would love to see my repo transferred to the ipfs organisation...

@digitalkaoz that is awesome. Wanna transfer it to me and I'll add to the IPFS org? Also want to add it to the list on https://github.com/ipfs/ipfs#api-client-libraries ?

btw everyone, now there is a awesome logo for the HTTP Client libraries. I've PR'ed to all the ones that were on -- https://github.com/ipfs/ipfs#api-client-libraries --, if yours wasn't there, here it is:

image

Also, if you made an implementation, consider referencing it on https://github.com/ipfs/ipfs#api-client-libraries and leave a note about its completeness :)

@diasdavid lets add to the list of client libraries :) will you make a PR or shall i?

@digitalkaoz go for it :)

@diasdavid what about moving https://github.com/vasild/cpp-ipfs-api to https://github.com/ipfs/cpp-ipfs-api? It was complete last time I enjoyed with it, but I haven't had the time to check if new API functions have been added after that.

@vasild we can do that. Are you still available to continue being the captain for that lib?

@diasdavid I changed jobs recently and haven't been able to find enough time to give cpp-ipfs-api some love (e.g. check if new functions have been added to the main API and implement them if that is the case). Moving it under /ipfs/ will increase its visibility so maybe others would contribute too. OTOH if you do not want to adopt code written by just one developer that is not working on it actively then maybe then it would be better to leave it under /vasild/. IMO it would be best to move it to /ipfs/ and I will eventually find time to play further with it. What do you think?

@vasild understood. I think the best approach is to follow your suggestion and describe the state of the implementation on the README + open issues for known issues + welcome new contributors. All of this + moving to the IPFS org.

I'll mention the IPFS client libraries in the next IPFS All Hands :)

@diasdavid opened a PR for the Client library list

On Mi., 23. Aug. 2017, 17:37 Vasil Dimov notifications@github.com wrote:

@diasdavid https://github.com/diasdavid vasild/cpp-ipfs-api@b1c557e
https://github.com/vasild/cpp-ipfs-api/commit/b1c557e7a1165ea38d20d5806a35979bfc0a2575
ok? (there are no known issues!)


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ipfs/ipfs/issues/83#issuecomment-324374905, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAR611I4GWv1OJkoJNiLvIVJXQnwE_rzks5sbEcygaJpZM4FuFH9
.

@jbenet hello! It would be great to change the current rust link to the new one, because it wasn't updated for 2 years already.. rust-ipfs-api
My implementation is still raw, but it works!

@rmnoff great! Please open a PR to include it to the list. (Example https://github.com/ipfs/ipfs/pull/265)

@vasild Looks good to me :)

@diasdavid done! :)

Is there any interest in a Dart and/or Elixir implementation of the API? I know neither languages are specifically listed but I personally would use both for various different applications.

The more the better :)

On Sat, Oct 7, 2017, 11:00 AM Tensor-Programming notifications@github.com
wrote:

Is there any interest in a Dart and/or Elixir implementation of the API? I
know neither languages are specifically listed but I personally would use
both for various different applications.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ipfs/ipfs/issues/83#issuecomment-334917974, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABL4HIInzOWvWTAIWjeRqR_mRuz22HC7ks5spy-ZgaJpZM4FuFH9
.

I've made a bit of headway (about 65-70% of the commands) on the elixir API. If you want to take a look at it and see if it is up to snuff; I would appreciate it. I still need to build out many of the commands as well as documentation and the test module (and circleCI). I was able to get over most of the difficult humps though (multipart form support etc) so its just a matter of days/weeks at this point until I have a fairly decent amount of the functionality implemented.

Here is the repo: https://github.com/tensor-programming/Elixir-Ipfs-Api

Edit: I will be abandoning the repo because no one seems to care? I didn't seem to even get a response from you guys and its been a month. No point in maintaining a piece of software no one is going to use. Anyone interested in taking the repo and building on it just let me know. All of the API endpoints were implemented with just the basic functionality. It wouldn't be hard to extend them and add the rest.

What about an elm-ipfs-binding, is anyone interested in making this possible?

Can write Perl binding if needed.

haskell I am willing to volunteer.

i can write Objective-C , is there a work list to do?

See https://github.com/ipfs/ipfs#api-client-libraries

How about the status of developing mobile app using IPFS?
There are several projects for Android app, which is quite good.
The main step is first to start the ipfs daemon on a mobile, and do some file upload, etc.
I am trying to do mobile app based on current android app, and may extract them to an android sdk.
In my opinion, if we can get more developers or companies to store and retrieve their data in the ipfs system in mobile apps, then it is likely that the system can be used by lots of common users.
Do you have any plan on this or is there any discussion on it?
@jbenet

Ipfs objc api?

yeah, the client and server can talk with instead of file, which will more
efficient.

TomorJM notifications@github.com 于2018年9月13日周四 下午3:45写道:

Ipfs objc api?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/ipfs/ipfs/issues/83#issuecomment-420914945, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABPHvCWs76QmmERDY7oqtQOuSPJ2eF54ks5uag0JgaJpZM4FuFH9
.

I wrote another set of Common Lisp bindings a while back (the other refused to work on either of my PCs even after some fiddling, and didn't support pubsub).

It's right over here— there's a GitHub mirror, too.

Thank you all, we are cleaning up this repository. If you have additional contributions please let us know in https://discuss.ipfs.io .

Was this page helpful?
0 / 5 - 0 ratings