Skip to content
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

How to disable or turn-off progress bar globally #105

Open
JakeSummers opened this issue Feb 2, 2024 · 1 comment
Open

How to disable or turn-off progress bar globally #105

JakeSummers opened this issue Feb 2, 2024 · 1 comment

Comments

@JakeSummers
Copy link

My backend service is using several libraries that are using this tooling.

Currently we are running a backend service, so we don't need a progress bar that prints to stdout. The progress bar is also corrupting some of our logs that occur on either side of the progres bar.

Is there a way to disable the progress bar globally, possibly by setting something like an environment variable?

@JakeSummers
Copy link
Author

It looks like this is possible like this:

import fastprogress.fastprogress
fastprogress.fastprogress.NO_BAR = True

If you also want to disable the output from master_bar.write, you can do this:

def do_nothing(*args):
    pass

fastprogress.fastprogress.WRITER_FN = do_nothing

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

1 participant