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

[Feature] Make pybambu available on https://pypi.org/ with docs #734

Open
SilkePilon opened this issue Nov 13, 2024 · 5 comments
Open

[Feature] Make pybambu available on https://pypi.org/ with docs #734

SilkePilon opened this issue Nov 13, 2024 · 5 comments
Labels
feature request New feature or request

Comments

@SilkePilon
Copy link

SilkePilon commented Nov 13, 2024

Describe the feature

Hi, im working on a new project over on https://bambumanager.vercel.app/ and am looking for a better lib i can use to control the printers, this is also an open source project. Is there any way you can publish this part of your code to pypi?

I would love to help you out by writing some docs and examples once i know where to start.

@SilkePilon SilkePilon added the feature request New feature or request label Nov 13, 2024
@jneilliii
Copy link

jneilliii commented Nov 13, 2024

an older version of pybambu is already living on pypi and is found here: https://github.com/greghesp/pybambu

https://pypi.org/project/pybambu/

I was using it for my OctoPrint plugin integration until all the crazy cloud blocking started happening.

@AdrianGarside
Copy link
Collaborator

Honestly the main blocker for official releasing it on pypi is that there isn't a clean API boundary around it yet. I haven't been able to find time to do the slog of learning the right style and cleaning up the existing code.

@SilkePilon
Copy link
Author

ok, can you maybe tell me how to use this code standalone, just an basic example, so i can at least write some docs for it as i think a lot of other projects would love to use something like this.

@jneilliii
Copy link

jneilliii commented Nov 16, 2024

To get it working for me with some of the latest changes I just copied the pybambu folder into my own project and made minor adjustments to some of the functions to make them non async (the bambu_client connect function call).

https://github.com/jneilliii/OctoPrint-BambuPrinter/tree/rc/octoprint_bambu_printer/printer/pybambu

prior to that, I was just using the pybambu module as a dependency from pypi, which is still in the current master branch.

https://github.com/jneilliii/OctoPrint-BambuPrinter

@greghesp
Copy link
Owner

greghesp commented Nov 18, 2024

The library itself is bundled into this repo, however as Adrian says, there isn't a clean API schema around it yet as it's designed for this integration, and Bambu keep changing things.

You can find the library here though: https://github.com/greghesp/ha-bambulab/tree/main/custom_components/bambu_lab/pybambu

If you're doing this on Vercel, I assume you're using Nextjs, so you might be better off converting the way the pybambu works into Javascript. Something like https://www.npmjs.com/package/bambu-js

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

No branches or pull requests

4 participants