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

Python bindings #162

Open
cueckoo opened this issue Jul 3, 2021 · 6 comments
Open

Python bindings #162

cueckoo opened this issue Jul 3, 2021 · 6 comments
Labels
FeatureRequest New feature or request

Comments

@cueckoo
Copy link
Collaborator

cueckoo commented Jul 3, 2021

Originally opened by @jtrakk in cuelang/cue#162

I'm wondering if CUE might support Python bindings.

As far as I know, the simplest and most widely supported interfaces are via CFFI, as in this Go example. Binaries can be distributed in the wheel format on PyPI.

@cueckoo cueckoo added the FeatureRequest New feature or request label Jul 3, 2021
@cueckoo
Copy link
Collaborator Author

cueckoo commented Jul 3, 2021

Original reply by @mpvl in cuelang/cue#162 (comment)

This could live in a cuelang repo, like cuelang/lang-python is someone wants to take this on.

@cueckoo
Copy link
Collaborator Author

cueckoo commented Jul 3, 2021

Original reply by @mpvl in cuelang/cue#162 (comment)

@jtrakk could you perhaps comment on which features you would want to expose in the API. The API of CUE is quite large.

@cueckoo
Copy link
Collaborator Author

cueckoo commented Jul 3, 2021

Original reply by @jtrakk in cuelang/cue#162 (comment)

Even a minimal set of features could be useful. For example, translation between CUE strings and built-in Python types (or even JSON strings) would be enough to get started with CUE if it were packaged on PyPI so I could just pip install it.

@cueckoo
Copy link
Collaborator Author

cueckoo commented Jul 3, 2021

Original reply by @bep in cuelang/cue#162 (comment)

SInce Cue is a Go project, it would probably make sense to look at https://github.com/google/starlark-go

@cueckoo
Copy link
Collaborator Author

cueckoo commented Jul 3, 2021

Original reply by @mbarkhau in cuelang/cue#162 (comment)

This project has been created in the meantime: https://pypi.org/project/pycue/

It's a wrapper around the cue CLI command.

@philipdexter
Copy link

There's this https://github.com/philipdexter/pycue which I created a long time ago

@myitcv myitcv added Triage Requires triage/attention and removed Triage Requires triage/attention labels Jul 26, 2021
ptMcGit pushed a commit to ptMcGit/cue that referenced this issue Jan 22, 2023
This allows the main CUE repo to trigger a build check on some event in
the main CUE repo, e.g. a new release. This is a basic way to ensure
that cuelang.org is always using the latest CUE version.

Also flip to using GOPROXY=direct for the go get check (so we don't hit
a potentially stale proxy)
@myitcv myitcv added the zGarden label Jun 15, 2023
@mvdan mvdan removed the zGarden label Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants