Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

Many pages make a thick book.


comp / comp.lang.python / Poetry: endpoints with endpoints

SubjectAuthor
o Poetry: endpoints with endpointsLoris Bennett

1
Subject: Poetry: endpoints with endpoints
From: Loris Bennett
Newsgroups: comp.lang.python
Organization: FUB-IT, Freie Universität Berlin
Date: Thu, 31 Oct 2024 11:05 UTC
Path: eternal-september.org!news.eternal-september.org!feeder2.eternal-september.org!fu-berlin.de!uni-berlin.de!not-for-mail
From: loris.bennett@fu-berlin.de (Loris Bennett)
Newsgroups: comp.lang.python
Subject: Poetry: endpoints with endpoints
Date: Thu, 31 Oct 2024 12:05:50 +0100
Organization: FUB-IT, Freie Universität Berlin
Lines: 28
Message-ID: <874j4sbkhd.fsf@zedat.fu-berlin.de>
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: news.uni-berlin.de rQ/O5s7UZ+zgh+5clGah+gmwqTwKvIJCkNZ8Iu+de0Q8Id
Cancel-Lock: sha1:NikfzFPSgtSwodbWdiNER5YjLcY= sha1:ZLqWRdoez6mqCP9GZwYUZxdg8+g= sha256:yJfBaXpZ/Dr8CXcZtZ+XNil7iUgsq8T7q/teXWVCn/E=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
View all headers

Hi,

I am using Poetry and have the following in my pyproj.toml

[tool.poetry.scripts]
frobnicate = "frobnicator.cli:frobnicate"

The CLI provides an option '--flavour' and I would like to add further
endpoints for specific values of 'flavour'. I tried adding

frobnicate_foo = "frobnicator.cli:frobnicate --flavour foo"

to '[tool.poetry.scripts]', but when I call this I get the error

$ poetry run frobnicate_foo --verbose
File "<string>", line 1
import sys; from importlib import import_module; sys.argv = ['frobnicate, '--verbose']; import_module('frobniator.cli').frobnicate --flavour foo()
^
SyntaxError: invalid syntax

Is it possible to add such endpoint? If so, how?

Cheers,

Loris

--
This signature is currently under constuction.

1

rocksolid light 0.9.8
clearnet tor