Skip to content

Calling the generator from cli works with different syntax from documentation #1260

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

Open
rodigu opened this issue May 28, 2025 · 1 comment

Comments

@rodigu
Copy link

rodigu commented May 28, 2025

Describe the bug

Calling from cli using the suggested method with python -m does not work.

python -m openapi-python-client --version
PATH_TO_PYTHON\python.exe: No module named openapi-python-client

Using underscores, however, does work (python -m openapi_python_client -version):

python -m openapi_python_client --version
openapi-python-client version: 0.24.3

OpenAPI Spec File

Not applicable

Desktop (please complete the following information):

  • OS: Windows 11 (Microsoft Windows NT 10.0.26100.0)
  • Python Version: [e.g. 3.12.7]
  • openapi-python-client version [e.g. 0.24.3]

Additional context

Running from a powershell instance in VSCode with a conda environment selected as a Python interpreter.

Would it be possible to add a line to the documentation mentioning the call with python -m?

@dbanty
Copy link
Collaborator

dbanty commented Jun 1, 2025

Sure, definitely not opposed. I'm curious why/when someone would opt for python -m openapi_python_client over running openapi-python-client, though, so we can add some guidance?

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

No branches or pull requests

2 participants