The version 0.5 will be a completely re-factored version with a new Client class added.
The purpose is to separate concerns and apply the KISS principle.
Move Endpoints handling from documents.peer module to a new api.endpoint module.
Create a new ws2p dedicated package.
Create a new elasticsearch dedicated package.
Write a new Client class to simplify connection syntax.
Example :
BMAS_ENDPOINT="BMAS node.domain.org 443"# Create Client from endpoint string in Duniter formatclient=Client(BMAS_ENDPOINT)# Get the node summary infos by dedicated method (with json schema validation)response=awaitclient(bma.node.summary)print(response)# Get the money parameters located in the first blockresponse=awaitclient(bma.blockchain.parameters)print(response)# Get the current blockresponse=awaitclient(bma.blockchain.current)print(response)# Get the block number 10response=awaitclient(bma.blockchain.block,10)print(response)# jsonschema validatorsummary_schema={"type":"object","properties":{"duniter":{"type":"object","properties":{"software":{"type":"string"},"version":{"type":"string",},"forkWindowSize":{"type":"number"}},"required":["software","version"]},},"required":["duniter"]}# Get the node summary infos (direct REST GET request)response=awaitclient.get('node/summary',rtype=RESPONSE_AIOHTTP,schema=summary_schema)print(response)# Close client aiohttp sessionawaitclient.close()