Common objects for CLI commands with Typer

Liste des GroupesRevenir à cl python 
Sujet : Common objects for CLI commands with Typer
De : loris.bennett (at) *nospam* fu-berlin.de (Loris Bennett)
Groupes : comp.lang.python
Date : 20. Sep 2024, 10:42:14
Autres entêtes
Organisation : FUB-IT, Freie Universität Berlin
Message-ID : <87tteayavt.fsf@zedat.fu-berlin.de>
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
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.

Date Sujet#  Auteur
20 Sep 24 * Common objects for CLI commands with Typer7Loris Bennett
20 Sep 24 +- Re: Common objects for CLI (Posting On Python-List Prohibited)1Lawrence D'Oliveiro
21 Sep 24 +- Re: Common objects for CLI commands with Typer1Barry
21 Sep 24 +- Re: Common objects for CLI commands with Typer12QdxY4RzWzUUiLuE
23 Sep 24 +- Re: Common objects for CLI commands with Typer1Barry Scott
23 Sep 24 +- Re: Common objects for CLI commands with Typer12QdxY4RzWzUUiLuE
16 Oct 24 `- Re: Common objects for CLI commands with Typer1Roland Müller

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal