Giter VIP home page Giter VIP logo

py-ipfs's Introduction

py-ipfs

IPFS Logo

Made by the IPFS Community IRC #py-ipfs on chat.freenode.net Matrix #py-ipfs:ninetailed.ninja Standard README Compliant

Python implementation of IPFS

Python implementation of IPFS, the InterPlanetary File System. Not even remotely done yet.

For the current status, and where you can help, please see issue 49.

Table of Contents

Background

IPFS is a distributed file system that seeks to connect all computing devices with the same system of files. In some ways, this is similar to the original aims of the Web, but IPFS is actually more similar to a single bittorrent swarm exchanging git objects.

IPFS could become a new major subsystem of the internet. If built right, it could complement or replace HTTP. It could complement or replace even more. It sounds crazy. It is crazy.

Install

Not ready for prime time yet

Usage

Also not ready for prime time yet

Documentation

To build the Sphinx docs, execute:

$ make -C docs/ <your favorite docs format> # html, pdf etc.

Contribute

IPFS implementation in Python is a work in progress. As such, there's a few things you can do right now to help out:

  • Get in touch! You can find us on #py-ipfs on chat.freenode.org!
    • A Matrix chat option is also provided. Please note however that, at the time of writing, the default matrix.org server is severely overloaded and your messages may only arrive with extreme delay; using a different homeserver is hence highly recommended.
  • Check out issue 49 for an up-to-date list (maintained by @alexander255) of tasks that could use your help. Feel free to ask questions on that and we'll try to help. Be sure to drop a note if there is anything you'd like to work on and we'll update the issue to let others know.
  • Perform code reviews. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.
  • Take a look at both go-ipfs and js-ipfs (which we intend to follow to a point), and also at some of the planning repositories or issues: for instance, the libp2p spec here. Contributions here that would be most helpful are top-level comments about how it should look based on our understanding. Again, the more eyes the better.
  • Add tests. There can never be enough tests.
  • Contribute to the FAQ repository with any questions you have about IPFS or any of the relevant technology. A good example would be asking, "What is a merkledag tree?". If you don't know a term, odds are someone else doesn't either. Eventually, we should have a good understanding of where we need to improve communications and teaching together to make IPFS and IPN better.
  • TODO: write our own CONTRIBUTE.md similar to IPFS's and once we know what we're doing and who's doing it.

Please be aware that all interactions related to IPFS, libp2p and Multiformats are subject to the IPFS Code of Conduct.

License

MIT

py-ipfs's People

Contributors

bmcorser avatar brendanbenshoof avatar candeira avatar daviddias avatar drozdziak1 avatar fredthomsen avatar gitter-badger avatar ivilata avatar jbenet avatar jonafato avatar joshpxyne avatar julienpalard avatar mvanveen avatar ntninja avatar ralphbean avatar richardlitt avatar sirmackk avatar skwerlman avatar sumnerevans avatar whereswaldon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

py-ipfs's Issues

Important Issues to stimulate development.

Following help/issue should be done to stimulate the development.

  1. Clear Timeline setup for the project
  2. Development setup
  3. chat channel instructions
  4. Weekly/monthly online meet.
  5. Special instructions for first-time contributors to this repo.

Feel free to add others

Vote to decide Python support

👶 ←#2

@whyrusleeping

  • Don't support Python 2 at all
  • Support to 2.7

@BrendanBenshoof

  • Don't support Python 2 at all
  • Support to 2.7

@sirMackk

  • Don't support Python 2 at all
  • Support to 2.7

@SilverWingedSeraph

  • Don't support Python 2 at all
  • Support to 2.7

@mvanveen

  • Don't support Python 2 at all
  • Support to 2.7

@bmcorser

  • Don't support Python 2 at all
  • Support to 2.7

@JulienPalard

  • Don't support Python 2 at all
  • Support to 2.7

Not sure if there are any other stakeholders ...

Next Steps

Since #1 is clogged with all the many comments I open a new issue here. Feel free to continue the discussion below and I'll keep the following updated as things develop. Also feel free to create separate issues / repos to coordinate and I'll add the relevant links below.

Next steps (networking, stalled – please see the “storage” section below):

