Adding typings
See original GitHub issueDescription
It would be quite useful for this library to support Python with type hints.
An obvious benefit is that users of the library, if using mypy or similar, are able to verify that they are using library in correct way, avoiding situations like:
- typos
- input data mismatch
- output data mismatch
There are 2 ways to do that:
- resolving #207 first and baking annotations directly into codebase as a preferable method mentioned here
- getting an 👍 from this library maintainers and pushing
stubsinto python/typeshed library
Either works for me. I acknowledge that first option requires a lot of thinking and preparation whilst 2nd one is simply easier for auth0-python to keep compatibility with older Python versions for a little longer. I am willing to help with either #207 or this issue (either here or in typeshed)
Prerequisites
- I have checked the README documentation.
- I have checked the Auth0 Community for related posts.
- I have checked for related or duplicate Issues and PRs.
- I have read the Auth0 general contribution guidelines.
- I have read the Auth0 Code of Conduct.
- I am reporting this to the correct repository.
Environment
auth0-python==3.9.1- other factors does not seem to be relevant
Reproduction
I believe that an example like so is enough:
class TypingShowsAny:
def __init__(domain: str, access_token: str) -> None:
self._client = client = auth0.v3.management.Clients(domain, access_token)
reveal_type(client)
reveal_type reports Any whilst it should report auth0.v3.management.Clients
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:7 (3 by maintainers)
Top Results From Across the Web
TypeScript: Adding Custom Type Definitions for Existing ...
In these circumstances, you have to add your own custom type definitions for the libraries. This article will show you how to that....
Read more >How to add custom "typings" in typescript 2.0 / 3.0
You can create local custom typings just for your project, where you can declare types for JS libraries. For that, you need to:....
Read more >How to add custom types into the TypeScript project - drag13.io
Tutorial how to add custom types (typings) for the third-party code into the TypeScript project or how to solve "could not find a...
Read more >Adding Custom Type Definitions to a Third-Party Library
Add an index.d.ts file with your typings into that folder: types/third-party-library-name/index.d.ts. 5. Add your type definition.
Read more >Documentation - Creating .d.ts Files from .js files - TypeScript
Run the TypeScript compiler to generate the corresponding d.ts files for JS files; (optional) Edit your package.json to reference the types. Adding TypeScript....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you have not received a response for our team (apologies for the delay) and this is still a blocker, please reply with additional information or just a ping. Thank you for your contribution! 🙇♂️
Can this be reopened? Type hints would be very nice to have and it’s increasingly unusual for an SDK not to either include them or have external stubs in typeshed.