Home / Function/ progress() — fastapi Function Reference

progress() — fastapi Function Reference

Architecture documentation for the progress() function in termynal.js from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  276453e1_a537_b16c_0d88_4aa91742c2c3["progress()"]
  9ac7d251_814a_26a5_a84c_3f2943de3969["start()"]
  9ac7d251_814a_26a5_a84c_3f2943de3969 -->|calls| 276453e1_a537_b16c_0d88_4aa91742c2c3
  8a1fd6e9_44b8_f397_ad64_c702183a7a6e["_wait()"]
  276453e1_a537_b16c_0d88_4aa91742c2c3 -->|calls| 8a1fd6e9_44b8_f397_ad64_c702183a7a6e
  style 276453e1_a537_b16c_0d88_4aa91742c2c3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

docs/en/docs/js/termynal.js lines 187–206

    async progress(line) {
        const progressLength = line.getAttribute(`${this.pfx}-progressLength`)
            || this.progressLength;
        const progressChar = line.getAttribute(`${this.pfx}-progressChar`)
            || this.progressChar;
        const chars = progressChar.repeat(progressLength);
		const progressPercent = line.getAttribute(`${this.pfx}-progressPercent`)
			|| this.progressPercent;
        line.textContent = '';
        this.container.appendChild(line);

        for (let i = 1; i < chars.length + 1; i++) {
            await this._wait(this.typeDelay);
            const percent = Math.round(i / chars.length * 100);
            line.textContent = `${chars.slice(0, i)} ${percent}%`;
			if (percent>progressPercent) {
				break;
			}
        }
    }

Subdomains

Calls

Called By

Frequently Asked Questions

What does progress() do?
progress() is a function in the fastapi codebase.
What does progress() call?
progress() calls 1 function(s): _wait.
What calls progress()?
progress() is called by 1 function(s): start.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free