Next steps (storage, simpler):

  1. Port https://github.com/ipfs/py-datastore to Python 3
    (Suggestion: Use Python's lib2to3 and just drop Python 2 entirely.)
  2. Convert datastore to use async/await using some library (maybe https://pypi.org/project/aiofiles/ ?) for file access The trio framework is used for async I/O now
  3. Implement a https://github.com/ipfs/go-ds-flatfs compatible backend for the above library
  4. Write a minimal py-ipfs “implementation” that can fetch blocks from the local $IPFS_PATH directory and expose them with an API similar to what https://github.com/ipfs/py-ipfs-http-client currently offers (goal here is to eventually have a drop-in replacement)
    • In progress by @Alexander255 (no public code yet, most work happens in py-datastore)
  5. Implement a simple Python HTTP server that emulates the block/{get,put,rm,stat} API that serves blocks from the local $IPFS_PATH directory
  6. (Stretch goal) Implement a badgerds compatible backend for py-datastore
    • There is an issue requesting Python bindings for the Go library, but no work has been done yet:
      dgraph-io/badger#984
  7. Beyond: Start integrating IPLD to expose the UnixFS files stored in those raw blocks…

Is this implementation going correctly?

I thought of getting multihash module ready as a part of building supporting modules and have been basing it on JS implementation. I have been coming across several doubts regarding my implementation.

Can someone check if this is going correctly or can it be written better?

Address: multihash

How do I begin working on py-ipfs?

I am interested in contributing to Python implementation of IPFS but I don't know where to begin. I initially had an idea of doing this via basing it on JS variant but every library I look at -- libp2p or peer-id or ipld they all have internal dependencies to each other and other libraries like multihashing or libp2p.

So I am right now stuck on where to begin contribution. I understood libp2p is important and so I peeked at js variant. It's dependent on so many libraries which are in-turn dependent on other libraries.

What to do? Can anyone please help? AS a beginner to this, I'd like some guidance please!

Generic Modules/Utils

Before moving on to the rest of libp2p and py-ipfs, we should look at the required generic utilities and determine which existing implementation we want to use, or if there isn't one, who wants to work on it. Here is what we need (see #21 (comment) for more info):

I know we already have several multihash implementations, and I hacked together a multiaddr implementation that could use some love. If anyone has already worked on any of these or is interested on working on any of them, please comment here. Also if anyone has anymore links to references or specs for the generic modules, post them here.

Building on go-ipfs, c-ipfs: C/CGo extensions

Would the maintainers be averse to doing this the (easier) way of building on C (I'm thinking kenCode's implementation) or CGo extensions?

The main con would probably be the loss of (some, perhaps not all) of the feedback on the spec, and the need to publish wheels. Pros would be implementation time, execution time (by a huge margin initially) and faster updates (in the case of C/Go internals).

passing a common test suite (which we'll extract from go-ipfs)

@jbenet calls this out in #1. Judging by #8 people seem to agree with the principle that developing against a testable spec is a priority.

I'm curious how we're going to go about accomplishing and structuring this goal. I realize the actual written spec is still in progress (I myself am still coming up to speed on the protocol specifics).

I'd like to use this issue to center discussion on planning for how we're going to tackle this issue.

Using Morph.is code to improve IPFS

I'm cross-posting this from the Orbit github since Morphis is written completely in Python and is really similar to IPFS so it can help speed along the development of py-ipfs.

The main developer was shot and killed 2 weeks ago and it would mean a lot for his work to live on. https://morph.is is a distributed datastore like IPFS and there was a ui being developed for a distributed irc\slack which you can get if you pull the source and git checkout f-dds (the idea was to have it be completely functional without any JavaScript for those who prefer the added security of not running any JavaScript, with optional settings and tools for those who don't mind JavaScript)

the distributed irc was almost done heres a mockup of what it was going to look like https://ipfs.pics/Qmab8KzU4jCEYwwHQaDRNBQGu2eRSf9Qvkhfjn7Q63qFTH
if you run a morphis node with the f-dds branch you can see and use most of it in action. There were some tweaks to the ui we had talked about but never got around to finish.

Heres a backup of the code including all branches (which is also currently still available on the official morph.is git repo until the servers go offline)

https://u.teknik.io/XWzPR.zip

2 and 3

Despite this project not having any code written yet, we should support Python back to at least 2.7 to help with uptake of users who can't (or don't want to) work in a Python 3 environment.

Python 2.7 smoothes over many issues with __future__, but some guidance for developers would be useful.

Resources:

  • wiki 3 stdlib in 2, general info
  • six compatibility lib
  • a guide print, exceptions, imports, L, unicode
  • tox testing
  • setuptools packaging provision

Timeline/reccomended way to use IPFS from Python

I'm the developer of Argos Translate, an open source neural machine translation library, and currently have models available for IPFS download. I'd like to add support for automatically downloading from IPFS at some point (currently you need to manually download and install the models). What's the recommended timeline/strategy for doing this? My current plan is to wait for this project to be production ready at which point adding IPFS support would be pretty straightforward. Is there any sort of timeline estimate for when this will be? Is there a better strategy like trying to use the Go implementation?

Thanks

Sprint Process?

I've been steadily diving head first into IPFS docs and am still getting up to speed. Along the way, I noticed that there is a pre-existing weekly sprint process defined for a lot of the specific current initiatives (go, node, testing + ci, protocol + specs, etc.).

Would this be something that this team would be interested in adopting?

I think one of the benefits is it could solidify strong initial momentum and team to get things going, but it might not fit into everyone's schedule and might not be everyone's favored process. Since this is an ipfs project, I also think it might be good to stick to their existing defined processes & best practices.

Py-libp2p broken link.

Hey everyone. I was just starting to look around because I want to contribute to this project. I read that an implementation of py-libp2p should be one of the first step but currently the link found in the roadmap is broken.
As any work been done yet and if so where is it?

IDE standardization?

Should we include .idea/ for PyCharm? I use PyCharm extensively on my desktop dev machine, and I think it would make the process of onboarding new developers easier if we had a .idea/ project directory already set up with execution settings for tests, etc. already set up. Otherwise, we will end up with a lot of duplication of work.

Framework for HTTP(S) API?

I'd like to have a consensus on how to implement the HTTP(S) API. I would suggest Flask but that is only because of my inexperience with other options (Bottle, Pyramid, etc).

Once we have a decision on this, a skeleton API could be written with the actual implementation filled in as the functionality materializes. It will mostly be boilerplate and there is no reason for implementers of actually hard things to have to write that code as well.

i want to join to dev python-ipfs.

i want to join to dev python-ipfs. i saw this project starting. i am a python developer. i work for eos blockchain. i am interested in blockchain and ipfs. i used python,golang,php. ipfs is cool. so i want to join it and dev a new internet.
so how can i join python-ipfs. first maybe i can pr, but there are maybe other developer build it. so i create this issue. i hope to join them,but i don’t how to do that.
and sorry to create this issue just to do for that. but i’m really interested in ipfs.

if you have free time, please give a replay. and if i can’t join it,please give me some advice to tell me how to contribute.

my email: [email protected]

thanks,
goooo

Proposal: Seperate packages for each system

I suggest that we separate the ipfs package into packages for each IPFS subsystem:
* ipfs-api - Used to connect to Py-IPFS by applications. This is where most users should touch. From https://github.com/ipfs/python-ipfs-api
* ipfs-naming or ipfs-ipns - Provides access to the IPNS pulbic key infrastructure and naming system. Handles HRNs and mutable pointers
* ipfs-merkledag - Provides access to Merkledag for resolving paths
* ipfs-block - Provides access to the block exchange system for transferring data.
* ipfs-routing - Provides access to the routing system, probably mostly DHT and mdns
* ipfs-network - Provides access to the lowest level IPFS network transport functions, like NAT traversal/hole punching, encryption/signing, and multi/broadcasting

Client applications would initialize the stack from the bottom up: choose a transport and encryption with ipfs-network, connect to the DHT with ipfs-routing, then use ipfs-naming (ipfs-ipns) to find the location of desired content and ipfs-merkledag and ipfs-block to recall that data.
On the other hand, if an instance of IPFS is already running on the system (which is preferred), they could simply use ipfs-api to interact with it.

Development Hangout

I want to try and plan a developer hangout to start planning out the project and perhaps prepare for the first sprint.

We are a global "team" so scheduling is a mess.
I can commit to being available for any time chosen on this sat. or sun. with advanced notice.
If you are interested please post your availability for this weekend (make sure to mark timezone info or use utc)

Pull request review process

There are 4 open PRs from a year ago, and it would be nice if we could delegate someone to do the reviews

Add names and links of the various sub-repos

Lots of work is being done, towards making py-ipfs a complete project.
However, since the dependencies and all need to be worked up from scratch, not much work is being done directly in this repo. Various contributors are working on various other repos.
Maybe, we can put a link to those repos in the README.md file, so that new contributors know where to look for issues and where to contribute.
1 more suggestion: We can separate those repos as:

  1. Core jobs (The protocols ...)
  2. Dependencies (libp2p ...)

UnboundLocalError

Traceback (most recent call last):
File "/home/wongasley/.local/lib/python3.8/site-packages/ipfshttpclient/http_httpx.py", line 173, in _request
closables, session = self._access_session()
File "/home/wongasley/.local/lib/python3.8/site-packages/ipfshttpclient/http_common.py", line 417, in _access_session
session = self._make_session()
File "/home/wongasley/.local/lib/python3.8/site-packages/ipfshttpclient/http_httpx.py", line 119, in _make_session
connection_pool = httpcore.SyncConnectionPool(
AttributeError: module 'httpcore' has no attribute 'SyncConnectionPool'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/wongasley/Desktop/RBS/Post.py", line 3, in
client = ipfshttpclient.connect()
File "/home/wongasley/.local/lib/python3.8/site-packages/ipfshttpclient/client/init.py", line 119, in connect
assert_version(client.apply_workarounds()["Version"])
File "/home/wongasley/.local/lib/python3.8/site-packages/ipfshttpclient/client/init.py", line 228, in apply_workarounds
version_info = self.version()
File "/home/wongasley/.local/lib/python3.8/site-packages/ipfshttpclient/client/base.py", line 245, in wrapper2
result = func(*args, **kwargs)
File "/home/wongasley/.local/lib/python3.8/site-packages/ipfshttpclient/client/miscellaneous.py", line 204, in version
return self._client.request('/version', decoder='json', **kwargs)
File "/home/wongasley/.local/lib/python3.8/site-packages/ipfshttpclient/http_common.py", line 613, in request
closables, res = self._request(
File "/home/wongasley/.local/lib/python3.8/site-packages/ipfshttpclient/http_httpx.py", line 202, in _request
for closable in closables:
UnboundLocalError: local variable 'closables' referenced before assignment

Beginnings -- comment here to be added to the team

See ipfs/ipfs#21

I dont have the bandwidth to lead this effort, so ideally we could find a maintainer that can take a lead on. Ideally someone who understands ipfs at both a technical, ideological, and product levels.

Doing this well will in short term will need:

  • stable specs https://github.com/ipfs/specs/ (which we're headed toward)
  • passing a common test suite (which we'll extract from go-ipfs)
  • coordination with others in ipfs world in general (come hang out in #ipfs)

we're super happy to support this effort however we can. (biggest need is docs i think). i'd encourage you to play with existing go-ipfs, and come hang out in #ipfs.

python-libp2p dev meeting

cc: @BrendanBenshoof @JulienPalard @bmcorser @SilverWingedSeraph @mvanveen

Our kick-off meeting went pretty well (#20) and I think we now have a pretty good idea about how to start this project. I think the plan is to build a python port of libp2p first and then build the IPFS protocol on top of that. I was thinking we should probably schedule another meeting to discuss libp2p in more detail and perhaps delegate some tasks. Thoughts?

Current state of development?

Is this still under active development? What are the current items that are being implemented? Would love to work on some of the implementation (would need a LOT of help, of course).

TDD

I suggest that, since we are starting with both a spec and and a reference implementation, we go the Test Driven Development route.

This raises the question, what test framework do we use? I'm most comfortable with unittest, but am entirely open to learning pytest or Nose.

Additionally, I was considering an essentially 3-branch structure: release, master, and unimplemented, where unimplemented holds tests for new features that have yet to be implemented. Upon those tests passing, master would receive both the tests and the code to pass them. That way, we can enforce an always-passing rule on master more easily.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.