Watchit Toolkit (WIP)
Getting started
- Spawn go-ipfs node with docker.
- How to spawn an IPFS node in Node.js.
- For private networks How to spawn an IPFS private node and generate swarm key.
Quick summary
NOTE! The gateway is alpha-stage software. It means watchit-gateway hasn't been security audited and programming APIs and data formats can still change.
The watchit gateway is an interface or micro framework for the migration of content to IPFS and the distribution of metadata through OrbitDB.
Watchit gateway adds migrated data to the metastore (orbitdb) which is distributed in a predefined scheme to ensure the integrity of the data that is later consumed by the dapp. Watchit gateway provides simple tools for the generation and fetching of content.
Resolvers
"A resolver is a set of instructions, expressed as a Python class. A gateway will execute a resolver to fetch content from various sources that later populate the schema." - @aphelionz
Resolvers implement the logic necessary for fetch, preprocessing, cleaning and schematization of data from any available resource. Based on the following class abstraction we can see the methods required for the development of a resolver:
Define your resolvers modules below.
Ex: Each resolver must implement 2 fundamental methods.
class Dummy:
def __str__(self) -> str:
return 'Test'
def __call__(self, scheme, *args, **kwargs):
"""
Returned meta should be valid scheme
Process your data and populate scheme struct
src/core/scheme/definition.py
:param scheme: MovieScheme object
:returns: Scheme valid object list ex: {movie1, movie2}
:rtype Generator[MovieScheme]
"""
yield data
Please see example
Scheme and Usage
Development
Please make sure you have make
installed. Please see instructions for windows install.
Install
make bootstrap
to install dependencies
Test
In the project directory, you can run:
make test
to run code test and make test-coverage
to check code coverage
Lint
In the project directory, you can run:
make
to run linter or make fix-coding-style
to fix linting
More info
- Visit our site watchitapp.site.
- Read our post in dev.to.
- Check out the roadmap to future features.
- Get in touch with us in gitter.
- For help or bugs please create an issue.
Contributors ✨
Thanks goes to these wonderful people (emoji key):
phillmac 💻 📓 🤔 🚇 |
Mark Robert Henderson 💻 🤔 |
Echedenyan 🚇 |
This project follows the all-contributors specification. Contributions of any kind welcome!