API under development and is subject to change
polyswarmd
is a convenience daemon that provides a simple RPC API for interacting with the PolySwarm marketplace. Specifically, polyswarmd
handles interaction with Ethereum and IPFS nodes on clients' behalf.
New developers are encouraged to visit the PolySwarm Documentation and build on top of polyswarm-client
rather than directly writing code against the comparatively low-level polyswarmd
.
There are a selection of useful rules covering routine tasks made in the project Makefile
,
make test
- Run allpytest
unittests & doctestsmake quicktest
- Run all "NOT SLOW" tests (PolyswarmD has some slow-running tests to verify certain WebSocket behavior, this will skip those)make coverage
- Print a test coverage report
make lint
- Linting the source directory with yapf, isort mypy, flake8 as well as running doctests forpolyswarmd.websockets
& verifyingrequirements*.txt
is sorted.make mypy
- Run mypy type checking
make format
- format source code in Polyswarm stylemake format-tests
- format test codemake format-requirements
- formatrequirements*.txt
make clean
- Cleanbuild/
,*.pyc
and moremake msgstubs
- Regenerate the dynamically generated type-stubs for the websocket messages inpolyswarmd.websockets.message
.make help
- Print available rules
artifact:
max_size: 34603008
fallback_max_size: 10485760
limit: 256
library:
module: polyswarmd.services.artifact.ipfs
class_name: IpfsServiceClient
args:
- http://localhost:5001
community: gamma
eth:
trace_transactions: true
consul:
uri: http://localhost:8500
# directory: /path/to/config
profiler:
enabled: false
# db_uri: http://db:1234
redis:
uri: redis://localhost:6379
websocket:
enabled: true