{ "info": { "author": "ClearFoundation", "author_email": "developer@clearfoundation.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Other Audience", "Natural Language :: English", "Operating System :: MacOS", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7" ], "description": "|pipeline status| |coverage report|\n\nIPFS Cluster HTTP API\n=====================\n\nThis is a python package to interact with the HTTP REST API of the IPFS\ncluster. `Full API\ndocumentation `__\nis available on gitlab pages.\n\nInstallation\n------------\n\n``ipfscluster`` is available from the PyPI repository:\n\n.. code:: bash\n\n pip install ipfscluster\n\nGetting an IPFS Cluster Running\n-------------------------------\n\nTo try the API out, you need to have a running IPFS cluster. The easiest\nway to get one of those is to use ``docker``. In the\n``docker-compose.yml`` file shown below, you will need to adjust the\n``volumes`` tags to reference actual folders on your host machine. The\nchange in ``environment`` variables for ``ipfs_cluster`` service makes\nuse the docker network DNS resolution by service name. Since our docker\nagent is called ``ipfs``, we can get its IP address in the internal,\n``backend`` network by using ``ipfs`` as its DNS name.\n\nCopy this YML into a ``docker-compose.yml`` file in some folder and then\nrun ``docker-compose up``.\n\n.. code:: yaml\n\n version: \"3.7\"\n services:\n\n ipfs:\n image: ipfs/go-ipfs:latest\n ports:\n - \"4001:4001\"\n - \"5001:5001\"\n networks:\n - backend\n volumes:\n - ~/ipfs/ipfs:/data/ipfs\n\n ipfs_cluster:\n image: ipfs/ipfs-cluster:latest\n ports:\n - \"9094:9094\"\n - \"9095:9094\"\n - \"9096:9096\"\n volumes:\n - ~/ipfs/ipfs-cluster:/data/ipfs-cluster\n networks:\n - backend\n depends_on:\n - ipfs\n environment:\n - CLUSTER_IPFSHTTP_NODEMULTIADDRESS=/dns4/ipfs/tcp/5001\n - CLUSTER_IPFSPROXY_NODEMULTIADDRESS=/dns4/ipfs/tcp/5001\n\n networks:\n backend:\n\nTry out the API\n---------------\n\nNow that you have a cluster running, you can try the API out. Open a\npython CLI and try:\n\n.. code:: python\n\n client = connect()\n m = {'name': 'bytes',\n 'cid': {'/': 'QmZfF6C9j4VtoCsTp4KSrhYH47QMd3DNXVZBKaxJdhaPab'},\n 'size': 30}\n with client:\n r = client.add_bytes(b\"Mary had a little lamb\")\n assert r == m\n\nRunning Unit Tests\n------------------\n\nRunning unit tests can prove to be a massive pain because the gitlab CI\nrunner runs on docker. For a project like this that uses\n``docker-compose``, we have to use ``docker-in-docker`` according to\ntheir instructions. However, the documentation is sparse and there are\nlots of dead-ends\u2026 Here are the steps to get the ``docker-compose.yml``\nfile to work:\n\n1. Install a local ``gitlab-runner`` using\n ``brew install gitlab-runner``.\n2. ``gitlab-runner exec docker --docker-privileged test``. Notice that\n there is a ``--docker-privileged`` argument. Without that, the\n ``docker-in-docker`` won\u2019t work.\n3. Make sure all the ``multiaddr`` reference the ``docker`` service\n (which hosts all the other containers using ``dind``).\n4. ``tox`` should work, but for some reason: running the tests using\n ``tox`` produces connection refused errors, whereas running straight\n with ``pytest`` does not. Something about the tox environment screws\n things up.\n\n.. |pipeline status| image:: https://gitlab.com/clearos/clearfoundation/py-ipfs-cluster-api/badges/master/pipeline.svg\n :target: https://gitlab.com/clearos/clearfoundation/py-ipfs-cluster-api/commits/master\n.. |coverage report| image:: https://gitlab.com/clearos/clearfoundation/py-ipfs-cluster-api/badges/master/coverage.svg\n :target: https://gitlab.com/clearos/clearfoundation/py-ipfs-cluster-api/commits/master\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/clearos/clearfoundation/py-ipfs-cluster-api", "keywords": "", "license": "GPL-3.0", "maintainer": "", "maintainer_email": "", "name": "ipfscluster", "package_url": "https://pypi.org/project/ipfscluster/", "platform": "", "project_url": "https://pypi.org/project/ipfscluster/", "project_urls": { "Homepage": "https://gitlab.com/clearos/clearfoundation/py-ipfs-cluster-api" }, "release_url": "https://pypi.org/project/ipfscluster/0.2.0/", "requires_dist": [ "argparse", "pyparsing", "termcolor", "pyyaml", "requests", "ipfshttpclient" ], "requires_python": "", "summary": "HTTP Client for IPFS Cluster.", "version": "0.2.0" }, "last_serial": 5690108, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "8611b8e08327a6d419f6424c4c24e8b9", "sha256": "684dc5daa673dc40b437e77db0ae86254e414e90b73b12084dcc966e30f4ca3e" }, "downloads": -1, "filename": "ipfscluster-0.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8611b8e08327a6d419f6424c4c24e8b9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8754, "upload_time": "2019-07-04T15:35:35", "url": "https://files.pythonhosted.org/packages/ac/3a/aba1b63d4541b9d20de61d7bf54a021bb17695ba5cc081f34c1cc7c0b076/ipfscluster-0.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e80780ed4de9da08ee718b34013eb4f1", "sha256": "d2b2f9f6901bb36ce7a713638707d99baaf1b848f888701e38233fb43360ae74" }, "downloads": -1, "filename": "ipfscluster-0.0.0.tar.gz", "has_sig": false, "md5_digest": "e80780ed4de9da08ee718b34013eb4f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6824, "upload_time": "2019-07-04T15:35:37", "url": "https://files.pythonhosted.org/packages/86/6c/958703ddcd05c7707c4261fe4e7150e21e7e903333b66bf643bb82cbf430/ipfscluster-0.0.0.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "5d9d3afa7134e1d91a3904e5fb270fb4", "sha256": "39e8ff030b77512d2b22e6ea2b5f0240b9516904d22791359ecd9f0a81551c01" }, "downloads": -1, "filename": "ipfscluster-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5d9d3afa7134e1d91a3904e5fb270fb4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 22508, "upload_time": "2019-07-29T21:46:54", "url": "https://files.pythonhosted.org/packages/f5/48/9b8a411bd10a5bc72300200872d54defe6804ee38194e45b940017684684/ipfscluster-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3f977935da2c808bcd442b573e0b39a7", "sha256": "1bff55389648a40a0ee9e8d4e47c586e5f2fc575c64331c922a006bc99600503" }, "downloads": -1, "filename": "ipfscluster-0.1.2.tar.gz", "has_sig": false, "md5_digest": "3f977935da2c808bcd442b573e0b39a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9485, "upload_time": "2019-07-29T21:46:56", "url": "https://files.pythonhosted.org/packages/39/8e/bdb35dcd6db966f8c074679e19c18746f2014bb82b35bc34b2e2db49ca0c/ipfscluster-0.1.2.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "f3f4e895c3f127aae07d81024d67580d", "sha256": "fbd1561c8571876b37ef73786c94278ff5589c3ec929a4d5d464a5a5ec2b0ed7" }, "downloads": -1, "filename": "ipfscluster-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f3f4e895c3f127aae07d81024d67580d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 23714, "upload_time": "2019-08-17T00:00:54", "url": "https://files.pythonhosted.org/packages/c7/72/4b1800c2ae91136ef5bed29710b5e9015cfbb499e759f51ef3513793145f/ipfscluster-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "00c6d01c045d5b1fab37e58f4c778f75", "sha256": "596b20d1c18844aee41860a59fb5bbfb5e771a3b4ca37d7123366f5a9761a325" }, "downloads": -1, "filename": "ipfscluster-0.2.0.tar.gz", "has_sig": false, "md5_digest": "00c6d01c045d5b1fab37e58f4c778f75", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11426, "upload_time": "2019-08-17T00:00:55", "url": "https://files.pythonhosted.org/packages/bb/96/9de7d042c4334de5e83ea25894a78b11b4cf2038ac6deb400ea41319bcdb/ipfscluster-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f3f4e895c3f127aae07d81024d67580d", "sha256": "fbd1561c8571876b37ef73786c94278ff5589c3ec929a4d5d464a5a5ec2b0ed7" }, "downloads": -1, "filename": "ipfscluster-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f3f4e895c3f127aae07d81024d67580d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 23714, "upload_time": "2019-08-17T00:00:54", "url": "https://files.pythonhosted.org/packages/c7/72/4b1800c2ae91136ef5bed29710b5e9015cfbb499e759f51ef3513793145f/ipfscluster-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "00c6d01c045d5b1fab37e58f4c778f75", "sha256": "596b20d1c18844aee41860a59fb5bbfb5e771a3b4ca37d7123366f5a9761a325" }, "downloads": -1, "filename": "ipfscluster-0.2.0.tar.gz", "has_sig": false, "md5_digest": "00c6d01c045d5b1fab37e58f4c778f75", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11426, "upload_time": "2019-08-17T00:00:55", "url": "https://files.pythonhosted.org/packages/bb/96/9de7d042c4334de5e83ea25894a78b11b4cf2038ac6deb400ea41319bcdb/ipfscluster-0.2.0.tar.gz" } ] }