Skip to content

Python bindings #408

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

Closed
bbayles opened this issue May 16, 2023 · 4 comments
Closed

Python bindings #408

bbayles opened this issue May 16, 2023 · 4 comments

Comments

@bbayles
Copy link

bbayles commented May 16, 2023

What is the problem this feature will solve?

Python has a mostly-compatible URL processing toolkit in its standard library (urllib.parse). However, it primarily uses RFC 3986 instead of the WHATWG URL spec, and is fairly slow.

What is the feature you are proposing to solve the problem?

I used ada's C wrapper and cffi to put together what-url, a Python package that exposes several of ada's functions to Python. If it's of interest to this project's maintainers, I could contribute that code to this repository.

What alternatives have you considered?

If a Python wrapper is out of scope for this project, it might be helpful to add a link to what-url so Python users will know they don't have to write their own bindings.

@anonrig
Copy link
Member

anonrig commented May 16, 2023

Hi @bbayles,

Thanks for opening the issue. We're in the progress of starting the Python binding, and happy to see that you've made significant progress on it.

We'll be happy to put the library under ada-url organization. I opened an repository for you to open a pull request and contribute:

https://github.com/ada-url/python

@bbayles
Copy link
Author

bbayles commented May 16, 2023

Excellent. I'll make a PR with my code, and you can decide how much of it makes sense to take. I came up with an API that makes sense to me as a Python user, but we may want to expose more of the underlying library.

@anonrig
Copy link
Member

anonrig commented May 16, 2023

@bbayles Would you be interested in renaming it to ada-url instead of what-url?

@bbayles
Copy link
Author

bbayles commented May 16, 2023

Yes indeed. I chose what-url because I wanted to make it clear that my project wasn't endorsed by or affiliated with WHATWG or Ada. But ada-url is a better name for CFFI bindings for ada, so I'm happy to be joining forces.

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

No branches or pull requests

2 participants