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

Added typing stub file #48

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ImFstAsFckBoi
Copy link

@ImFstAsFckBoi ImFstAsFckBoi commented Mar 15, 2024

This adds a stub file, adding type hints in Python. This added the connect function as well as the Connection and Cursor classes. Everything is in the libsql_experimental.pyi file. According to this PyO3 documentation, as long as there is no other Python files (excluding examples) Maturin will automatically install this file correctly, adding __init__.pyi and py.typed to site-packages. Below is a before and after example for the connect function.

If there is anything I missed or misunderstood, let me know and ill fix it :)

before
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant