atpbar | Progress bars for threading and multiprocessing tasks

 by   alphatwirl Python Version: 1.1.4 License: BSD-3-Clause

kandi X-RAY | atpbar Summary

kandi X-RAY | atpbar Summary

atpbar is a Python library. atpbar has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can install using 'pip install atpbar' or download it from GitHub, PyPI.

Progress bars for threading and multiprocessing tasks on terminal and Jupyter Notebook. atpbar can display multiple progress bars simultaneously growing to show the progresses of iterations of loops in threading or multiprocessing tasks. atpbar can display progress bars on terminal and Jupyter Notebook. atpbar can be used with Mantichora. atpbar started its development in 2015 as part of alphatwirl. atpbar prevented physicists from terminating their running analysis codes, which would take many hours to complete, by showing progress bars indicating their codes were actually running. The progress bars have saved the physicists countless hours total. atpbar had been the sub-package progressbar of alphatwirl until it became an independent package, with the name atpbar, in February 2019.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              atpbar has a low active ecosystem.
              It has 60 star(s) with 8 fork(s). There are 2 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 6 open issues and 11 have been closed. On average issues are closed in 53 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of atpbar is 1.1.4

            kandi-Quality Quality

              atpbar has 0 bugs and 0 code smells.

            kandi-Security Security

              atpbar has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              atpbar code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              atpbar is licensed under the BSD-3-Clause License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              atpbar releases are available to install and integrate.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.
              atpbar saves you 1631 person hours of effort in developing the same functionality from scratch.
              It has 3622 lines of code, 285 functions and 52 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed atpbar and discovered the below as its top functions. This is intended to give you an instant insight into atpbar implemented functionality, and help decide if they suit your requirements.
            • Return a dict containing the command - line arguments
            • Flush the buffer
            • Write string to buffer
            • Extract the version information from the VCS
            • Build a ConfigParser from a root
            • Yield the reporter
            • End the pickup
            • Start the pickup
            • Start the stream
            • Creates a presentation
            • Ensure report is present
            • Check if there are tasks that need to be present
            • Find the reporter
            • Return a reporter instance
            • Run the thread
            • Write string s to out
            • Is a Jupyter notebook?
            • Check if Spyder is running in Spyder
            • Create the versioneer config file
            • Install versioneer
            • Ensures that all active bars are displayed
            • Flush the database
            • Run the loop
            • Write s to out
            • Worker thread
            • Start recording
            • Scans the setup py file and checks if it is missing
            • Extract version information from VCS
            Get all kandi verified functions for this library.

            atpbar Key Features

            No Key Features are available at this moment for atpbar.

            atpbar Examples and Code Snippets

            atpbar,User guide,Quick start
            Pythondot img1Lines of Code : 103dot img1License : Permissive (BSD-3-Clause)
            copy iconCopy
            import time, random
            from atpbar import atpbar
            
            n = random.randint(1000, 10000)
            for i in atpbar(range(n)):
                time.sleep(0.0001)
            
              51.25% ::::::::::::::::::::                     |     4132 /     8062 |:  range(0, 8062) 
            
            for i in atpbar(range(4), n  
            atpbar,User guide,Features
            Pythondot img2Lines of Code : 77dot img2License : Permissive (BSD-3-Clause)
            copy iconCopy
            for i in atpbar(range(2000)):
                if i == 1234:
                    break
                time.sleep(0.0001)
            
              61.70% ::::::::::::::::::::::::                 |     1234 /     2000 |:  range(0, 2000)
            
            for i in atpbar(range(2000)):
                if i == 1234:
                    raise Exception
              
            atpbar
            Pythondot img3Lines of Code : 5dot img3License : Permissive (BSD-3-Clause)
            copy iconCopy
             100.00% :::::::::::::::::::::::::::::::::::::::: |     7811 /     7811 |:  task 1
             100.00% :::::::::::::::::::::::::::::::::::::::: |    23258 /    23258 |:  task 0
              65.62% ::::::::::::::::::::::::::               |     8018 /    12219 |:  task 4
               

            Community Discussions

            No Community Discussions are available at this moment for atpbar.Refer to stack overflow page for discussions.

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install atpbar

            You can install with conda from conda-forge:.
            I will show here how to use atpbar by simple examples. To create simple loops in the examples, we use two python standard libraries, time and random. Import the two packages as well as atpbar. Note: import the object atpbar from the package atpbar rather than importing the package atpbar itself. The object atpbar is an iterable that can wrap another iterable and shows the progress bars for the iterations. (The idea of making the interface iterable was inspired by tqdm.). The task in the above code is to sleep for 0.0001 seconds in each iteration of the loop. The number of the iterations of the loop is randomly selected from between 1000 and 10000. A progress bar will be shown by atpbar. In order for atpbar to show a progress bar, the wrapped iterable needs to have a length. If the length cannot be obtained by len(), atpbar won't show a progress bar. atpbar can show progress bars for nested loops as in the following example. The outer loop iterates 4 times. The inner loop is similar to the loop in the previous example---sleeps for 0.0001 seconds. You can optionally give the keyword argument name to specify the label on the progress bar. In the snapshot of the progress bars above, the outer loop is in its 3rd iteration. The inner loop has completed twice and is running the third. The progress bars for the completed tasks move up. The progress bars for the active tasks are growing at the bottom. atpbar can show multiple progress bars for loops concurrently iterating in different threads. The function run_with_threading() in the following code shows an example. The task to sleep for 0.0001 seconds is defined as the function task. The task is concurrently run 5 times with threading. atpbar can be used in any threads. Five progress bars growing simultaneously will be shown. The function flush() returns when the progress bars have finished updating. As a task completes, the progress bar for the task moves up. The progress bars for active tasks are at the bottom. atpbar can be used with multiprocessing. The function run_with_multiprocessing() in the following code shows an example. It starts four workers in subprocesses with multiprocessing and have them run ten tasks. In order to use atpbar in a subprocess, the reporter, which can be found in the main process by the function find_reporter(), needs to be brought to the subprocess and registered there by the function register_reporter(). Simultaneously growing progress bars will be shown. To use atpbar with multiprocessing.Pool, use find_reporter as the initializer and give the reporter as an argument to the initializer. See the example code in the issue. Mantichora provides a simple interface to multiprocessing and threading.

            Support

            Tai Sakuma - tai.sakuma@gmail.com
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install atpbar

          • CLONE
          • HTTPS

            https://github.com/alphatwirl/atpbar.git

          • CLI

            gh repo clone alphatwirl/atpbar

          • sshUrl

            git@github.com:alphatwirl/atpbar.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link