wilfredinni/comments_merken

Python projects with Poetry and VSCode. Part 3 - Python Cheatsheet

Opened this issue ยท 8 comments

Python projects with Poetry and VSCode. Part 3 - Python Cheatsheet

Finally, in this third part, we'll write a sample library, build our project with Poetry and publish it on Pypi.

https://www.pythoncheatsheet.org/blog/python-projects-with-poetry-and-vscode-part-3

I'm getting a ModuleNotFoundError: No module named 'pendulum' error when i try to do from how_long import timer

Try 'poetry install' or 'poetry add pendulum' @vaMuchenje

Is there a way to publish to https://test.pypi.org/ - to avoid spaming pypi.org?

Is there a way to publish to https://test.pypi.org/ - to avoid spaming pypi.org?

@testautomation yes, you have to add the repository yourself:

$ poetry config repositories.testpypi https://test.pypi.org/legacy

and then

$ poetry publish -r testpypi

@wilfredinni a follow up question:

When I run poetry publish -r restpypi I get this error

[KeyRingError]
Unable to retrieve the password for poetry-repository-pypi from the key ring

Also I can't find poetry's config file where I may have to add my testpypi credentials(?)

Too bad that this series do not explain how to setup a launch.json for being able to debug Python apps in Visual Studio Code. So far I have been unable to setup one. Would be grateful for a fourth part of this series explaining how to debug apps which are using poetry :)

@tpiekarski that is actually a very good idea... I may write something this weekend if I find the time

Glad to hear that, but be aware of that it seems not to be so straight forward. But you would be the first one writing about it. Looking forward to read a new fourth part of your series.