• Stars
    star
    119
  • Rank 296,048 (Top 6 %)
  • Language
    Rust
  • License
    MIT License
  • Created almost 7 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Rust crate for interfacing with the IPFS API

Rust IPFS API Client

Crates.io Docs.rs

A client library for the IPFS API.

This library allows you to use the local IPFS daemon from Rust.

Usage

[dependencies]
ipfsapi = "0.4"

Examples

Reading a file from IPFS

Here's an example that gets the contents of a file from IPFS and displays it.

let api = IpfsApi::new("127.0.0.1", 5001);

let bytes = api.cat("QmWATWQ7fVPP2EFGu71UkfnqhYXDYH566qy47CnJDgvs8u").unwrap();
let data = String::from_utf8(bytes.collect()).unwrap();

println!("{}", data);

The code gets the content of the IPFS hash and displays "Hello World".

Subsribing to messages on IPFS Pubsub

let api = IpfsApi::new("127.0.0.1", 5001);

let messages = api.pubsub_subscribe("chat").unwrap();

for message in messages {
    println!("{:?}", message);
}

Implemented Functionality

  • Getting file contents from IPFS (cat)
  • Pubsub
  • IPNS publish and resolve
  • Object/Hash stats (size, etc.)
  • Version information of the daemon
  • Pinning and unpinning files
  • Shut down IPFS daemon
  • Get and put blocks

More Repositories

1

slowloris

Low bandwidth DoS tool. Slowloris rewrite in Python.
Python
2,410
star
2

python-jvm-interpreter

Java Virtual Machine implementation in Python
Python
277
star
3

hackchat

An event-driven Python library for hack.chat
Python
30
star
4

apt-encoder

Encode images as APT audio signals
C++
27
star
5

JustIRC

A simple library to write simple IRC bots.
Python
27
star
6

WebRadio

An HTML5 radio streaming webapp.
JavaScript
20
star
7

SirLogsalot

An IRC bot written in C
C
18
star
8

html5hacker

Hacker typer clone in HTML5
HTML
15
star
9

rust-cedict

A Rust parser for the CC-CEDICT Chinese-English Dictionary
Rust
14
star
10

minelib

A small API to interface with Minecraft servers.
Python
14
star
11

scripts

A collection of random scripts from my computer
Python
12
star
12

passwordstrength

A Python module that can be used to check the strength score of a password.
Python
9
star
13

rust-gophermap

Parse and generate Gopher responses
Rust
8
star
14

lobsters-py

Python client library for lobste.rs
Python
7
star
15

CurrencyConverter

Simple currency calculator in C.
C
7
star
16

RustOre-Classic

A Minecraft classic server written in Rust.
Rust
6
star
17

kernel

Cardinal kernel and operating system
C++
6
star
18

rust-renderstl

Small 3D Renderer - Renders STL files into images
Rust
5
star
19

cs2d

Interfacing with CS2D servers.
C
5
star
20

rust-smtpd

A simple SMTP server library inspired by smtpd.py
Rust
4
star
21

rust-hackchat

A hack.chat API in Rust.
Rust
4
star
22

radioreddit-cli

A Python script for listening to RadioReddit from the command line
Python
4
star
23

AsteroidRacer

A tiny example game written in Python. It uses Pyglet.
Python
4
star
24

MD5_Cracker

A Python MD5 Cracker that uses online services for cracking.
Python
4
star
25

rulid

Build system for Rust
Python
4
star
26

rust-urbandict

UrbanDictionary API client in Rust.
Rust
3
star
27

rust-reddit_api

Reddit API wrapper for Rust
Rust
3
star
28

AsteroidsCpp

Asteroid Dodging Game in C++.
C++
3
star
29

Blog

A blogging system I made with Bootstrap, Python and Bottle.py.
JavaScript
3
star
30

carddav-rs

CardDAV client library for Rust
Rust
3
star
31

whois.py

The whois utility implemented in Python.
Python
3
star
32

jsbuild

Javascript build system and package manager
Python
3
star
33

RandomDilbert

A Dilbert client written in Python and GTK.
Python
3
star
34

dotfiles

Emacs Lisp
2
star
35

browser-harden

JavaScript
2
star
36

xmppbot

XMPP Personal Assistant bot
Python
2
star
37

smolmesh2

Packet routing over arbitrary peerings
Rust
2
star
38

GameEngine

A toy game engine written in C++
C++
1
star
39

smolcanvas

smolcanvas is a 2D canvas graphics library.
JavaScript
1
star
40

website

gkbrk.com
JavaScript
1
star
41

minetest-py

Python client for the minetest protocol
Python
1
star
42

bunnylog-py

Parse BunnyCDN log files with Python
Python
1
star
43

carddav-cgi

A CardDAV server written in Python
Python
1
star
44

Golf

A static website generator written in Python.
Python
1
star
45

network01

Python
1
star
46

GetProjects

Clone all your GitHub repos in a single command.
Python
1
star
47

WatchCodeBot

An IRC bot for #WatchPeopleCode
Python
1
star
48

unbird

Utility to turn Bird-style Literate Programming documents into code
C
1
star
49

paytak

Minimal DAG execution library for Python
Python
1
star
50

testsimple-py

Python testing framework inspired by Perl's Test::Simple
Python
1
star
51

http-server-test

C
1
star
52

testsimple-js

Unit test framework inspired by Test::Simple
JavaScript
1
star
53

TetsuWeb

C# web microframework
C#
1
star