Chia网络数据ETL用于Nebula Graph
项目描述
nebula-chia
如何使用
ChaiBatchConvertor
步骤0,安装
nebula-chia
可以通过pip或从本git仓库本身安装。
通过pip安装
python3 -m pip install nebula-chia
从github仓库安装
git clone git@github.com:wey-gu/nebula-chia.git
cd nebula-chia
python3 setup.py install
注意
Nebula-chia依赖于
chia-blockchain
,最简单的方法是从Chia Network仓库内的venv调用它。
安装Chia Network请参阅https://github.com/Chia-Network/chia-blockchain/wiki/INSTALL
激活venv如下
cd chia-blockchain . ./activate
步骤1,将Chia转换为CSV文件
ChiaBatchConvertor
用于将Chia区块链数据转换为CSV文件,然后可用于nebula-importer
$ python3 -m pip install nebula-chia
$ python
# block_record_limit = 0 means unlimited
# coin_record_limit = 0 means unlimited
from nebulachia.convertor import ChiaBatchConvertor
c = ChaiBatchConvertor(block_record_limit=0, coin_record_limit=0, write_batch_size=10000)
c.convert_block_record()
c.convert_coin_record()
exit()
$ ls -lth
-rw-r--r-- 1 weyl staff 173M May 19 13:01 coin_record.csv
-rw-r--r-- 1 weyl staff 77M May 19 12:59 block_record.csv
...
项目详情
下载文件
下载适用于您的平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。
源分布
nebula-chia-0.2.tar.gz (3.8 kB 查看哈希值)
构建分布
nebula_chia-0.2-py3-none-any.whl (7.8 kB 查看哈希值)