apple / pkl

A configuration as code language with rich validation and tooling.
https://pkl-lang.org
Apache License 2.0
10.19k stars 275 forks source link

Python language bindings #9

Open WillDaSilva opened 8 months ago

WillDaSilva commented 8 months ago

Currently the following language bindings are supported:

It would be nice to add Python to the list, as it's one of the most popular programming languages, and it is often used to process configuration.

A first step towards achieving this may be the creation of a C API, which Python could then wrap:

shinybrar commented 8 months ago

+1 for Python Support. A lot of existing configuration systems, dev/infra/code-ops ecosystem leverage python. A python binding would would be a great addition.

jaanli commented 8 months ago

+1!!!

yu-iskw commented 8 months ago

+1

Haoyi-Han commented 8 months ago

+10086

eliasp commented 8 months ago

See also the discussion regarding a generic C ABI which would be required for a proper implementation of Python bindings.

kaizen63 commented 8 months ago

+1

tothandor commented 8 months ago

And then the results could be serialized in Pickle. 😉

emirkmo commented 8 months ago

Seems like pickle basically can do what pydantic does. So maybe pydantic V2 generation would make sense? Could then even go via rust instead of C or just generate pydantic Python and have pydantic/Python handle the underlying rust/C as it already does at runtime.

or am I missing the point?

mmussie commented 7 months ago

+1

rlam3 commented 7 months ago

+1

kamalmarhubi commented 7 months ago

Please use emoji reactions on the issue instead of replying to indicate your interest. If you simply want to be notified of updates, you can subscribe to the issue—there's no need to add a comment.

4ozyCoder commented 7 months ago

+1

bioball commented 7 months ago

For those that are interested in implementing a python binding: we just published a specification for our message passing API, and our binary serialization format.

Our documentation can be found here: https://pkl-lang.org/main/current/bindings-specification/index.html

fabio-e-azevedo commented 7 months ago

+1 for Python Support.

ubidefeo commented 7 months ago

And it should be MicroPython friendly

jw-y commented 7 months ago

I made python binding and it can be found here:

It is for evaluator only and doesn't have code generation yet. But I hope I can implement it soon. Or pull requests are welcome.

slax32 commented 6 months ago

+1

mkemlogic commented 6 months ago

must have! We use python a lot, but none of the supported languages. I guess C, C++ and Rust would be next

leo-yang99 commented 6 months ago

Adding python support would be game changing!

jw-y commented 6 months ago

I've also added codegen (though it still needs more testing) Check it out here pkl-python

neuromuse commented 5 months ago

Python you can do it!

almogtavor commented 4 months ago

@bioball it would be great if you'll respond with your thoughts regarding the implementation of @jw-y - https://github.com/jw-y/pkl-python so it’ll get better chances of getting accepted.

As for Pydantic support, I’ve created an issue at the pkl python repository to discuss it.

jaques-sam commented 1 month ago

For Rust, you can currently use https://github.com/DevYatsu/pkl_fast