
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
|PyPI-Status| |PyPI-Versions| |LICENSE| |Tests| |Codecov| |Requirements| |Downloads|
Fast, Extensible Progress Meter (tqdm) For Django.
| Use tqdm_ in Django_ management commands seamlessly. | It provides simple universal commands for Django management command to output text using standard command functions and tqdm. | Only currently supported versions of Django and Python are supported.
.. code:: python
from django_tqdm import BaseCommand
from time import sleep
class Command(BaseCommand):
def handle(self, *args, **options):
# Output directly
self.error("Error")
self.info("Info")
# Output through tqdm
t = self.tqdm(total=50)
for x in range(50):
sleep(0.03)
t.update(1)
if x == 10:
t.info("X = 10")
if x == 20:
t.error("X = 20")
Advanced:
.. code:: python
info(text, ending="\n", fatal=False)
error(text, ending="\n", fatal=False)
write(text, ending="\n", fatal=False, error=False)
If you set fatal
to True
it will terminate the command after printing the message.
For documentation on tqdm see tqdm_.
In django-tqdm:
.. code:: python
self.info("info")
self.error("error")
In vanilla Django:
.. code:: python
self.stdout.write("info")
self.stderr.write("error")
.. code:: python
self.info("info")
self.error("error")
|Demo1|
.. code:: python
t = self.tqdm(total=50)
for x in range(50):
sleep(0.02)
t.update(1)
if x == 10:
t.info("info")
if x == 40:
t.error("error")
|Demo2|
.. code:: python
t = tqdm(total=50)
for x in range(50):
sleep(0.02)
t.update(1)
if x == 25:
t.write("info")
if x == 40:
t.write("error", file=sys.stderr)
|Demo3|
Read developer documentation
_.
.. |Demo1| image:: https://asciinema.org/a/117133.png :target: https://asciinema.org/a/117133
.. |Demo2| image:: https://asciinema.org/a/117136.png :target: https://asciinema.org/a/117136
.. |Demo3| image:: https://asciinema.org/a/117137.png :target: https://asciinema.org/a/117137
.. |PyPI-Status| image:: https://img.shields.io/pypi/v/django-tqdm.svg :target: https://pypi.python.org/pypi/django-tqdm
.. |PyPI-Versions| image:: https://img.shields.io/pypi/pyversions/django-tqdm.svg :target: https://pypi.python.org/pypi/django-tqdm
.. |LICENSE| image:: https://img.shields.io/pypi/l/django-tqdm.svg :target: https://raw.githubusercontent.com/desecho/django-tqdm/master/LICENSE
.. |Tests| image:: https://github.com/desecho/django-tqdm/actions/workflows/test.yaml/badge.svg?branch=master :target: https://github.com/desecho/django-tqdm/actions/workflows/test.yaml
.. |Codecov| image:: https://codecov.io/gh/desecho/django-tqdm/branch/master/graph/badge.svg :target: https://codecov.io/gh/desecho/django-tqdm
.. |Requirements| image:: https://requires.io/github/desecho/django-tqdm/requirements.svg?branch=master :target: https://requires.io/github/desecho/django-tqdm/requirements/?branch=master :alt: Requirements Status
.. |Downloads| image:: https://pepy.tech/badge/django-tqdm :target: https://pepy.tech/project/django-tqdm :alt: Downloads
.. _tqdm: https://github.com/tqdm/tqdm .. _Django: https://www.djangoproject.com .. _developer documentation: https://github.com/desecho/django-tqdm/blob/master/developer_doc.md
FAQs
Fast, Extensible Progress Meter (tqdm) For Django
We found that django-tqdm demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.