Python 3 async client for interacting with the IPFS HTTP API
Project description
Async IPFS API Client
Documentation can be found at aioipfs-api.readthedocs.org.
Installation
pip install aioipfs-api
Usage
This assumes you have a working familiarity with asyncio.
import asyncio
from aioipfs_api.client import Client
async def main():
async with Client() as client:
# print the readme
async with client.cat("QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG/readme") as f:
print(await f.text())
# add a directory
print(await client.add('/some/dir/path'))
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
Logging
This library uses the standard Python logging library. To see debut output printed to STDOUT, for instance, use:
import logging
log = logging.getLogger('aioipfs_api')
log.setLevel(logging.DEBUG)
log.addHandler(logging.StreamHandler())
Running Tests
To run tests:
pip install -r dev-requirements.txt
python -m unittest
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aioipfs-api-0.1.3.tar.gz.
File metadata
- Download URL: aioipfs-api-0.1.3.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0524fd9ed3ec0b66bc185f20bea167639376c5f89b5323b50458a43da5104cc3
|
|
| MD5 |
c7e68e0af4208d92f5f3303b3a9f37c2
|
|
| BLAKE2b-256 |
fba718a6831e3f525995e8dd975477c734ab812d614538a7f5e965ab79488e93
|
File details
Details for the file aioipfs_api-0.1.3-py3-none-any.whl.
File metadata
- Download URL: aioipfs_api-0.1.3-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0750e2e2d039519438108683c4ed41e188b8a3d3a3bcb435d1458a0bcf548ffa
|
|
| MD5 |
7c9bb4561b498f317d1308e61ee34a7c
|
|
| BLAKE2b-256 |
d0f741dcb7860a97310efa091cdce4886fb1d0b29e907865bc357d6c816bba32
|