https://github.com/erigontech/silksnake
Python library to access turbo-geth/silkworm data remotely
https://github.com/erigontech/silksnake
Last synced: 17 days ago
JSON representation
Python library to access turbo-geth/silkworm data remotely
- Host: GitHub
- URL: https://github.com/erigontech/silksnake
- Owner: erigontech
- License: apache-2.0
- Created: 2020-09-12T06:06:01.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-11-13T16:50:44.000Z (over 5 years ago)
- Last Synced: 2025-01-03T15:14:54.091Z (over 1 year ago)
- Language: Python
- Size: 237 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Silksnake
Python library to access [Turbo-Geth](https://github.com/ledgerwatch/turbo-geth)/[Silkworm](https://github.com/torquem-ch/silkworm) data remotely using their [Key-Value (KV)](./silksnake/remote/proto/kv.proto) protocol over [gRPC](https://grpc.io/).
[](https://circleci.com/gh/torquem-ch/silksnake)
[](https://codecov.io/gh/torquem-ch/silksnake)

[](https://img.shields.io/github/license/torquem-ch/silksnake)

## Platform Requirements
### Python Interpreter
Silksnake requires __Python 3.x__. Install it from [here](https://www.python.org/downloads/) and check the installation using
```shell-session
$ python --version
Python 3.6.9
```
Hereafter `python` command refers to the Python 3.x interpreter.
### Python Package Installer (pip)
After Python installation, it is recommended [Upgrading pip](https://pip.pypa.io/en/stable/installing/#upgrading-pip)
## Structure
The project is organized in the following folders:
- [__docs__](./docs) contains the programming guide of Silksnake and the user guide of Silksnake tools
- [__silksnake__](./silksnake) contains the Silksnake source code
- [__tests__](./tests) contains the unit and integration tests
- [__tools__](./tools) contains the Silksnake command-line tools for retrieving data using KV gRPC protocol
## Setup
Please perform the following commands from Silksnake root folder.
### Dependencies
Install dependencies using
```shell-session
$ pip install -r requirements.txt
```
or
```shell-session
$ python setup.py
```
### Test
Run unit tests using
```shell-session
$ pytest tests/unit
```
### Coverage
Run test coverage using
```shell-session
$ coverage run -m pytest
$ coverage report
```
### Linter
Run [pylint](https://www.pylint.org/) using
```shell-session
$ pylint silksnake tests tools
```
### Binding Generation (not required)
Run binding generation for KV gRPC protocol using
```shell-session
$ python -m grpc_tools.protoc --proto_path=. --python_out=. --grpc_python_out=. silksnake/remote/proto/kv.proto
```