Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pipermerriam opened this issue Apr 24, 2020 · 14 comments · May be fixed by #3514
Open

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

pipermerriam opened this issue Apr 24, 2020 · 14 comments · May be fixed by #3514

Comments

@pipermerriam
Copy link
Member

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).

@pipermerriam
Copy link
Member Author

I realize these are already present under web3.types

Looks like the primary thing would be to document them.

@wolovim wolovim changed the title Provide TypedDict types for return values of methods usable by 3rd parties. Add documentation for TypedDict return values of methods usable by 3rd parties May 13, 2020
@covendev
Copy link

I would like to take this up if the issue is still open.

@kclowes
Copy link
Collaborator

kclowes commented Aug 2, 2021

Yep, feel free to make a PR! Thanks @Rnamita!

@NewMountain
Copy link

I'd be interested in helping here, but it's not totally clear what the desired outcome is. Is the ask to add type annotations to all files in /docs or specifically to add a new section to the docs making the fact there are types explicit?

@kclowes
Copy link
Collaborator

kclowes commented Nov 8, 2021

Awesome, thanks @NewMountain! Maybe both? IMHO, a new section in the docs seems like lower hanging fruit, so maybe we can start with that and then we can add types to the rest of the docs in a later PR if that would be useful. How does that sound?

@theyashwanthsai
Copy link

Hey I am interested in trying it out. Can I take this up?

@1VIP1786
Copy link

i will fix this

@xdatalinq
Copy link

Has this issue already been informally assigned to anyone?

@NewMountain
Copy link

Hi all. Apologies. When I committed to this, I was in a very different situation. Please do not block on me.

@pacrob
Copy link
Contributor

pacrob commented Sep 7, 2023

It has not been assigned, all yours, @xdatalinq

@xdatalinq
Copy link

@pacrob is there a community/project discord I could ask a few questions in? This is my first "public" commit, I'd like to ask few questions to get a sense of how much work I'm signed up for and precisely what's expected so I actually do a good job.

@pacrob
Copy link
Contributor

pacrob commented Sep 7, 2023

Our Discord

@flamiedev
Copy link

Is this issue still open ? If so I would like to help implement this.

@pacrob
Copy link
Contributor

pacrob commented Oct 16, 2024

Yep, still available!

@flamiedev flamiedev linked a pull request Oct 17, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants