Skip to content

Add documentation for TypedDict return values of methods usable by 3rd parties #1628

Open
@pipermerriam

Description

@pipermerriam

What was wrong?

While making an application that uses the web3.py library I found myself really wishing there were strong return types for the various methods like w3.eth.get_block(...). Basically, I want to have something like a TypedDict which strongly defines the return types of the various web3 methods.

How can it be fixed?

The web3 library should have TypedDict types for all of the various return types that return a mapping. These types should be importable by 3rd party libraries (probably via web3.typing) and should also be documented (probably in a new section of the documentation focused on how to do typing for 3rd party applications).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions