Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Rust Ipfs | 1,205 | 2 | 5 months ago | 3 | September 23, 2020 | 63 | apache-2.0 | Rust | ||
The InterPlanetary File System (IPFS), implemented in Rust. | ||||||||||
Py Ipfs Http Client | 627 | 77 | 18 | 7 months ago | 6 | May 13, 2019 | 54 | mit | Python | |
A python client library for the IPFS API | ||||||||||
Java Ipfs Http Client | 503 | 13 days ago | 5 | mit | Java | |||||
A Java implementation of the HTTP IPFS API | ||||||||||
Go Ipfs Api | 425 | 43 | 100 | 5 days ago | 16 | March 01, 2022 | 32 | mit | Go | |
The go interface to ipfs's HTTP API | ||||||||||
In Web Browsers | 316 | 5 months ago | 66 | mit | ||||||
Tracking the endeavor towards getting web browsers to natively support IPFS and content-addressing | ||||||||||
Awesome Nodejs Cn | 217 | 5 years ago | ||||||||
Nodejs 资源大全中文版,正在翻译中。。。 | ||||||||||
Rust Ipfs Api | 209 | 7 | 7 | 3 months ago | 24 | December 31, 2022 | 23 | apache-2.0 | Rust | |
IPFS HTTP client in Rust | ||||||||||
Swift Ipfs Http Client | 169 | 2 | 3 years ago | October 24, 2016 | 4 | mit | Swift | |||
A Swift client library for the IPFS HTTP API. | ||||||||||
Net Ipfs Http Client | 114 | 1 | 6 | 2 years ago | 12 | August 29, 2019 | 9 | mit | C# | |
InterPlanetary File System client for .Net (C#, VB, F# ...) | ||||||||||
Cpp Ipfs Http Client | 111 | a year ago | 4 | mit | C++ | |||||
IPFS C++ HTTP API client library |
Name | Documentation | Crate |
---|---|---|
ipfs-api-prelude | ||
ipfs-api-backend-actix | ||
ipfs-api-backend-hyper | ||
ipfs-api (deprecated) |
Rust library for connecting to the IPFS HTTP API using Hyper/Actix.
To use the Hyper backend, declare:
[dependencies]
ipfs-api-backend-hyper = "0.6"
You can specify either with-hyper-rustls
or with-hyper-tls
(mutually exclusive) feature for TLS support.
To use the Actix backend, declare:
[dependencies]
ipfs-api-backend-actix = "0.7"
With either the Hyper or Actix backend, you can specify the with-builder
feature to enable a builder pattern to use when building requests.
[dependencies]
ipfs-api = "0.17.0"
You can use actix-web
as a backend instead of hyper
.
[dependencies]
ipfs-api = { version = "0.17.0", features = ["with-actix"], default-features = false }
You also have the option of using rustls
instead of native tls:
[dependencies]
ipfs-api = { version = "0.17.0", features = ["with-hyper-rustls"], default-features = false }
To enable the builder pattern (default) use the with-builder
feature:
[dependencies]
ipfs-api = { version = "0.17.0", features = ["with-hyper-rustls", "with-builder"], default-features = false }
use ipfs_api::{IpfsApi, IpfsClient};
use std::io::Cursor;
#[tokio::main]
async fn main() {
let client = IpfsClient::default();
let data = Cursor::new("Hello World!");
match client.add(data).await {
Ok(res) => println!("{}", res.hash),
Err(e) => eprintln!("error adding file: {}", e)
}
}
use ipfs_api::{IpfsApi, IpfsClient};
use std::io::Cursor;
#[actix_rt::main]
async fn main() {
let client = IpfsClient::default();
let data = Cursor::new("Hello World!");
match client.add(data).await {
Ok(res) => println!("{}", res.hash),
Err(e) => eprintln!("error adding file: {}", e)
}
}
use futures::TryStreamExt;
use ipfs_api::{IpfsApi, IpfsClient};
use std::io::{self, Write};
#[tokio::main]
async fn main() {
let client = IpfsClient::default();
match client
.get("/test/file.json")
.map_ok(|chunk| chunk.to_vec())
.try_concat()
.await
{
Ok(res) => {
let out = io::stdout();
let mut out = out.lock();
out.write_all(&res).unwrap();
}
Err(e) => eprintln!("error getting file: {}", e)
}
}
use futures::TryStreamExt;
use ipfs_api::{IpfsApi, IpfsClient};
use std::io::{self, Write};
#[actix_rt::main]
async fn main() {
let client = IpfsClient::default();
match client
.get("/test/file.json")
.map_ok(|chunk| chunk.to_vec())
.try_concat()
.await
{
Ok(res) => {
let out = io::stdout();
let mut out = out.lock();
out.write_all(&res).unwrap();
}
Err(e) => eprintln!("error getting file: {}", e)
}
}
There are also a bunch of examples included in the project, which I used for testing
For a list of examples, run:
$ cargo run --example
You can run any of the examples with cargo:
$ cargo run --example add_file
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.