RFG: Improve Python API

This is a ask Request-For-Grant to clean up Python APIs for NEAR.

We currently don’t have Borsh Python library.
There is some aspects of it implemented in a very under-developed library - https://github.com/near/near-api-py
Also a lot of python scripts that should be using Python API - are not currently - https://github.com/near/nearcore/tree/master/pytest

The goal would be to make this on the level that we have JS:

  • borsh-py - Borsh serialization/deserialization library with decorators for classes in Python.
  • near-api-py - full featured for backend development, has good test coverage and CI, has basic documentation (added to docs.near.org) and is published to PIP.
  • https://github.com/near/nearcore/tree/master/pytest refactored to use near-api-py

I’ve started to work on this in my spare time. I’ve started from borsh-py. I’ve frozen borsh package on PyPi https://pypi.org/project/borsh/. Anyway I’m going to transfer the ownership of PyPi package to some NEAR account when I finish.

1 Like