Create python client to interact with Streamr API - Stage 1

streamr-dev

IoT, data, realtime data, data marketplace, p2p network, blockchain, web3, crypto

## What is it about This is a Streamr Community Bounty project. You can apply to work on Stage 1 of this project at Gitcoin via this link (to be added later). The goal is to create a python client library to interact with Streamr API. For reference, please visit our [Javascript Streamr Client](https://github.com/streamr-dev/streamr-client) and newly release MVP [Java Streamr Client](https://github.com/streamr-dev/streamr-client-java), which offers good examples. Also here is the link to our [API documentation](https://www.streamr.com/help/api) ## About us Streamr is building a pubsub P2P (peer-to-peer) network for realtime data exchange to help unleash the next wave of Web3. To learn more about our tech stack please visit our main website at [Streamr.com](https://www.streamr.com). Also if you are interested in learning more about our Streamr Network development please have a look at this [blog post](https://medium.com/streamrblog/building-the-missing-protocol-of-todays-internet-stack-a-decentralized-pub-sub-network-for-ad1f5972f3ca). Here are two interesting prospective of what Web3 means, [article1](https://medium.com/l4-media/making-sense-of-web-3-c1a9e74dcae) by Josh Stark at L4 and [article2](https://blog.coinbase.com/understanding-web-3-a-user-controlled-internet-a39c21cf83f3) from Emre Tekisalp at Coinbase ## Development overview This current project is divided into stage 1 and [stage 2](https://github.com/streamr-dev/python-streamr-client/issues/2). There will be another followup project to implement additional features but it will be presented as a separate Github issue with its own bounty. Each stage should be completed and accepted before work on the next stage can begin. Stage 1 constitutes an MVP with the most basic functionality in place, such as publishing and subscribing to streams over the websocket client protocol. Stage 2 adds cryptographic functionality such as Ethereum key-based session authentication, data signing, and data verification - as well as completing the stream REST API endpoints. ### Stage 1 **Session management** - Fetch sessionToken using API key - Note that the library should automatically fetch a new sessionToken if the old one has expired by repeating the same process. **Websocket API** IMPORTANT: there will be a new protocol version 1 scheduled to be released in the next few months. Please keep in mind of potential update. Here is the link to current [websocket protocol](https://github.com/streamr-dev/streamr-client-protocol-js/blob/master/PROTOCOL.md) - Implementation of websocket protocol version 0 with support for message payload version 28 (no data signing needed yet) - Subscribing to streams - Publishing (unsigned) messages to streams **Stream REST API endpoints** You can find API endpoints documentation at the bottom of this [documentation page](https://www.streamr.com/help/api) - creating streams `POST /streams` - getting a stream by id `GET /streams/id` - getting a stream by name `GET /streams?name=foobar` **Tests** - Integration tests for high-level functions that call the API - Sequentially authenticate, create stream, subscribe to it, publish data to it, verify that published data was received by subscriber - Unit tests for classes that don't call the API **Documentation and examples** - The `README.md` file should show basic examples of how to use each feature. - Please provide a few example runnable example scripts that cover stream creation, publishing and subscribing Once all the above requirements have been completed, please [create a Pull Request](https://help.github.com/articles/creating-a-pull-request/) for code review and approval before proceeding to [Stage 2](https://github.com/streamr-dev/python-streamr-client/issues/2). Also feel free to reach out to us for any question during the project, you don't have to wait until the completion to ask us for feedback. For any question feel free to reach out directly at my email weilei at streamr.com or also follow us on [Reddit ](https://www.reddit.com/r/streamr/) or [Telegram](https://t.me/streamrdata)