Common objects for CLI commands with Typer

Loris Bennett loris.bennett at fu-berlin.de
Fri Sep 20 04:42:14 EDT 2024


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.


More information about the Python-list mailing list