| Deutsch English Français Italiano |
|
<87tteayavt.fsf@zedat.fu-berlin.de> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.roellig-ltd.de!open-news-network.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!not-for-mail From: "Loris Bennett" <loris.bennett@fu-berlin.de> Newsgroups: comp.lang.python Subject: Common objects for CLI commands with Typer Date: Fri, 20 Sep 2024 10:42:14 +0200 Organization: FUB-IT, Freie =?utf-8?Q?Universit=C3=A4t?= Berlin Lines: 19 Message-ID: <87tteayavt.fsf@zedat.fu-berlin.de> Mime-Version: 1.0 Content-Type: text/plain X-Trace: news.uni-berlin.de laEYfMurQ+BMTCoUiBaw8A5IsrUlWKAnD0rtY91vvvGmds Cancel-Lock: sha1:vOqHBbNcYsCkNHhARzlNzY4QIRo= sha1:iX2L2BsjAxhev9HqugU6tQPbbkE= sha256:vH4ClPfrzqx3In3am4OaJMWdj+pMKgK87RJjthb6Y/U= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Bytes: 1412 Hi, Apologies if the following description is to brief - I can expand if no one knows what I'm on about, but maybe a short description is enough. I am developing a command line application using Typer. Most commands need to do something in a database and also do LDAP stuff. Currently each command creates its own Database and LDAP objects, since each command forms an entry point to the program. With Typer, is there a way I can define the equivalent of class attributes at a single point which are then available to all commands? Cheers, Loris -- This signature is currently under constuction.