ada-url/ada

Python bindings

bbayles opened this issue · 4 comments

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.

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

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.

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

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.