Amar-Aly commited on
Commit
ae6c983
·
verified ·
1 Parent(s): 3f3d97c

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .cache/pip/http-v2/0/0/5/2/9/005298b55218fcf8890ee28f2d436edb637e64ca3610c3698f55cc3c +0 -0
  2. .cache/pip/http-v2/0/0/5/2/9/005298b55218fcf8890ee28f2d436edb637e64ca3610c3698f55cc3c.body +480 -0
  3. .cache/pip/http-v2/0/0/e/c/f/00ecff9acd52a20e396217085e31e0ceb29ea4ddf87c72de0df5e74c +0 -0
  4. .cache/pip/http-v2/0/3/b/7/e/03b7e31ef41a67b4d5d0212d71d27b02703ce649d01a9d3a622a0976 +0 -0
  5. .cache/pip/http-v2/0/3/b/7/e/03b7e31ef41a67b4d5d0212d71d27b02703ce649d01a9d3a622a0976.body +0 -0
  6. .cache/pip/http-v2/0/4/4/7/c/0447ce2249fdae0f8cf52a43e01f215eacdf7c35d89a248bd4b4ebaa +0 -0
  7. .cache/pip/http-v2/0/4/4/7/c/0447ce2249fdae0f8cf52a43e01f215eacdf7c35d89a248bd4b4ebaa.body +0 -0
  8. .cache/pip/http-v2/0/c/1/9/0/0c1902a50947e5344575b4ef11e0b41b63cc4e3e15eb945e6b0cd91d +0 -0
  9. .cache/pip/http-v2/0/c/1/9/0/0c1902a50947e5344575b4ef11e0b41b63cc4e3e15eb945e6b0cd91d.body +0 -0
  10. .cache/pip/http-v2/1/8/e/c/b/18ecb372789efe49bbe46617b1f5d32a2b0eac245d58cbf930116174 +0 -0
  11. .cache/pip/http-v2/2/3/5/3/9/235392053f2a1040f180b6ba82c549e2c6a0340d4d823ef3a0847ef7 +0 -0
  12. .cache/pip/http-v2/2/3/5/3/9/235392053f2a1040f180b6ba82c549e2c6a0340d4d823ef3a0847ef7.body +412 -0
  13. .cache/pip/http-v2/2/b/0/a/4/2b0a4fda1a2c912a5a1c5245a8b34b5da87876e311f607befabc98ee +0 -0
  14. .cache/pip/http-v2/2/b/0/a/4/2b0a4fda1a2c912a5a1c5245a8b34b5da87876e311f607befabc98ee.body +0 -0
  15. .cache/pip/http-v2/2/d/2/7/4/2d274909802a294101952666e88fb2e3b7731b90c4e0fa9015d5a2c9 +0 -0
  16. .cache/pip/http-v2/3/4/e/4/e/34e4ed9f6da78ec378e04be04de734c69a68c889dbef86cb0f5f498a +0 -0
  17. .cache/pip/http-v2/3/4/e/4/e/34e4ed9f6da78ec378e04be04de734c69a68c889dbef86cb0f5f498a.body +0 -0
  18. .cache/pip/http-v2/3/5/a/0/6/35a0615e0411edd59492c90e8f5cd0a1a0554d6f7d1dec5be2b30560 +0 -0
  19. .cache/pip/http-v2/3/5/a/0/6/35a0615e0411edd59492c90e8f5cd0a1a0554d6f7d1dec5be2b30560.body +97 -0
  20. .cache/pip/http-v2/3/7/c/5/1/37c518ffee828550acec5a0fd158a5f1d852928eea13df9d077b428b +0 -0
  21. .cache/pip/http-v2/3/7/c/5/1/37c518ffee828550acec5a0fd158a5f1d852928eea13df9d077b428b.body +0 -0
  22. .cache/pip/http-v2/3/8/6/0/e/3860e4de9ae53c79d2fd61419e9049df314ccc8b640782c02c6e2e2d +0 -0
  23. .cache/pip/http-v2/3/8/6/0/e/3860e4de9ae53c79d2fd61419e9049df314ccc8b640782c02c6e2e2d.body +0 -0
  24. .cache/pip/http-v2/3/8/9/2/7/389270eb64d5d655add63491064e7e833611004a96c2fb8b19caa5fb +0 -0
  25. .cache/pip/http-v2/3/8/9/2/7/389270eb64d5d655add63491064e7e833611004a96c2fb8b19caa5fb.body +321 -0
  26. .cache/pip/http-v2/3/9/5/b/c/395bc73efd302f7d742a8b69a0d15de0af47c6a2b8a5accf08c79c9b +0 -0
  27. .cache/pip/http-v2/3/9/5/b/c/395bc73efd302f7d742a8b69a0d15de0af47c6a2b8a5accf08c79c9b.body +0 -0
  28. .cache/pip/http-v2/3/a/3/0/9/3a3094a7a3e575e1209e7823121d830fa26ecec395f096840b934033 +0 -0
  29. .cache/pip/http-v2/3/a/3/0/9/3a3094a7a3e575e1209e7823121d830fa26ecec395f096840b934033.body +574 -0
  30. .cache/pip/http-v2/3/d/7/c/9/3d7c98da48a1e2c979be55081370491e3fd204bfa81dbfbd046f0829 +0 -0
  31. .cache/pip/http-v2/3/d/7/c/9/3d7c98da48a1e2c979be55081370491e3fd204bfa81dbfbd046f0829.body +1383 -0
  32. .cache/pip/http-v2/4/4/a/d/5/44ad51ab4fe732177892254938ca19df59a19add805fe17b3b22c658 +0 -0
  33. .cache/pip/http-v2/4/4/a/d/5/44ad51ab4fe732177892254938ca19df59a19add805fe17b3b22c658.body +1595 -0
  34. .cache/pip/http-v2/4/a/5/b/6/4a5b6f0d76201de4cfd4884f5e95617a1848cf81c8357be4d12cbf6a +0 -0
  35. .cache/pip/http-v2/4/a/5/b/6/4a5b6f0d76201de4cfd4884f5e95617a1848cf81c8357be4d12cbf6a.body +86 -0
  36. .cache/pip/http-v2/4/d/c/8/d/4dc8d567db4bc55c0684404c85a6b4572f87a99306be24cab65fbfae +0 -0
  37. .cache/pip/http-v2/4/d/c/8/d/4dc8d567db4bc55c0684404c85a6b4572f87a99306be24cab65fbfae.body +0 -0
  38. .cache/pip/http-v2/5/9/1/a/0/591a0a7ea47d81cffb332bf5e1460e560ce743822558c6f345314d4b +0 -0
  39. .cache/pip/http-v2/5/9/1/a/0/591a0a7ea47d81cffb332bf5e1460e560ce743822558c6f345314d4b.body +0 -0
  40. .cache/pip/http-v2/5/b/4/0/d/5b40d68cf8d927e2221e1237399fe71c3f05e873a098ccc481be149a +0 -0
  41. .cache/pip/http-v2/5/b/4/0/d/5b40d68cf8d927e2221e1237399fe71c3f05e873a098ccc481be149a.body +324 -0
  42. .cache/pip/http-v2/6/4/c/f/c/64cfc03e83f9fad4049b1d2a1d785c9273270a4ab9788b538f5054e3 +0 -0
  43. .cache/pip/http-v2/6/5/1/e/5/651e58859e8db8c99b9e7068d03984cfd4577518ff0e021c717afbf4 +0 -0
  44. .cache/pip/http-v2/6/5/1/e/5/651e58859e8db8c99b9e7068d03984cfd4577518ff0e021c717afbf4.body +78 -0
  45. .cache/pip/http-v2/6/6/e/c/7/66ec76a7b6ed4081044f5c7821af293b63c17bc2ac523ff93d5ca7d5 +0 -0
  46. .cache/pip/http-v2/6/8/0/d/4/680d4dd80dc6a3d2df9b9478dfcc8e81e0e4f130e154a3268b98b877 +0 -0
  47. .cache/pip/http-v2/6/b/5/3/a/6b53a9dd0e4fce887cc28c1a921aa1befe8c1a82e6c213d2542d2acb +0 -0
  48. .cache/pip/http-v2/6/b/5/3/a/6b53a9dd0e4fce887cc28c1a921aa1befe8c1a82e6c213d2542d2acb.body +0 -0
  49. .cache/pip/http-v2/6/b/8/1/e/6b81e7b491d69713c085c9f59d6c9162e9c07ca91d4f2bb5b3cd4b8e +0 -0
  50. .cache/pip/http-v2/6/b/8/1/e/6b81e7b491d69713c085c9f59d6c9162e9c07ca91d4f2bb5b3cd4b8e.body +386 -0
.cache/pip/http-v2/0/0/5/2/9/005298b55218fcf8890ee28f2d436edb637e64ca3610c3698f55cc3c ADDED
Binary file (1.19 kB). View file
 
.cache/pip/http-v2/0/0/5/2/9/005298b55218fcf8890ee28f2d436edb637e64ca3610c3698f55cc3c.body ADDED
@@ -0,0 +1,480 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Metadata-Version: 2.4
2
+ Name: rich
3
+ Version: 14.3.4
4
+ Summary: Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal
5
+ License: MIT
6
+ License-File: LICENSE
7
+ Author: Will McGugan
8
+ Author-email: willmcgugan@gmail.com
9
+ Requires-Python: >=3.8.0
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Environment :: Console
12
+ Classifier: Framework :: IPython
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: MacOS
16
+ Classifier: Operating System :: Microsoft :: Windows
17
+ Classifier: Operating System :: POSIX :: Linux
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.8
20
+ Classifier: Programming Language :: Python :: 3.9
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Programming Language :: Python :: 3.13
25
+ Classifier: Programming Language :: Python :: 3.14
26
+ Classifier: Typing :: Typed
27
+ Provides-Extra: jupyter
28
+ Requires-Dist: ipywidgets (>=7.5.1,<9) ; extra == "jupyter"
29
+ Requires-Dist: markdown-it-py (>=2.2.0)
30
+ Requires-Dist: pygments (>=2.13.0,<3.0.0)
31
+ Project-URL: Documentation, https://rich.readthedocs.io/en/latest/
32
+ Project-URL: Homepage, https://github.com/Textualize/rich
33
+ Description-Content-Type: text/markdown
34
+
35
+ [![Supported Python Versions](https://img.shields.io/pypi/pyversions/rich)](https://pypi.org/project/rich/) [![PyPI version](https://badge.fury.io/py/rich.svg)](https://badge.fury.io/py/rich)
36
+
37
+ [![Downloads](https://pepy.tech/badge/rich/month)](https://pepy.tech/project/rich)
38
+ [![codecov](https://img.shields.io/codecov/c/github/Textualize/rich?label=codecov&logo=codecov)](https://codecov.io/gh/Textualize/rich)
39
+ [![Rich blog](https://img.shields.io/badge/blog-rich%20news-yellowgreen)](https://www.willmcgugan.com/tag/rich/)
40
+ [![Twitter Follow](https://img.shields.io/twitter/follow/willmcgugan.svg?style=social)](https://twitter.com/willmcgugan)
41
+
42
+ ![Logo](https://github.com/textualize/rich/raw/master/imgs/logo.svg)
43
+
44
+ [English readme](https://github.com/textualize/rich/blob/master/README.md)
45
+ • [简体中文 readme](https://github.com/textualize/rich/blob/master/README.cn.md)
46
+ • [正體中文 readme](https://github.com/textualize/rich/blob/master/README.zh-tw.md)
47
+ • [Lengua española readme](https://github.com/textualize/rich/blob/master/README.es.md)
48
+ • [Deutsche readme](https://github.com/textualize/rich/blob/master/README.de.md)
49
+ • [Läs på svenska](https://github.com/textualize/rich/blob/master/README.sv.md)
50
+ • [日本語 readme](https://github.com/textualize/rich/blob/master/README.ja.md)
51
+ • [한국어 readme](https://github.com/textualize/rich/blob/master/README.kr.md)
52
+ • [Français readme](https://github.com/textualize/rich/blob/master/README.fr.md)
53
+ • [Schwizerdütsch readme](https://github.com/textualize/rich/blob/master/README.de-ch.md)
54
+ • [हिन्दी readme](https://github.com/textualize/rich/blob/master/README.hi.md)
55
+ • [Português brasileiro readme](https://github.com/textualize/rich/blob/master/README.pt-br.md)
56
+ • [Italian readme](https://github.com/textualize/rich/blob/master/README.it.md)
57
+ • [Русский readme](https://github.com/textualize/rich/blob/master/README.ru.md)
58
+ • [Indonesian readme](https://github.com/textualize/rich/blob/master/README.id.md)
59
+ • [فارسی readme](https://github.com/textualize/rich/blob/master/README.fa.md)
60
+ • [Türkçe readme](https://github.com/textualize/rich/blob/master/README.tr.md)
61
+ • [Polskie readme](https://github.com/textualize/rich/blob/master/README.pl.md)
62
+
63
+
64
+ Rich is a Python library for _rich_ text and beautiful formatting in the terminal.
65
+
66
+ The [Rich API](https://rich.readthedocs.io/en/latest/) makes it easy to add color and style to terminal output. Rich can also render pretty tables, progress bars, markdown, syntax highlighted source code, tracebacks, and more — out of the box.
67
+
68
+ ![Features](https://github.com/textualize/rich/raw/master/imgs/features.png)
69
+
70
+ For a video introduction to Rich see [calmcode.io](https://calmcode.io/rich/introduction.html) by [@fishnets88](https://twitter.com/fishnets88).
71
+
72
+ See what [people are saying about Rich](https://www.willmcgugan.com/blog/pages/post/rich-tweets/).
73
+
74
+ ## Compatibility
75
+
76
+ Rich works with Linux, macOS and Windows. True color / emoji works with new Windows Terminal, classic terminal is limited to 16 colors. Rich requires Python 3.8 or later.
77
+
78
+ Rich works with [Jupyter notebooks](https://jupyter.org/) with no additional configuration required.
79
+
80
+ ## Installing
81
+
82
+ Install with `pip` or your favorite PyPI package manager.
83
+
84
+ ```sh
85
+ python -m pip install rich
86
+ ```
87
+
88
+ Run the following to test Rich output on your terminal:
89
+
90
+ ```sh
91
+ python -m rich
92
+ ```
93
+
94
+ ## Rich Print
95
+
96
+ To effortlessly add rich output to your application, you can import the [rich print](https://rich.readthedocs.io/en/latest/introduction.html#quick-start) method, which has the same signature as the builtin Python function. Try this:
97
+
98
+ ```python
99
+ from rich import print
100
+
101
+ print("Hello, [bold magenta]World[/bold magenta]!", ":vampire:", locals())
102
+ ```
103
+
104
+ ![Hello World](https://github.com/textualize/rich/raw/master/imgs/print.png)
105
+
106
+ ## Rich REPL
107
+
108
+ Rich can be installed in the Python REPL, so that any data structures will be pretty printed and highlighted.
109
+
110
+ ```python
111
+ >>> from rich import pretty
112
+ >>> pretty.install()
113
+ ```
114
+
115
+ ![REPL](https://github.com/textualize/rich/raw/master/imgs/repl.png)
116
+
117
+ ## Using the Console
118
+
119
+ For more control over rich terminal content, import and construct a [Console](https://rich.readthedocs.io/en/latest/reference/console.html#rich.console.Console) object.
120
+
121
+ ```python
122
+ from rich.console import Console
123
+
124
+ console = Console()
125
+ ```
126
+
127
+ The Console object has a `print` method which has an intentionally similar interface to the builtin `print` function. Here's an example of use:
128
+
129
+ ```python
130
+ console.print("Hello", "World!")
131
+ ```
132
+
133
+ As you might expect, this will print `"Hello World!"` to the terminal. Note that unlike the builtin `print` function, Rich will word-wrap your text to fit within the terminal width.
134
+
135
+ There are a few ways of adding color and style to your output. You can set a style for the entire output by adding a `style` keyword argument. Here's an example:
136
+
137
+ ```python
138
+ console.print("Hello", "World!", style="bold red")
139
+ ```
140
+
141
+ The output will be something like the following:
142
+
143
+ ![Hello World](https://github.com/textualize/rich/raw/master/imgs/hello_world.png)
144
+
145
+ That's fine for styling a line of text at a time. For more finely grained styling, Rich renders a special markup which is similar in syntax to [bbcode](https://en.wikipedia.org/wiki/BBCode). Here's an example:
146
+
147
+ ```python
148
+ console.print("Where there is a [bold cyan]Will[/bold cyan] there [u]is[/u] a [i]way[/i].")
149
+ ```
150
+
151
+ ![Console Markup](https://github.com/textualize/rich/raw/master/imgs/where_there_is_a_will.png)
152
+
153
+ You can use a Console object to generate sophisticated output with minimal effort. See the [Console API](https://rich.readthedocs.io/en/latest/console.html) docs for details.
154
+
155
+ ## Rich Inspect
156
+
157
+ Rich has an [inspect](https://rich.readthedocs.io/en/latest/reference/init.html?highlight=inspect#rich.inspect) function which can produce a report on any Python object, such as class, instance, or builtin.
158
+
159
+ ```python
160
+ >>> my_list = ["foo", "bar"]
161
+ >>> from rich import inspect
162
+ >>> inspect(my_list, methods=True)
163
+ ```
164
+
165
+ ![Log](https://github.com/textualize/rich/raw/master/imgs/inspect.png)
166
+
167
+ See the [inspect docs](https://rich.readthedocs.io/en/latest/reference/init.html#rich.inspect) for details.
168
+
169
+ # Rich Library
170
+
171
+ Rich contains a number of builtin _renderables_ you can use to create elegant output in your CLI and help you debug your code.
172
+
173
+ Click the following headings for details:
174
+
175
+ <details>
176
+ <summary>Log</summary>
177
+
178
+ The Console object has a `log()` method which has a similar interface to `print()`, but also renders a column for the current time and the file and line which made the call. By default Rich will do syntax highlighting for Python structures and for repr strings. If you log a collection (i.e. a dict or a list) Rich will pretty print it so that it fits in the available space. Here's an example of some of these features.
179
+
180
+ ```python
181
+ from rich.console import Console
182
+ console = Console()
183
+
184
+ test_data = [
185
+ {"jsonrpc": "2.0", "method": "sum", "params": [None, 1, 2, 4, False, True], "id": "1",},
186
+ {"jsonrpc": "2.0", "method": "notify_hello", "params": [7]},
187
+ {"jsonrpc": "2.0", "method": "subtract", "params": [42, 23], "id": "2"},
188
+ ]
189
+
190
+ def test_log():
191
+ enabled = False
192
+ context = {
193
+ "foo": "bar",
194
+ }
195
+ movies = ["Deadpool", "Rise of the Skywalker"]
196
+ console.log("Hello from", console, "!")
197
+ console.log(test_data, log_locals=True)
198
+
199
+
200
+ test_log()
201
+ ```
202
+
203
+ The above produces the following output:
204
+
205
+ ![Log](https://github.com/textualize/rich/raw/master/imgs/log.png)
206
+
207
+ Note the `log_locals` argument, which outputs a table containing the local variables where the log method was called.
208
+
209
+ The log method could be used for logging to the terminal for long running applications such as servers, but is also a very nice debugging aid.
210
+
211
+ </details>
212
+ <details>
213
+ <summary>Logging Handler</summary>
214
+
215
+ You can also use the builtin [Handler class](https://rich.readthedocs.io/en/latest/logging.html) to format and colorize output from Python's logging module. Here's an example of the output:
216
+
217
+ ![Logging](https://github.com/textualize/rich/raw/master/imgs/logging.png)
218
+
219
+ </details>
220
+
221
+ <details>
222
+ <summary>Emoji</summary>
223
+
224
+ To insert an emoji in to console output place the name between two colons. Here's an example:
225
+
226
+ ```python
227
+ >>> console.print(":smiley: :vampire: :pile_of_poo: :thumbs_up: :raccoon:")
228
+ 😃 🧛 💩 👍 🦝
229
+ ```
230
+
231
+ Please use this feature wisely.
232
+
233
+ </details>
234
+
235
+ <details>
236
+ <summary>Tables</summary>
237
+
238
+ Rich can render flexible [tables](https://rich.readthedocs.io/en/latest/tables.html) with unicode box characters. There is a large variety of formatting options for borders, styles, cell alignment etc.
239
+
240
+ ![table movie](https://github.com/textualize/rich/raw/master/imgs/table_movie.gif)
241
+
242
+ The animation above was generated with [table_movie.py](https://github.com/textualize/rich/blob/master/examples/table_movie.py) in the examples directory.
243
+
244
+ Here's a simpler table example:
245
+
246
+ ```python
247
+ from rich.console import Console
248
+ from rich.table import Table
249
+
250
+ console = Console()
251
+
252
+ table = Table(show_header=True, header_style="bold magenta")
253
+ table.add_column("Date", style="dim", width=12)
254
+ table.add_column("Title")
255
+ table.add_column("Production Budget", justify="right")
256
+ table.add_column("Box Office", justify="right")
257
+ table.add_row(
258
+ "Dec 20, 2019", "Star Wars: The Rise of Skywalker", "$275,000,000", "$375,126,118"
259
+ )
260
+ table.add_row(
261
+ "May 25, 2018",
262
+ "[red]Solo[/red]: A Star Wars Story",
263
+ "$275,000,000",
264
+ "$393,151,347",
265
+ )
266
+ table.add_row(
267
+ "Dec 15, 2017",
268
+ "Star Wars Ep. VIII: The Last Jedi",
269
+ "$262,000,000",
270
+ "[bold]$1,332,539,889[/bold]",
271
+ )
272
+
273
+ console.print(table)
274
+ ```
275
+
276
+ This produces the following output:
277
+
278
+ ![table](https://github.com/textualize/rich/raw/master/imgs/table.png)
279
+
280
+ Note that console markup is rendered in the same way as `print()` and `log()`. In fact, anything that is renderable by Rich may be included in the headers / rows (even other tables).
281
+
282
+ The `Table` class is smart enough to resize columns to fit the available width of the terminal, wrapping text as required. Here's the same example, with the terminal made smaller than the table above:
283
+
284
+ ![table2](https://github.com/textualize/rich/raw/master/imgs/table2.png)
285
+
286
+ </details>
287
+
288
+ <details>
289
+ <summary>Progress Bars</summary>
290
+
291
+ Rich can render multiple flicker-free [progress](https://rich.readthedocs.io/en/latest/progress.html) bars to track long-running tasks.
292
+
293
+ For basic usage, wrap any sequence in the `track` function and iterate over the result. Here's an example:
294
+
295
+ ```python
296
+ from rich.progress import track
297
+
298
+ for step in track(range(100)):
299
+ do_step(step)
300
+ ```
301
+
302
+ It's not much harder to add multiple progress bars. Here's an example taken from the docs:
303
+
304
+ ![progress](https://github.com/textualize/rich/raw/master/imgs/progress.gif)
305
+
306
+ The columns may be configured to show any details you want. Built-in columns include percentage complete, file size, file speed, and time remaining. Here's another example showing a download in progress:
307
+
308
+ ![progress](https://github.com/textualize/rich/raw/master/imgs/downloader.gif)
309
+
310
+ To try this out yourself, see [examples/downloader.py](https://github.com/textualize/rich/blob/master/examples/downloader.py) which can download multiple URLs simultaneously while displaying progress.
311
+
312
+ </details>
313
+
314
+ <details>
315
+ <summary>Status</summary>
316
+
317
+ For situations where it is hard to calculate progress, you can use the [status](https://rich.readthedocs.io/en/latest/reference/console.html#rich.console.Console.status) method which will display a 'spinner' animation and message. The animation won't prevent you from using the console as normal. Here's an example:
318
+
319
+ ```python
320
+ from time import sleep
321
+ from rich.console import Console
322
+
323
+ console = Console()
324
+ tasks = [f"task {n}" for n in range(1, 11)]
325
+
326
+ with console.status("[bold green]Working on tasks...") as status:
327
+ while tasks:
328
+ task = tasks.pop(0)
329
+ sleep(1)
330
+ console.log(f"{task} complete")
331
+ ```
332
+
333
+ This generates the following output in the terminal.
334
+
335
+ ![status](https://github.com/textualize/rich/raw/master/imgs/status.gif)
336
+
337
+ The spinner animations were borrowed from [cli-spinners](https://www.npmjs.com/package/cli-spinners). You can select a spinner by specifying the `spinner` parameter. Run the following command to see the available values:
338
+
339
+ ```
340
+ python -m rich.spinner
341
+ ```
342
+
343
+ The above command generates the following output in the terminal:
344
+
345
+ ![spinners](https://github.com/textualize/rich/raw/master/imgs/spinners.gif)
346
+
347
+ </details>
348
+
349
+ <details>
350
+ <summary>Tree</summary>
351
+
352
+ Rich can render a [tree](https://rich.readthedocs.io/en/latest/tree.html) with guide lines. A tree is ideal for displaying a file structure, or any other hierarchical data.
353
+
354
+ The labels of the tree can be simple text or anything else Rich can render. Run the following for a demonstration:
355
+
356
+ ```
357
+ python -m rich.tree
358
+ ```
359
+
360
+ This generates the following output:
361
+
362
+ ![markdown](https://github.com/textualize/rich/raw/master/imgs/tree.png)
363
+
364
+ See the [tree.py](https://github.com/textualize/rich/blob/master/examples/tree.py) example for a script that displays a tree view of any directory, similar to the linux `tree` command.
365
+
366
+ </details>
367
+
368
+ <details>
369
+ <summary>Columns</summary>
370
+
371
+ Rich can render content in neat [columns](https://rich.readthedocs.io/en/latest/columns.html) with equal or optimal width. Here's a very basic clone of the (MacOS / Linux) `ls` command which displays a directory listing in columns:
372
+
373
+ ```python
374
+ import os
375
+ import sys
376
+
377
+ from rich import print
378
+ from rich.columns import Columns
379
+
380
+ directory = os.listdir(sys.argv[1])
381
+ print(Columns(directory))
382
+ ```
383
+
384
+ The following screenshot is the output from the [columns example](https://github.com/textualize/rich/blob/master/examples/columns.py) which displays data pulled from an API in columns:
385
+
386
+ ![columns](https://github.com/textualize/rich/raw/master/imgs/columns.png)
387
+
388
+ </details>
389
+
390
+ <details>
391
+ <summary>Markdown</summary>
392
+
393
+ Rich can render [markdown](https://rich.readthedocs.io/en/latest/markdown.html) and does a reasonable job of translating the formatting to the terminal.
394
+
395
+ To render markdown import the `Markdown` class and construct it with a string containing markdown code. Then print it to the console. Here's an example:
396
+
397
+ ```python
398
+ from rich.console import Console
399
+ from rich.markdown import Markdown
400
+
401
+ console = Console()
402
+ with open("README.md") as readme:
403
+ markdown = Markdown(readme.read())
404
+ console.print(markdown)
405
+ ```
406
+
407
+ This will produce output something like the following:
408
+
409
+ ![markdown](https://github.com/textualize/rich/raw/master/imgs/markdown.png)
410
+
411
+ </details>
412
+
413
+ <details>
414
+ <summary>Syntax Highlighting</summary>
415
+
416
+ Rich uses the [pygments](https://pygments.org/) library to implement [syntax highlighting](https://rich.readthedocs.io/en/latest/syntax.html). Usage is similar to rendering markdown; construct a `Syntax` object and print it to the console. Here's an example:
417
+
418
+ ```python
419
+ from rich.console import Console
420
+ from rich.syntax import Syntax
421
+
422
+ my_code = '''
423
+ def iter_first_last(values: Iterable[T]) -> Iterable[Tuple[bool, bool, T]]:
424
+ """Iterate and generate a tuple with a flag for first and last value."""
425
+ iter_values = iter(values)
426
+ try:
427
+ previous_value = next(iter_values)
428
+ except StopIteration:
429
+ return
430
+ first = True
431
+ for value in iter_values:
432
+ yield first, False, previous_value
433
+ first = False
434
+ previous_value = value
435
+ yield first, True, previous_value
436
+ '''
437
+ syntax = Syntax(my_code, "python", theme="monokai", line_numbers=True)
438
+ console = Console()
439
+ console.print(syntax)
440
+ ```
441
+
442
+ This will produce the following output:
443
+
444
+ ![syntax](https://github.com/textualize/rich/raw/master/imgs/syntax.png)
445
+
446
+ </details>
447
+
448
+ <details>
449
+ <summary>Tracebacks</summary>
450
+
451
+ Rich can render [beautiful tracebacks](https://rich.readthedocs.io/en/latest/traceback.html) which are easier to read and show more code than standard Python tracebacks. You can set Rich as the default traceback handler so all uncaught exceptions will be rendered by Rich.
452
+
453
+ Here's what it looks like on OSX (similar on Linux):
454
+
455
+ ![traceback](https://github.com/textualize/rich/raw/master/imgs/traceback.png)
456
+
457
+ </details>
458
+
459
+ All Rich renderables make use of the [Console Protocol](https://rich.readthedocs.io/en/latest/protocol.html), which you can also use to implement your own Rich content.
460
+
461
+ # Rich CLI
462
+
463
+
464
+ See also [Rich CLI](https://github.com/textualize/rich-cli) for a command line application powered by Rich. Syntax highlight code, render markdown, display CSVs in tables, and more, directly from the command prompt.
465
+
466
+
467
+ ![Rich CLI](https://raw.githubusercontent.com/Textualize/rich-cli/main/imgs/rich-cli-splash.jpg)
468
+
469
+ # Textual
470
+
471
+ See also Rich's sister project, [Textual](https://github.com/Textualize/textual), which you can use to build sophisticated User Interfaces in the terminal.
472
+
473
+ ![textual-splash](https://github.com/user-attachments/assets/4caeb77e-48c0-4cf7-b14d-c53ded855ffd)
474
+
475
+ # Toad
476
+
477
+ [Toad](https://github.com/batrachianai/toad) is a unified interface for agentic coding. Built with Rich and Textual.
478
+
479
+ ![toad](https://github.com/user-attachments/assets/6678b707-1aeb-420f-99ad-abfcd4356771)
480
+
.cache/pip/http-v2/0/0/e/c/f/00ecff9acd52a20e396217085e31e0ceb29ea4ddf87c72de0df5e74c ADDED
Binary file (1.13 kB). View file
 
.cache/pip/http-v2/0/3/b/7/e/03b7e31ef41a67b4d5d0212d71d27b02703ce649d01a9d3a622a0976 ADDED
Binary file (1.12 kB). View file
 
.cache/pip/http-v2/0/3/b/7/e/03b7e31ef41a67b4d5d0212d71d27b02703ce649d01a9d3a622a0976.body ADDED
Binary file (9.76 kB). View file
 
.cache/pip/http-v2/0/4/4/7/c/0447ce2249fdae0f8cf52a43e01f215eacdf7c35d89a248bd4b4ebaa ADDED
Binary file (1.87 kB). View file
 
.cache/pip/http-v2/0/4/4/7/c/0447ce2249fdae0f8cf52a43e01f215eacdf7c35d89a248bd4b4ebaa.body ADDED
Binary file (20.8 kB). View file
 
.cache/pip/http-v2/0/c/1/9/0/0c1902a50947e5344575b4ef11e0b41b63cc4e3e15eb945e6b0cd91d ADDED
Binary file (1.85 kB). View file
 
.cache/pip/http-v2/0/c/1/9/0/0c1902a50947e5344575b4ef11e0b41b63cc4e3e15eb945e6b0cd91d.body ADDED
Binary file (1.46 kB). View file
 
.cache/pip/http-v2/1/8/e/c/b/18ecb372789efe49bbe46617b1f5d32a2b0eac245d58cbf930116174 ADDED
Binary file (1.16 kB). View file
 
.cache/pip/http-v2/2/3/5/3/9/235392053f2a1040f180b6ba82c549e2c6a0340d4d823ef3a0847ef7 ADDED
Binary file (1.2 kB). View file
 
.cache/pip/http-v2/2/3/5/3/9/235392053f2a1040f180b6ba82c549e2c6a0340d4d823ef3a0847ef7.body ADDED
@@ -0,0 +1,412 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Metadata-Version: 2.4
2
+ Name: typer
3
+ Version: 0.24.1
4
+ Summary: Typer, build great CLIs. Easy to code. Based on Python type hints.
5
+ Author-Email: =?utf-8?q?Sebasti=C3=A1n_Ram=C3=ADrez?= <tiangolo@gmail.com>
6
+ License-Expression: MIT
7
+ License-File: LICENSE
8
+ Classifier: Intended Audience :: Information Technology
9
+ Classifier: Intended Audience :: System Administrators
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python
13
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
14
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
15
+ Classifier: Topic :: Software Development :: Libraries
16
+ Classifier: Topic :: Software Development
17
+ Classifier: Typing :: Typed
18
+ Classifier: Development Status :: 4 - Beta
19
+ Classifier: Intended Audience :: Developers
20
+ Classifier: Programming Language :: Python :: 3 :: Only
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Programming Language :: Python :: 3.13
25
+ Classifier: Programming Language :: Python :: 3.14
26
+ Project-URL: Homepage, https://github.com/fastapi/typer
27
+ Project-URL: Documentation, https://typer.tiangolo.com
28
+ Project-URL: Repository, https://github.com/fastapi/typer
29
+ Project-URL: Issues, https://github.com/fastapi/typer/issues
30
+ Project-URL: Changelog, https://typer.tiangolo.com/release-notes/
31
+ Requires-Python: >=3.10
32
+ Requires-Dist: click>=8.2.1
33
+ Requires-Dist: shellingham>=1.3.0
34
+ Requires-Dist: rich>=12.3.0
35
+ Requires-Dist: annotated-doc>=0.0.2
36
+ Description-Content-Type: text/markdown
37
+
38
+ <p align="center">
39
+ <a href="https://typer.tiangolo.com"><img src="https://typer.tiangolo.com/img/logo-margin/logo-margin-vector.svg#only-light" alt="Typer"></a>
40
+
41
+ </p>
42
+ <p align="center">
43
+ <em>Typer, build great CLIs. Easy to code. Based on Python type hints.</em>
44
+ </p>
45
+ <p align="center">
46
+ <a href="https://github.com/fastapi/typer/actions?query=workflow%3ATest+event%3Apush+branch%3Amaster" target="_blank">
47
+ <img src="https://github.com/fastapi/typer/actions/workflows/test.yml/badge.svg?event=push&branch=master" alt="Test">
48
+ </a>
49
+ <a href="https://github.com/fastapi/typer/actions?query=workflow%3APublish" target="_blank">
50
+ <img src="https://github.com/fastapi/typer/workflows/Publish/badge.svg" alt="Publish">
51
+ </a>
52
+ <a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/typer" target="_blank">
53
+ <img src="https://coverage-badge.samuelcolvin.workers.dev/fastapi/typer.svg" alt="Coverage">
54
+ <a href="https://pypi.org/project/typer" target="_blank">
55
+ <img src="https://img.shields.io/pypi/v/typer?color=%2334D058&label=pypi%20package" alt="Package version">
56
+ </a>
57
+ </p>
58
+
59
+ ---
60
+
61
+ **Documentation**: <a href="https://typer.tiangolo.com" target="_blank">https://typer.tiangolo.com</a>
62
+
63
+ **Source Code**: <a href="https://github.com/fastapi/typer" target="_blank">https://github.com/fastapi/typer</a>
64
+
65
+ ---
66
+
67
+ Typer is a library for building <abbr title="command line interface, programs executed from a terminal">CLI</abbr> applications that users will **love using** and developers will **love creating**. Based on Python type hints.
68
+
69
+ It's also a command line tool to run scripts, automatically converting them to CLI applications.
70
+
71
+ The key features are:
72
+
73
+ * **Intuitive to write**: Great editor support. <abbr title="also known as auto-complete, autocompletion, IntelliSense">Completion</abbr> everywhere. Less time debugging. Designed to be easy to use and learn. Less time reading docs.
74
+ * **Easy to use**: It's easy to use for the final users. Automatic help, and automatic completion for all shells.
75
+ * **Short**: Minimize code duplication. Multiple features from each parameter declaration. Fewer bugs.
76
+ * **Start simple**: The simplest example adds only 2 lines of code to your app: **1 import, 1 function call**.
77
+ * **Grow large**: Grow in complexity as much as you want, create arbitrarily complex trees of commands and groups of subcommands, with options and arguments.
78
+ * **Run scripts**: Typer includes a `typer` command/program that you can use to run scripts, automatically converting them to CLIs, even if they don't use Typer internally.
79
+
80
+ ## 2026 February - Typer developer survey
81
+
82
+ Help us define Typer's future by filling the <a href="https://forms.gle/nYvutPrVkmBQZLas7" class="external-link" target="_blank">Typer developer survey</a>. ✨
83
+
84
+ ## FastAPI of CLIs
85
+
86
+ **Typer** is <a href="https://fastapi.tiangolo.com" class="external-link" target="_blank">FastAPI</a>'s little sibling, it's the FastAPI of CLIs.
87
+
88
+ ## Installation
89
+
90
+ Create and activate a <a href="https://typer.tiangolo.com/virtual-environments/" class="external-link" target="_blank">virtual environment</a> and then install **Typer**:
91
+
92
+ <div class="termy">
93
+
94
+ ```console
95
+ $ pip install typer
96
+ ---> 100%
97
+ Successfully installed typer rich shellingham
98
+ ```
99
+
100
+ </div>
101
+
102
+ ## Example
103
+
104
+ ### The absolute minimum
105
+
106
+ * Create a file `main.py` with:
107
+
108
+ ```Python
109
+ def main(name: str):
110
+ print(f"Hello {name}")
111
+ ```
112
+
113
+ This script doesn't even use Typer internally. But you can use the `typer` command to run it as a CLI application.
114
+
115
+ ### Run it
116
+
117
+ Run your application with the `typer` command:
118
+
119
+ <div class="termy">
120
+
121
+ ```console
122
+ // Run your application
123
+ $ typer main.py run
124
+
125
+ // You get a nice error, you are missing NAME
126
+ Usage: typer [PATH_OR_MODULE] run [OPTIONS] NAME
127
+ Try 'typer [PATH_OR_MODULE] run --help' for help.
128
+ ╭─ Error ───────────────────────────────────────────╮
129
+ │ Missing argument 'NAME'. │
130
+ ╰───────────────────────────────────────────────────╯
131
+
132
+
133
+ // You get a --help for free
134
+ $ typer main.py run --help
135
+
136
+ Usage: typer [PATH_OR_MODULE] run [OPTIONS] NAME
137
+
138
+ Run the provided Typer app.
139
+
140
+ ╭─ Arguments ───────────────────────────────────────╮
141
+ │ * name TEXT [default: None] [required] |
142
+ ╰───────────────────────────────────────────────────╯
143
+ ╭─ Options ─────────────────────────────────────────╮
144
+ │ --help Show this message and exit. │
145
+ ╰───────────────────────────────────────────────────╯
146
+
147
+ // Now pass the NAME argument
148
+ $ typer main.py run Camila
149
+
150
+ Hello Camila
151
+
152
+ // It works! 🎉
153
+ ```
154
+
155
+ </div>
156
+
157
+ This is the simplest use case, not even using Typer internally, but it can already be quite useful for simple scripts.
158
+
159
+ **Note**: auto-completion works when you create a Python package and run it with `--install-completion` or when you use the `typer` command.
160
+
161
+ ## Use Typer in your code
162
+
163
+ Now let's start using Typer in your own code, update `main.py` with:
164
+
165
+ ```Python
166
+ import typer
167
+
168
+
169
+ def main(name: str):
170
+ print(f"Hello {name}")
171
+
172
+
173
+ if __name__ == "__main__":
174
+ typer.run(main)
175
+ ```
176
+
177
+ Now you could run it with Python directly:
178
+
179
+ <div class="termy">
180
+
181
+ ```console
182
+ // Run your application
183
+ $ python main.py
184
+
185
+ // You get a nice error, you are missing NAME
186
+ Usage: main.py [OPTIONS] NAME
187
+ Try 'main.py --help' for help.
188
+ ╭─ Error ───────────────────────────────────────────╮
189
+ │ Missing argument 'NAME'. │
190
+ ╰───────────────────────────────────────────────────╯
191
+
192
+
193
+ // You get a --help for free
194
+ $ python main.py --help
195
+
196
+ Usage: main.py [OPTIONS] NAME
197
+
198
+ ╭─ Arguments ───────────────────────────────────────╮
199
+ │ * name TEXT [default: None] [required] |
200
+ ╰───────────────────────────────────────────────────╯
201
+ ╭─ Options ─────────────────────────────────────────╮
202
+ │ --help Show this message and exit. │
203
+ ╰───────────────────────────────────────────────────╯
204
+
205
+ // Now pass the NAME argument
206
+ $ python main.py Camila
207
+
208
+ Hello Camila
209
+
210
+ // It works! 🎉
211
+ ```
212
+
213
+ </div>
214
+
215
+ **Note**: you can also call this same script with the `typer` command, but you don't need to.
216
+
217
+ ## Example upgrade
218
+
219
+ This was the simplest example possible.
220
+
221
+ Now let's see one a bit more complex.
222
+
223
+ ### An example with two subcommands
224
+
225
+ Modify the file `main.py`.
226
+
227
+ Create a `typer.Typer()` app, and create two subcommands with their parameters.
228
+
229
+ ```Python hl_lines="3 6 11 20"
230
+ import typer
231
+
232
+ app = typer.Typer()
233
+
234
+
235
+ @app.command()
236
+ def hello(name: str):
237
+ print(f"Hello {name}")
238
+
239
+
240
+ @app.command()
241
+ def goodbye(name: str, formal: bool = False):
242
+ if formal:
243
+ print(f"Goodbye Ms. {name}. Have a good day.")
244
+ else:
245
+ print(f"Bye {name}!")
246
+
247
+
248
+ if __name__ == "__main__":
249
+ app()
250
+ ```
251
+
252
+ And that will:
253
+
254
+ * Explicitly create a `typer.Typer` app.
255
+ * The previous `typer.run` actually creates one implicitly for you.
256
+ * Add two subcommands with `@app.command()`.
257
+ * Execute the `app()` itself, as if it was a function (instead of `typer.run`).
258
+
259
+ ### Run the upgraded example
260
+
261
+ Check the new help:
262
+
263
+ <div class="termy">
264
+
265
+ ```console
266
+ $ python main.py --help
267
+
268
+ Usage: main.py [OPTIONS] COMMAND [ARGS]...
269
+
270
+ ╭─ Options ───────────────────────────────��─────────╮
271
+ │ --install-completion Install completion │
272
+ │ for the current │
273
+ │ shell. │
274
+ │ --show-completion Show completion for │
275
+ │ the current shell, │
276
+ │ to copy it or │
277
+ │ customize the │
278
+ │ installation. │
279
+ │ --help Show this message │
280
+ │ and exit. │
281
+ ╰───────────────────────────────────────────────────╯
282
+ ╭─ Commands ────────────────────────────────────────╮
283
+ │ goodbye │
284
+ │ hello │
285
+ ╰───────────────────────────────────────────────────╯
286
+
287
+ // When you create a package you get ✨ auto-completion ✨ for free, installed with --install-completion
288
+
289
+ // You have 2 subcommands (the 2 functions): goodbye and hello
290
+ ```
291
+
292
+ </div>
293
+
294
+ Now check the help for the `hello` command:
295
+
296
+ <div class="termy">
297
+
298
+ ```console
299
+ $ python main.py hello --help
300
+
301
+ Usage: main.py hello [OPTIONS] NAME
302
+
303
+ ╭─ Arguments ───────────────────────────────────────╮
304
+ │ * name TEXT [default: None] [required] │
305
+ ╰───────────────────────────────────────────────────╯
306
+ ╭─ Options ─────────────────────────────────────────╮
307
+ │ --help Show this message and exit. │
308
+ ╰───────────────────────────────────────────────────╯
309
+ ```
310
+
311
+ </div>
312
+
313
+ And now check the help for the `goodbye` command:
314
+
315
+ <div class="termy">
316
+
317
+ ```console
318
+ $ python main.py goodbye --help
319
+
320
+ Usage: main.py goodbye [OPTIONS] NAME
321
+
322
+ ╭─ Arguments ───────────────────────────────────────╮
323
+ │ * name TEXT [default: None] [required] │
324
+ ╰───────────────────────────────────────────────────╯
325
+ ╭─ Options ─────────────────────────────────────────╮
326
+ │ --formal --no-formal [default: no-formal] │
327
+ │ --help Show this message │
328
+ │ and exit. │
329
+ ╰───────────────────────────────────────────────────╯
330
+
331
+ // Automatic --formal and --no-formal for the bool option 🎉
332
+ ```
333
+
334
+ </div>
335
+
336
+ Now you can try out the new command line application:
337
+
338
+ <div class="termy">
339
+
340
+ ```console
341
+ // Use it with the hello command
342
+
343
+ $ python main.py hello Camila
344
+
345
+ Hello Camila
346
+
347
+ // And with the goodbye command
348
+
349
+ $ python main.py goodbye Camila
350
+
351
+ Bye Camila!
352
+
353
+ // And with --formal
354
+
355
+ $ python main.py goodbye --formal Camila
356
+
357
+ Goodbye Ms. Camila. Have a good day.
358
+ ```
359
+
360
+ </div>
361
+
362
+ **Note**: If your app only has one command, by default the command name is **omitted** in usage: `python main.py Camila`. However, when there are multiple commands, you must **explicitly include the command name**: `python main.py hello Camila`. See [One or Multiple Commands](https://typer.tiangolo.com/tutorial/commands/one-or-multiple/) for more details.
363
+
364
+ ### Recap
365
+
366
+ In summary, you declare **once** the types of parameters (*CLI arguments* and *CLI options*) as function parameters.
367
+
368
+ You do that with standard modern Python types.
369
+
370
+ You don't have to learn a new syntax, the methods or classes of a specific library, etc.
371
+
372
+ Just standard **Python**.
373
+
374
+ For example, for an `int`:
375
+
376
+ ```Python
377
+ total: int
378
+ ```
379
+
380
+ or for a `bool` flag:
381
+
382
+ ```Python
383
+ force: bool
384
+ ```
385
+
386
+ And similarly for **files**, **paths**, **enums** (choices), etc. And there are tools to create **groups of subcommands**, add metadata, extra **validation**, etc.
387
+
388
+ **You get**: great editor support, including **completion** and **type checks** everywhere.
389
+
390
+ **Your users get**: automatic **`--help`**, **auto-completion** in their terminal (Bash, Zsh, Fish, PowerShell) when they install your package or when using the `typer` command.
391
+
392
+ For a more complete example including more features, see the <a href="https://typer.tiangolo.com/tutorial/">Tutorial - User Guide</a>.
393
+
394
+ ## Dependencies
395
+
396
+ **Typer** stands on the shoulders of giants. It has three required dependencies:
397
+
398
+ * <a href="https://click.palletsprojects.com/" class="external-link" target="_blank">Click</a>: a popular tool for building CLIs in Python. Typer is based on it.
399
+ * <a href="https://rich.readthedocs.io/en/stable/index.html" class="external-link" target="_blank"><code>rich</code></a>: to show nicely formatted errors automatically.
400
+ * <a href="https://github.com/sarugaku/shellingham" class="external-link" target="_blank"><code>shellingham</code></a>: to automatically detect the current shell when installing completion.
401
+
402
+ ### `typer-slim`
403
+
404
+ There used to be a slimmed-down version of Typer called `typer-slim`, which didn't include the dependencies `rich` and `shellingham`, nor the `typer` command.
405
+
406
+ However, since version 0.22.0, we have stopped supporting this, and `typer-slim` now simply installs (all of) Typer.
407
+
408
+ If you want to disable Rich globally, you can set an environmental variable `TYPER_USE_RICH` to `False` or `0`.
409
+
410
+ ## License
411
+
412
+ This project is licensed under the terms of the MIT license.
.cache/pip/http-v2/2/b/0/a/4/2b0a4fda1a2c912a5a1c5245a8b34b5da87876e311f607befabc98ee ADDED
Binary file (1.16 kB). View file
 
.cache/pip/http-v2/2/b/0/a/4/2b0a4fda1a2c912a5a1c5245a8b34b5da87876e311f607befabc98ee.body ADDED
Binary file (87.3 kB). View file
 
.cache/pip/http-v2/2/d/2/7/4/2d274909802a294101952666e88fb2e3b7731b90c4e0fa9015d5a2c9 ADDED
Binary file (1.24 kB). View file
 
.cache/pip/http-v2/3/4/e/4/e/34e4ed9f6da78ec378e04be04de734c69a68c889dbef86cb0f5f498a ADDED
Binary file (1.87 kB). View file
 
.cache/pip/http-v2/3/4/e/4/e/34e4ed9f6da78ec378e04be04de734c69a68c889dbef86cb0f5f498a.body ADDED
Binary file (20.4 kB). View file
 
.cache/pip/http-v2/3/5/a/0/6/35a0615e0411edd59492c90e8f5cd0a1a0554d6f7d1dec5be2b30560 ADDED
Binary file (1.17 kB). View file
 
.cache/pip/http-v2/3/5/a/0/6/35a0615e0411edd59492c90e8f5cd0a1a0554d6f7d1dec5be2b30560.body ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Metadata-Version: 2.4
2
+ Name: kiwisolver
3
+ Version: 1.5.0
4
+ Summary: A fast implementation of the Cassowary constraint solver
5
+ Author-email: The Nucleic Development Team <sccolbert@gmail.com>
6
+ Maintainer-email: "Matthieu C. Dartiailh" <m.dartiailh@gmail.com>
7
+ License: =========================
8
+ The Kiwi licensing terms
9
+ =========================
10
+ Kiwi is licensed under the terms of the Modified BSD License (also known as
11
+ New or Revised BSD), as follows:
12
+
13
+ Copyright (c) 2013-2026, Nucleic Development Team
14
+
15
+ All rights reserved.
16
+
17
+ Redistribution and use in source and binary forms, with or without
18
+ modification, are permitted provided that the following conditions are met:
19
+
20
+ Redistributions of source code must retain the above copyright notice, this
21
+ list of conditions and the following disclaimer.
22
+
23
+ Redistributions in binary form must reproduce the above copyright notice, this
24
+ list of conditions and the following disclaimer in the documentation and/or
25
+ other materials provided with the distribution.
26
+
27
+ Neither the name of the Nucleic Development Team nor the names of its
28
+ contributors may be used to endorse or promote products derived from this
29
+ software without specific prior written permission.
30
+
31
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
32
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
33
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
34
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
35
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
37
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
38
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
39
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
40
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41
+
42
+ About Kiwi
43
+ ----------
44
+ Chris Colbert began the Kiwi project in December 2013 in an effort to
45
+ create a blisteringly fast UI constraint solver. Chris is still the
46
+ project lead.
47
+
48
+ The Nucleic Development Team is the set of all contributors to the Nucleic
49
+ project and its subprojects.
50
+
51
+ The core team that coordinates development on GitHub can be found here:
52
+ http://github.com/nucleic. The current team consists of:
53
+
54
+ * Chris Colbert
55
+
56
+ Our Copyright Policy
57
+ --------------------
58
+ Nucleic uses a shared copyright model. Each contributor maintains copyright
59
+ over their contributions to Nucleic. But, it is important to note that these
60
+ contributions are typically only changes to the repositories. Thus, the Nucleic
61
+ source code, in its entirety is not the copyright of any single person or
62
+ institution. Instead, it is the collective copyright of the entire Nucleic
63
+ Development Team. If individual contributors want to maintain a record of what
64
+ changes/contributions they have specific copyright on, they should indicate
65
+ their copyright in the commit message of the change, when they commit the
66
+ change to one of the Nucleic repositories.
67
+
68
+ With this in mind, the following banner should be used in any source code file
69
+ to indicate the copyright and license terms:
70
+
71
+ #------------------------------------------------------------------------------
72
+ # Copyright (c) 2013-2026, Nucleic Development Team.
73
+ #
74
+ # Distributed under the terms of the Modified BSD License.
75
+ #
76
+ # The full license is in the file LICENSE, distributed with this software.
77
+ #------------------------------------------------------------------------------
78
+
79
+ Project-URL: homepage, https://github.com/nucleic/kiwi
80
+ Project-URL: documentation, https://kiwisolver.readthedocs.io/en/latest/
81
+ Project-URL: repository, https://github.com/nucleic/kiwi
82
+ Project-URL: changelog, https://github.com/nucleic/kiwi/blob/main/releasenotes.rst
83
+ Classifier: License :: OSI Approved :: BSD License
84
+ Classifier: Programming Language :: Python
85
+ Classifier: Programming Language :: Python :: 3
86
+ Classifier: Programming Language :: Python :: 3.10
87
+ Classifier: Programming Language :: Python :: 3.11
88
+ Classifier: Programming Language :: Python :: 3.12
89
+ Classifier: Programming Language :: Python :: 3.13
90
+ Classifier: Programming Language :: Python :: 3.14
91
+ Classifier: Programming Language :: Python :: Implementation :: CPython
92
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
93
+ Classifier: Programming Language :: Python :: Implementation :: GraalPy
94
+ Requires-Python: >=3.10
95
+ Description-Content-Type: text/x-rst
96
+ License-File: LICENSE
97
+ Dynamic: license-file
.cache/pip/http-v2/3/7/c/5/1/37c518ffee828550acec5a0fd158a5f1d852928eea13df9d077b428b ADDED
Binary file (1.15 kB). View file
 
.cache/pip/http-v2/3/7/c/5/1/37c518ffee828550acec5a0fd158a5f1d852928eea13df9d077b428b.body ADDED
Binary file (78.4 kB). View file
 
.cache/pip/http-v2/3/8/6/0/e/3860e4de9ae53c79d2fd61419e9049df314ccc8b640782c02c6e2e2d ADDED
Binary file (1.85 kB). View file
 
.cache/pip/http-v2/3/8/6/0/e/3860e4de9ae53c79d2fd61419e9049df314ccc8b640782c02c6e2e2d.body ADDED
Binary file (42.1 kB). View file
 
.cache/pip/http-v2/3/8/9/2/7/389270eb64d5d655add63491064e7e833611004a96c2fb8b19caa5fb ADDED
Binary file (1.2 kB). View file
 
.cache/pip/http-v2/3/8/9/2/7/389270eb64d5d655add63491064e7e833611004a96c2fb8b19caa5fb.body ADDED
@@ -0,0 +1,321 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Metadata-Version: 2.4
2
+ Name: colorlog
3
+ Version: 6.10.1
4
+ Summary: Add colours to the output of Python's logging module.
5
+ Home-page: https://github.com/borntyping/python-colorlog
6
+ Author: Sam Clements
7
+ Author-email: sam@borntyping.co.uk
8
+ License: MIT License
9
+ Classifier: Development Status :: 5 - Production/Stable
10
+ Classifier: Environment :: Console
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.6
17
+ Classifier: Programming Language :: Python :: 3.7
18
+ Classifier: Programming Language :: Python :: 3.8
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Topic :: Terminals
25
+ Classifier: Topic :: Utilities
26
+ Requires-Python: >=3.6
27
+ Description-Content-Type: text/markdown
28
+ License-File: LICENSE
29
+ Requires-Dist: colorama; sys_platform == "win32"
30
+ Provides-Extra: development
31
+ Requires-Dist: black; extra == "development"
32
+ Requires-Dist: flake8; extra == "development"
33
+ Requires-Dist: mypy; extra == "development"
34
+ Requires-Dist: pytest; extra == "development"
35
+ Requires-Dist: types-colorama; extra == "development"
36
+ Dynamic: author
37
+ Dynamic: author-email
38
+ Dynamic: classifier
39
+ Dynamic: description
40
+ Dynamic: description-content-type
41
+ Dynamic: home-page
42
+ Dynamic: license
43
+ Dynamic: license-file
44
+ Dynamic: provides-extra
45
+ Dynamic: requires-python
46
+ Dynamic: summary
47
+
48
+ # Log formatting with colors!
49
+
50
+ [![](https://img.shields.io/pypi/v/colorlog.svg)](https://pypi.org/project/colorlog/)
51
+ [![](https://img.shields.io/pypi/l/colorlog.svg)](https://pypi.org/project/colorlog/)
52
+
53
+ Add colours to the output of Python's `logging` module.
54
+
55
+ * [Source on GitHub](https://github.com/borntyping/python-colorlog)
56
+ * [Packages on PyPI](https://pypi.org/pypi/colorlog/)
57
+
58
+ ## Status
59
+
60
+ colorlog currently requires Python 3.6 or higher. Older versions (below 5.x.x)
61
+ support Python 2.6 and above.
62
+
63
+ * colorlog 6.x requires Python 3.6 or higher.
64
+ * colorlog 5.x is an interim version that will warn Python 2 users to downgrade.
65
+ * colorlog 4.x is the final version supporting Python 2.
66
+
67
+ [colorama] is included as a required dependency and initialised when using
68
+ colorlog on Windows.
69
+
70
+ This library is over a decade old and supported a wide set of Python versions
71
+ for most of its life, which has made it a difficult library to add new features
72
+ to. colorlog 6 may break backwards compatibility so that newer features
73
+ can be added more easily, but may still not accept all changes or feature
74
+ requests. colorlog 4 might accept essential bugfixes but should not be
75
+ considered actively maintained and will not accept any major changes or new
76
+ features.
77
+
78
+ ## Installation
79
+
80
+ Install from PyPI with:
81
+
82
+ ```bash
83
+ pip install colorlog
84
+ ```
85
+
86
+ Several Linux distributions provide official packages ([Debian], [Arch], [Fedora],
87
+ [Gentoo], [OpenSuse] and [Ubuntu]), and others have user provided packages
88
+ ([BSD ports], [Conda]).
89
+
90
+ ## Usage
91
+
92
+ ```python
93
+ import colorlog
94
+
95
+ handler = colorlog.StreamHandler()
96
+ handler.setFormatter(colorlog.ColoredFormatter(
97
+ '%(log_color)s%(levelname)s:%(name)s:%(message)s'))
98
+
99
+ logger = colorlog.getLogger('example')
100
+ logger.addHandler(handler)
101
+ ```
102
+
103
+ The `ColoredFormatter` class takes several arguments:
104
+
105
+ - `format`: The format string used to output the message (required).
106
+ - `datefmt`: An optional date format passed to the base class. See [`logging.Formatter`][Formatter].
107
+ - `reset`: Implicitly adds a color reset code to the message output, unless the output already ends with one. Defaults to `True`.
108
+ - `log_colors`: A mapping of record level names to color names. The defaults can be found in `colorlog.default_log_colors`, or the below example.
109
+ - `secondary_log_colors`: A mapping of names to `log_colors` style mappings, defining additional colors that can be used in format strings. See below for an example.
110
+ - `style`: Available on Python 3.2 and above. See [`logging.Formatter`][Formatter].
111
+
112
+ Color escape codes can be selected based on the log records level, by adding
113
+ parameters to the format string:
114
+
115
+ - `log_color`: Return the color associated with the records level.
116
+ - `<name>_log_color`: Return another color based on the records level if the formatter has secondary colors configured (see `secondary_log_colors` below).
117
+
118
+ Multiple escape codes can be used at once by joining them with commas when
119
+ configuring the color for a log level (but can't be used directly in the format
120
+ string). For example, `black,bg_white` would use the escape codes for black
121
+ text on a white background.
122
+
123
+ The following escape codes are made available for use in the format string:
124
+
125
+ - `{color}`, `fg_{color}`, `bg_{color}`: Foreground and background colors.
126
+ - `bold`, `bold_{color}`, `fg_bold_{color}`, `bg_bold_{color}`: Bold/bright colors.
127
+ - `thin`, `thin_{color}`, `fg_thin_{color}`: Thin colors (terminal dependent).
128
+ - `reset`: Clear all formatting (both foreground and background colors).
129
+
130
+ The available color names are:
131
+
132
+ - `black`
133
+ - `red`
134
+ - `green`
135
+ - `yellow`
136
+ - `blue`,
137
+ - `purple`
138
+ - `cyan`
139
+ - `white`
140
+
141
+ You can also use "bright" colors. These aren't standard ANSI codes, and
142
+ support for these varies wildly across different terminals.
143
+
144
+ - `light_black`
145
+ - `light_red`
146
+ - `light_green`
147
+ - `light_yellow`
148
+ - `light_blue`
149
+ - `light_purple`
150
+ - `light_cyan`
151
+ - `light_white`
152
+
153
+ ## Examples
154
+
155
+ ![Example output](docs/example.png)
156
+
157
+ The following code creates a `ColoredFormatter` for use in a logging setup,
158
+ using the default values for each argument.
159
+
160
+ ```python
161
+ from colorlog import ColoredFormatter
162
+
163
+ formatter = ColoredFormatter(
164
+ "%(log_color)s%(levelname)-8s%(reset)s %(blue)s%(message)s",
165
+ datefmt=None,
166
+ reset=True,
167
+ log_colors={
168
+ 'DEBUG': 'cyan',
169
+ 'INFO': 'green',
170
+ 'WARNING': 'yellow',
171
+ 'ERROR': 'red',
172
+ 'CRITICAL': 'red,bg_white',
173
+ },
174
+ secondary_log_colors={},
175
+ style='%'
176
+ )
177
+ ```
178
+
179
+ ### Using `secondary_log_colors`
180
+
181
+ Secondary log colors are a way to have more than one color that is selected
182
+ based on the log level. Each key in `secondary_log_colors` adds an attribute
183
+ that can be used in format strings (`message` becomes `message_log_color`), and
184
+ has a corresponding value that is identical in format to the `log_colors`
185
+ argument.
186
+
187
+ The following example highlights the level name using the default log colors,
188
+ and highlights the message in red for `error` and `critical` level log messages.
189
+
190
+ ```python
191
+ from colorlog import ColoredFormatter
192
+
193
+ formatter = ColoredFormatter(
194
+ "%(log_color)s%(levelname)-8s%(reset)s %(message_log_color)s%(message)s",
195
+ secondary_log_colors={
196
+ 'message': {
197
+ 'ERROR': 'red',
198
+ 'CRITICAL': 'red'
199
+ }
200
+ }
201
+ )
202
+ ```
203
+
204
+ ### With [`dictConfig`][dictConfig]
205
+
206
+ ```python
207
+ logging.config.dictConfig({
208
+ 'formatters': {
209
+ 'colored': {
210
+ '()': 'colorlog.ColoredFormatter',
211
+ 'format': "%(log_color)s%(levelname)-8s%(reset)s %(blue)s%(message)s"
212
+ }
213
+ }
214
+ })
215
+ ```
216
+
217
+ A full example dictionary can be found in `tests/test_colorlog.py`.
218
+
219
+ ### With [`fileConfig`][fileConfig]
220
+
221
+ ```ini
222
+ ...
223
+
224
+ [formatters]
225
+ keys=color
226
+
227
+ [formatter_color]
228
+ class=colorlog.ColoredFormatter
229
+ format=%(log_color)s%(levelname)-8s%(reset)s %(bg_blue)s[%(name)s]%(reset)s %(message)s from fileConfig
230
+ datefmt=%m-%d %H:%M:%S
231
+ ```
232
+
233
+ An instance of ColoredFormatter created with those arguments will then be used
234
+ by any handlers that are configured to use the `color` formatter.
235
+
236
+ A full example configuration can be found in `tests/test_config.ini`.
237
+
238
+ ### With custom log levels
239
+
240
+ ColoredFormatter will work with custom log levels added with
241
+ [`logging.addLevelName`][addLevelName]:
242
+
243
+ ```python
244
+ import logging, colorlog
245
+ TRACE = 5
246
+ logging.addLevelName(TRACE, 'TRACE')
247
+ formatter = colorlog.ColoredFormatter(log_colors={'TRACE': 'yellow'})
248
+ handler = logging.StreamHandler()
249
+ handler.setFormatter(formatter)
250
+ logger = logging.getLogger('example')
251
+ logger.addHandler(handler)
252
+ logger.setLevel('TRACE')
253
+ logger.log(TRACE, 'a message using a custom level')
254
+ ```
255
+
256
+ ## Tests
257
+
258
+ Tests similar to the above examples are found in `tests/test_colorlog.py`.
259
+
260
+ ## Status
261
+
262
+ colorlog is in maintenance mode. I try and ensure bugfixes are published,
263
+ but compatibility a wide set of Python versions makes this a difficult
264
+ codebase to add features to. Any changes that might break backwards
265
+ compatibility for existing users will not be considered.
266
+
267
+ ## Alternatives
268
+
269
+ There are some more modern libraries for improving Python logging you may
270
+ find useful.
271
+
272
+ - [structlog]
273
+ - [jsonlog]
274
+
275
+ ## Projects using colorlog
276
+
277
+ GitHub provides [a list of projects that depend on colorlog][dependents].
278
+
279
+ Some early adopters included [Errbot], [Pythran], and [zenlog].
280
+
281
+ ## Licence
282
+
283
+ Copyright (c) 2012-2025 Sam Clements <sam@borntyping.co.uk>
284
+
285
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
286
+ this software and associated documentation files (the "Software"), to deal in
287
+ the Software without restriction, including without limitation the rights to
288
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
289
+ the Software, and to permit persons to whom the Software is furnished to do so,
290
+ subject to the following conditions:
291
+
292
+ The above copyright notice and this permission notice shall be included in all
293
+ copies or substantial portions of the Software.
294
+
295
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
296
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
297
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
298
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
299
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
300
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
301
+
302
+ [dictConfig]: http://docs.python.org/3/library/logging.config.html#logging.config.dictConfig
303
+ [fileConfig]: http://docs.python.org/3/library/logging.config.html#logging.config.fileConfig
304
+ [addLevelName]: https://docs.python.org/3/library/logging.html#logging.addLevelName
305
+ [Formatter]: http://docs.python.org/3/library/logging.html#logging.Formatter
306
+ [tox]: http://tox.readthedocs.org/
307
+ [Arch]: https://archlinux.org/packages/extra/any/python-colorlog/
308
+ [BSD ports]: https://www.freshports.org/devel/py-colorlog/
309
+ [colorama]: https://pypi.python.org/pypi/colorama
310
+ [Conda]: https://anaconda.org/conda-forge/colorlog
311
+ [Debian]: [https://packages.debian.org/buster/python3-colorlog](https://packages.debian.org/buster/python3-colorlog)
312
+ [Errbot]: http://errbot.io/
313
+ [Fedora]: https://src.fedoraproject.org/rpms/python-colorlog
314
+ [Gentoo]: https://packages.gentoo.org/packages/dev-python/colorlog
315
+ [OpenSuse]: http://rpm.pbone.net/index.php3?stat=3&search=python-colorlog&srodzaj=3
316
+ [Pythran]: https://github.com/serge-sans-paille/pythran
317
+ [Ubuntu]: https://launchpad.net/python-colorlog
318
+ [zenlog]: https://github.com/ManufacturaInd/python-zenlog
319
+ [structlog]: https://www.structlog.org/en/stable/
320
+ [jsonlog]: https://github.com/borntyping/jsonlog
321
+ [dependents]: https://github.com/borntyping/python-colorlog/network/dependents?package_id=UGFja2FnZS01MDk3NDcyMQ%3D%3D
.cache/pip/http-v2/3/9/5/b/c/395bc73efd302f7d742a8b69a0d15de0af47c6a2b8a5accf08c79c9b ADDED
Binary file (1.15 kB). View file
 
.cache/pip/http-v2/3/9/5/b/c/395bc73efd302f7d742a8b69a0d15de0af47c6a2b8a5accf08c79c9b.body ADDED
Binary file (56.1 kB). View file
 
.cache/pip/http-v2/3/a/3/0/9/3a3094a7a3e575e1209e7823121d830fa26ecec395f096840b934033 ADDED
Binary file (1.19 kB). View file
 
.cache/pip/http-v2/3/a/3/0/9/3a3094a7a3e575e1209e7823121d830fa26ecec395f096840b934033.body ADDED
@@ -0,0 +1,574 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Metadata-Version: 2.1
2
+ Name: timm
3
+ Version: 1.0.26
4
+ Summary: PyTorch Image Models
5
+ Keywords: pytorch,image-classification
6
+ Author-Email: Ross Wightman <ross@huggingface.co>
7
+ License: Apache-2.0
8
+ Classifier: Development Status :: 5 - Production/Stable
9
+ Classifier: Intended Audience :: Education
10
+ Classifier: Intended Audience :: Science/Research
11
+ Classifier: License :: OSI Approved :: Apache Software License
12
+ Classifier: Programming Language :: Python :: 3.8
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Topic :: Scientific/Engineering
18
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
19
+ Classifier: Topic :: Software Development
20
+ Classifier: Topic :: Software Development :: Libraries
21
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
+ Project-URL: homepage, https://github.com/huggingface/pytorch-image-models
23
+ Project-URL: documentation, https://huggingface.co/docs/timm/en/index
24
+ Project-URL: repository, https://github.com/huggingface/pytorch-image-models
25
+ Requires-Python: >=3.8
26
+ Requires-Dist: torch
27
+ Requires-Dist: torchvision
28
+ Requires-Dist: pyyaml
29
+ Requires-Dist: huggingface_hub
30
+ Requires-Dist: safetensors
31
+ Description-Content-Type: text/markdown
32
+
33
+ # PyTorch Image Models
34
+ - [What's New](#whats-new)
35
+ - [Introduction](#introduction)
36
+ - [Models](#models)
37
+ - [Features](#features)
38
+ - [Results](#results)
39
+ - [Getting Started (Documentation)](#getting-started-documentation)
40
+ - [Train, Validation, Inference Scripts](#train-validation-inference-scripts)
41
+ - [Awesome PyTorch Resources](#awesome-pytorch-resources)
42
+ - [Licenses](#licenses)
43
+ - [Citing](#citing)
44
+
45
+ ## What's New
46
+
47
+ ## March 23, 2026
48
+ * Improve pickle checkpoint handling security. Default all loading to `weights_only=True`, add safe_global for ArgParse.
49
+ * Improve attention mask handling for core ViT/EVA models & layers. Resolve bool masks, pass `is_causal` through for SSL tasks.
50
+ * Fix class & register token uses with ViT and no pos embed enabled.
51
+ * Add Patch Representation Refinement (PRR) as a pooling option in ViT. Thanks Sina (https://github.com/sinahmr).
52
+ * Improve consistency of output projection / MLP dimensions for attention pooling layers.
53
+ * Hiera model F.SDPA optimization to allow Flash Attention kernel use.
54
+ * Caution added to SGDP optimizer.
55
+ * Release 1.0.26. First maintenance release since my departure from Hugging Face.
56
+
57
+ ## Feb 23, 2026
58
+ * Add token distillation training support to distillation task wrappers
59
+ * Remove some torch.jit usage in prep for official deprecation
60
+ * Caution added to AdamP optimizer
61
+ * Call reset_parameters() even if meta-device init so that buffers get init w/ hacks like init_empty_weights
62
+ * Tweak Muon optimizer to work with DTensor/FSDP2 (clamp_ instead of clamp_min_, alternate NS branch for DTensor)
63
+ * Release 1.0.25
64
+
65
+ ## Jan 21, 2026
66
+ * **Compat Break**: Fix oversight w/ QKV vs MLP bias in `ParallelScalingBlock` (& `DiffParallelScalingBlock`)
67
+ * Does not impact any trained `timm` models but could impact downstream use.
68
+
69
+ ## Jan 5 & 6, 2026
70
+ * Release 1.0.24
71
+ * Add new benchmark result csv files for inference timing on all models w/ RTX Pro 6000, 5090, and 4090 cards w/ PyTorch 2.9.1
72
+ * Fix moved module error in deprecated timm.models.layers import path that impacts legacy imports
73
+ * Release 1.0.23
74
+
75
+ ## Dec 30, 2025
76
+ * Add better NAdaMuon trained `dpwee`, `dwee`, `dlittle` (differential) ViTs with a small boost over previous runs
77
+ * https://huggingface.co/timm/vit_dlittle_patch16_reg1_gap_256.sbb_nadamuon_in1k (83.24% top-1)
78
+ * https://huggingface.co/timm/vit_dwee_patch16_reg1_gap_256.sbb_nadamuon_in1k (81.80% top-1)
79
+ * https://huggingface.co/timm/vit_dpwee_patch16_reg1_gap_256.sbb_nadamuon_in1k (81.67% top-1)
80
+ * Add a ~21M param `timm` variant of the CSATv2 model at 512x512 & 640x640
81
+ * https://huggingface.co/timm/csatv2_21m.sw_r640_in1k (83.13% top-1)
82
+ * https://huggingface.co/timm/csatv2_21m.sw_r512_in1k (82.58% top-1)
83
+ * Factor non-persistent param init out of `__init__` into a common method that can be externally called via `init_non_persistent_buffers()` after meta-device init.
84
+
85
+ ## Dec 12, 2025
86
+ * Add CSATV2 model (thanks https://github.com/gusdlf93) -- a lightweight but high res model with DCT stem & spatial attention. https://huggingface.co/Hyunil/CSATv2
87
+ * Add AdaMuon and NAdaMuon optimizer support to existing `timm` Muon impl. Appears more competitive vs AdamW with familiar hparams for image tasks.
88
+ * End of year PR cleanup, merge aspects of several long open PR
89
+ * Merge differential attention (`DiffAttention`), add corresponding `DiffParallelScalingBlock` (for ViT), train some wee vits
90
+ * https://huggingface.co/timm/vit_dwee_patch16_reg1_gap_256.sbb_in1k
91
+ * https://huggingface.co/timm/vit_dpwee_patch16_reg1_gap_256.sbb_in1k
92
+ * Add a few pooling modules, `LsePlus` and `SimPool`
93
+ * Cleanup, optimize `DropBlock2d` (also add support to ByobNet based models)
94
+ * Bump unit tests to PyTorch 2.9.1 + Python 3.13 on upper end, lower still PyTorch 1.13 + Python 3.10
95
+
96
+ ## Dec 1, 2025
97
+ * Add lightweight task abstraction, add logits and feature distillation support to train script via new tasks.
98
+ * Remove old APEX AMP support
99
+
100
+ ## Nov 4, 2025
101
+ * Fix LayerScale / LayerScale2d init bug (init values ignored), introduced in 1.0.21. Thanks https://github.com/Ilya-Fradlin
102
+ * Release 1.0.22
103
+
104
+ ## Oct 31, 2025 🎃
105
+ * Update imagenet & OOD variant result csv files to include a few new models and verify correctness over several torch & timm versions
106
+ * EfficientNet-X and EfficientNet-H B5 model weights added as part of a hparam search for AdamW vs Muon (still iterating on Muon runs)
107
+
108
+ ## Oct 16-20, 2025
109
+ * Add an impl of the Muon optimizer (based on https://github.com/KellerJordan/Muon) with customizations
110
+ * extra flexibility and improved handling for conv weights and fallbacks for weight shapes not suited for orthogonalization
111
+ * small speedup for NS iterations by reducing allocs and using fused (b)add(b)mm ops
112
+ * by default uses AdamW (or NAdamW if `nesterov=True`) updates if muon not suitable for parameter shape (or excluded via param group flag)
113
+ * like torch impl, select from several LR scale adjustment fns via `adjust_lr_fn`
114
+ * select from several NS coefficient presets or specify your own via `ns_coefficients`
115
+ * First 2 steps of 'meta' device model initialization supported
116
+ * Fix several ops that were breaking creation under 'meta' device context
117
+ * Add device & dtype factory kwarg support to all models and modules (anything inherting from nn.Module) in `timm`
118
+ * License fields added to pretrained cfgs in code
119
+ * Release 1.0.21
120
+
121
+ ## Sept 21, 2025
122
+ * Remap DINOv3 ViT weight tags from `lvd_1689m` -> `lvd1689m` to match (same for `sat_493m` -> `sat493m`)
123
+ * Release 1.0.20
124
+
125
+ ## Sept 17, 2025
126
+ * DINOv3 (https://arxiv.org/abs/2508.10104) ConvNeXt and ViT models added. ConvNeXt models were mapped to existing `timm` model. ViT support done via the EVA base model w/ a new `RotaryEmbeddingDinoV3` to match the DINOv3 specific RoPE impl
127
+ * HuggingFace Hub: https://huggingface.co/collections/timm/timm-dinov3-68cb08bb0bee365973d52a4d
128
+ * MobileCLIP-2 (https://arxiv.org/abs/2508.20691) vision encoders. New MCI3/MCI4 FastViT variants added and weights mapped to existing FastViT and B, L/14 ViTs.
129
+ * MetaCLIP-2 Worldwide (https://arxiv.org/abs/2507.22062) ViT encoder weights added.
130
+ * SigLIP-2 (https://arxiv.org/abs/2502.14786) NaFlex ViT encoder weights added via timm NaFlexViT model.
131
+ * Misc fixes and contributions
132
+
133
+ ## July 23, 2025
134
+ * Add `set_input_size()` method to EVA models, used by OpenCLIP 3.0.0 to allow resizing for timm based encoder models.
135
+ * Release 1.0.18, needed for PE-Core S & T models in OpenCLIP 3.0.0
136
+ * Fix small typing issue that broke Python 3.9 compat. 1.0.19 patch release.
137
+
138
+ ## July 21, 2025
139
+ * ROPE support added to NaFlexViT. All models covered by the EVA base (`eva.py`) including EVA, EVA02, Meta PE ViT, `timm` SBB ViT w/ ROPE, and Naver ROPE-ViT can be now loaded in NaFlexViT when `use_naflex=True` passed at model creation time
140
+ * More Meta PE ViT encoders added, including small/tiny variants, lang variants w/ tiling, and more spatial variants.
141
+ * PatchDropout fixed with NaFlexViT and also w/ EVA models (regression after adding Naver ROPE-ViT)
142
+ * Fix XY order with grid_indexing='xy', impacted non-square image use in 'xy' mode (only ROPE-ViT and PE impacted).
143
+
144
+ ## July 7, 2025
145
+ * MobileNet-v5 backbone tweaks for improved Google Gemma 3n behaviour (to pair with updated official weights)
146
+ * Add stem bias (zero'd in updated weights, compat break with old weights)
147
+ * GELU -> GELU (tanh approx). A minor change to be closer to JAX
148
+ * Add two arguments to layer-decay support, a min scale clamp and 'no optimization' scale threshold
149
+ * Add 'Fp32' LayerNorm, RMSNorm, SimpleNorm variants that can be enabled to force computation of norm in float32
150
+ * Some typing, argument cleanup for norm, norm+act layers done with above
151
+ * Support Naver ROPE-ViT (https://github.com/naver-ai/rope-vit) in `eva.py`, add RotaryEmbeddingMixed module for mixed mode, weights on HuggingFace Hub
152
+
153
+ |model |img_size|top1 |top5 |param_count|
154
+ |--------------------------------------------------|--------|------|------|-----------|
155
+ |vit_large_patch16_rope_mixed_ape_224.naver_in1k |224 |84.84 |97.122|304.4 |
156
+ |vit_large_patch16_rope_mixed_224.naver_in1k |224 |84.828|97.116|304.2 |
157
+ |vit_large_patch16_rope_ape_224.naver_in1k |224 |84.65 |97.154|304.37 |
158
+ |vit_large_patch16_rope_224.naver_in1k |224 |84.648|97.122|304.17 |
159
+ |vit_base_patch16_rope_mixed_ape_224.naver_in1k |224 |83.894|96.754|86.59 |
160
+ |vit_base_patch16_rope_mixed_224.naver_in1k |224 |83.804|96.712|86.44 |
161
+ |vit_base_patch16_rope_ape_224.naver_in1k |224 |83.782|96.61 |86.59 |
162
+ |vit_base_patch16_rope_224.naver_in1k |224 |83.718|96.672|86.43 |
163
+ |vit_small_patch16_rope_224.naver_in1k |224 |81.23 |95.022|21.98 |
164
+ |vit_small_patch16_rope_mixed_224.naver_in1k |224 |81.216|95.022|21.99 |
165
+ |vit_small_patch16_rope_ape_224.naver_in1k |224 |81.004|95.016|22.06 |
166
+ |vit_small_patch16_rope_mixed_ape_224.naver_in1k |224 |80.986|94.976|22.06 |
167
+ * Some cleanup of ROPE modules, helpers, and FX tracing leaf registration
168
+ * Preparing version 1.0.17 release
169
+
170
+ ## June 26, 2025
171
+ * MobileNetV5 backbone (w/ encoder only variant) for [Gemma 3n](https://ai.google.dev/gemma/docs/gemma-3n#parameters) image encoder
172
+ * Version 1.0.16 released
173
+
174
+ ## June 23, 2025
175
+ * Add F.grid_sample based 2D and factorized pos embed resize to NaFlexViT. Faster when lots of different sizes (based on example by https://github.com/stas-sl).
176
+ * Further speed up patch embed resample by replacing vmap with matmul (based on snippet by https://github.com/stas-sl).
177
+ * Add 3 initial native aspect NaFlexViT checkpoints created while testing, ImageNet-1k and 3 different pos embed configs w/ same hparams.
178
+
179
+ | Model | Top-1 Acc | Top-5 Acc | Params (M) | Eval Seq Len |
180
+ |:---|:---:|:---:|:---:|:---:|
181
+ | [naflexvit_base_patch16_par_gap.e300_s576_in1k](https://hf.co/timm/naflexvit_base_patch16_par_gap.e300_s576_in1k) | 83.67 | 96.45 | 86.63 | 576 |
182
+ | [naflexvit_base_patch16_parfac_gap.e300_s576_in1k](https://hf.co/timm/naflexvit_base_patch16_parfac_gap.e300_s576_in1k) | 83.63 | 96.41 | 86.46 | 576 |
183
+ | [naflexvit_base_patch16_gap.e300_s576_in1k](https://hf.co/timm/naflexvit_base_patch16_gap.e300_s576_in1k) | 83.50 | 96.46 | 86.63 | 576 |
184
+ * Support gradient checkpointing for `forward_intermediates` and fix some checkpointing bugs. Thanks https://github.com/brianhou0208
185
+ * Add 'corrected weight decay' (https://arxiv.org/abs/2506.02285) as option to AdamW (legacy), Adopt, Kron, Adafactor (BV), Lamb, LaProp, Lion, NadamW, RmsPropTF, SGDW optimizers
186
+ * Switch PE (perception encoder) ViT models to use native timm weights instead of remapping on the fly
187
+ * Fix cuda stream bug in prefetch loader
188
+
189
+ ## June 5, 2025
190
+ * Initial NaFlexVit model code. NaFlexVit is a Vision Transformer with:
191
+ 1. Encapsulated embedding and position encoding in a single module
192
+ 2. Support for nn.Linear patch embedding on pre-patchified (dictionary) inputs
193
+ 3. Support for NaFlex variable aspect, variable resolution (SigLip-2: https://arxiv.org/abs/2502.14786)
194
+ 4. Support for FlexiViT variable patch size (https://arxiv.org/abs/2212.08013)
195
+ 5. Support for NaViT fractional/factorized position embedding (https://arxiv.org/abs/2307.06304)
196
+ * Existing vit models in `vision_transformer.py` can be loaded into the NaFlexVit model by adding the `use_naflex=True` flag to `create_model`
197
+ * Some native weights coming soon
198
+ * A full NaFlex data pipeline is available that allows training / fine-tuning / evaluating with variable aspect / size images
199
+ * To enable in `train.py` and `validate.py` add the `--naflex-loader` arg, must be used with a NaFlexVit
200
+ * To evaluate an existing (classic) ViT loaded in NaFlexVit model w/ NaFlex data pipe:
201
+ * `python validate.py /imagenet --amp -j 8 --model vit_base_patch16_224 --model-kwargs use_naflex=True --naflex-loader --naflex-max-seq-len 256`
202
+ * The training has some extra args features worth noting
203
+ * The `--naflex-train-seq-lens'` argument specifies which sequence lengths to randomly pick from per batch during training
204
+ * The `--naflex-max-seq-len` argument sets the target sequence length for validation
205
+ * Adding `--model-kwargs enable_patch_interpolator=True --naflex-patch-sizes 12 16 24` will enable random patch size selection per-batch w/ interpolation
206
+ * The `--naflex-loss-scale` arg changes loss scaling mode per batch relative to the batch size, `timm` NaFlex loading changes the batch size for each seq len
207
+
208
+ ## May 28, 2025
209
+ * Add a number of small/fast models thanks to https://github.com/brianhou0208
210
+ * SwiftFormer - [(ICCV2023) SwiftFormer: Efficient Additive Attention for Transformer-based Real-time Mobile Vision Applications](https://github.com/Amshaker/SwiftFormer)
211
+ * FasterNet - [(CVPR2023) Run, Don’t Walk: Chasing Higher FLOPS for Faster Neural Networks](https://github.com/JierunChen/FasterNet)
212
+ * SHViT - [(CVPR2024) SHViT: Single-Head Vision Transformer with Memory Efficient](https://github.com/ysj9909/SHViT)
213
+ * StarNet - [(CVPR2024) Rewrite the Stars](https://github.com/ma-xu/Rewrite-the-Stars)
214
+ * GhostNet-V3 [GhostNetV3: Exploring the Training Strategies for Compact Models](https://github.com/huawei-noah/Efficient-AI-Backbones/tree/master/ghostnetv3_pytorch)
215
+ * Update EVA ViT (closest match) to support Perception Encoder models (https://arxiv.org/abs/2504.13181) from Meta, loading Hub weights but I still need to push dedicated `timm` weights
216
+ * Add some flexibility to ROPE impl
217
+ * Big increase in number of models supporting `forward_intermediates()` and some additional fixes thanks to https://github.com/brianhou0208
218
+ * DaViT, EdgeNeXt, EfficientFormerV2, EfficientViT(MIT), EfficientViT(MSRA), FocalNet, GCViT, HGNet /V2, InceptionNeXt, Inception-V4, MambaOut, MetaFormer, NesT, Next-ViT, PiT, PVT V2, RepGhostNet, RepViT, ResNetV2, ReXNet, TinyViT, TResNet, VoV
219
+ * TNT model updated w/ new weights `forward_intermediates()` thanks to https://github.com/brianhou0208
220
+ * Add `local-dir:` pretrained schema, can use `local-dir:/path/to/model/folder` for model name to source model / pretrained cfg & weights Hugging Face Hub models (config.json + weights file) from a local folder.
221
+ * Fixes, improvements for onnx export
222
+
223
+ ## Feb 21, 2025
224
+ * SigLIP 2 ViT image encoders added (https://huggingface.co/collections/timm/siglip-2-67b8e72ba08b09dd97aecaf9)
225
+ * Variable resolution / aspect NaFlex versions are a WIP
226
+ * Add 'SO150M2' ViT weights trained with SBB recipes, great results, better for ImageNet than previous attempt w/ less training.
227
+ * `vit_so150m2_patch16_reg1_gap_448.sbb_e200_in12k_ft_in1k` - 88.1% top-1
228
+ * `vit_so150m2_patch16_reg1_gap_384.sbb_e200_in12k_ft_in1k` - 87.9% top-1
229
+ * `vit_so150m2_patch16_reg1_gap_256.sbb_e200_in12k_ft_in1k` - 87.3% top-1
230
+ * `vit_so150m2_patch16_reg4_gap_256.sbb_e200_in12k`
231
+ * Updated InternViT-300M '2.5' weights
232
+ * Release 1.0.15
233
+
234
+ ## Feb 1, 2025
235
+ * FYI PyTorch 2.6 & Python 3.13 are tested and working w/ current main and released version of `timm`
236
+
237
+ ## Jan 27, 2025
238
+ * Add Kron Optimizer (PSGD w/ Kronecker-factored preconditioner)
239
+ * Code from https://github.com/evanatyourservice/kron_torch
240
+ * See also https://sites.google.com/site/lixilinx/home/psgd
241
+
242
+ ## Jan 19, 2025
243
+ * Fix loading of LeViT safetensor weights, remove conversion code which should have been deactivated
244
+ * Add 'SO150M' ViT weights trained with SBB recipes, decent results, but not optimal shape for ImageNet-12k/1k pretrain/ft
245
+ * `vit_so150m_patch16_reg4_gap_256.sbb_e250_in12k_ft_in1k` - 86.7% top-1
246
+ * `vit_so150m_patch16_reg4_gap_384.sbb_e250_in12k_ft_in1k` - 87.4% top-1
247
+ * `vit_so150m_patch16_reg4_gap_256.sbb_e250_in12k`
248
+ * Misc typing, typo, etc. cleanup
249
+ * 1.0.14 release to get above LeViT fix out
250
+
251
+ ## Jan 9, 2025
252
+ * Add support to train and validate in pure `bfloat16` or `float16`
253
+ * `wandb` project name arg added by https://github.com/caojiaolong, use arg.experiment for name
254
+ * Fix old issue w/ checkpoint saving not working on filesystem w/o hard-link support (e.g. FUSE fs mounts)
255
+ * 1.0.13 release
256
+
257
+ ## Jan 6, 2025
258
+ * Add `torch.utils.checkpoint.checkpoint()` wrapper in `timm.models` that defaults `use_reentrant=False`, unless `TIMM_REENTRANT_CKPT=1` is set in env.
259
+
260
+ ## Dec 31, 2024
261
+ * `convnext_nano` 384x384 ImageNet-12k pretrain & fine-tune. https://huggingface.co/models?search=convnext_nano%20r384
262
+ * Add AIM-v2 encoders from https://github.com/apple/ml-aim, see on Hub: https://huggingface.co/models?search=timm%20aimv2
263
+ * Add PaliGemma2 encoders from https://github.com/google-research/big_vision to existing PaliGemma, see on Hub: https://huggingface.co/models?search=timm%20pali2
264
+ * Add missing L/14 DFN2B 39B CLIP ViT, `vit_large_patch14_clip_224.dfn2b_s39b`
265
+ * Fix existing `RmsNorm` layer & fn to match standard formulation, use PT 2.5 impl when possible. Move old impl to `SimpleNorm` layer, it's LN w/o centering or bias. There were only two `timm` models using it, and they have been updated.
266
+ * Allow override of `cache_dir` arg for model creation
267
+ * Pass through `trust_remote_code` for HF datasets wrapper
268
+ * `inception_next_atto` model added by creator
269
+ * Adan optimizer caution, and Lamb decoupled weight decay options
270
+ * Some feature_info metadata fixed by https://github.com/brianhou0208
271
+ * All OpenCLIP and JAX (CLIP, SigLIP, Pali, etc) model weights that used load time remapping were given their own HF Hub instances so that they work with `hf-hub:` based loading, and thus will work with new Transformers `TimmWrapperModel`
272
+
273
+ ## Introduction
274
+
275
+ Py**T**orch **Im**age **M**odels (`timm`) is a collection of image models, layers, utilities, optimizers, schedulers, data-loaders / augmentations, and reference training / validation scripts that aim to pull together a wide variety of SOTA models with ability to reproduce ImageNet training results.
276
+
277
+ The work of many others is present here. I've tried to make sure all source material is acknowledged via links to github, arxiv papers, etc in the README, documentation, and code docstrings. Please let me know if I missed anything.
278
+
279
+ ## Features
280
+
281
+ ### Models
282
+
283
+ All model architecture families include variants with pretrained weights. There are specific model variants without any weights, it is NOT a bug. Help training new or better weights is always appreciated.
284
+
285
+ * Aggregating Nested Transformers - https://arxiv.org/abs/2105.12723
286
+ * BEiT - https://arxiv.org/abs/2106.08254
287
+ * BEiT-V2 - https://arxiv.org/abs/2208.06366
288
+ * BEiT3 - https://arxiv.org/abs/2208.10442
289
+ * Big Transfer ResNetV2 (BiT) - https://arxiv.org/abs/1912.11370
290
+ * Bottleneck Transformers - https://arxiv.org/abs/2101.11605
291
+ * CaiT (Class-Attention in Image Transformers) - https://arxiv.org/abs/2103.17239
292
+ * CoaT (Co-Scale Conv-Attentional Image Transformers) - https://arxiv.org/abs/2104.06399
293
+ * CoAtNet (Convolution and Attention) - https://arxiv.org/abs/2106.04803
294
+ * ConvNeXt - https://arxiv.org/abs/2201.03545
295
+ * ConvNeXt-V2 - http://arxiv.org/abs/2301.00808
296
+ * ConViT (Soft Convolutional Inductive Biases Vision Transformers)- https://arxiv.org/abs/2103.10697
297
+ * CspNet (Cross-Stage Partial Networks) - https://arxiv.org/abs/1911.11929
298
+ * DeiT - https://arxiv.org/abs/2012.12877
299
+ * DeiT-III - https://arxiv.org/pdf/2204.07118.pdf
300
+ * DenseNet - https://arxiv.org/abs/1608.06993
301
+ * DLA - https://arxiv.org/abs/1707.06484
302
+ * DPN (Dual-Path Network) - https://arxiv.org/abs/1707.01629
303
+ * EdgeNeXt - https://arxiv.org/abs/2206.10589
304
+ * EfficientFormer - https://arxiv.org/abs/2206.01191
305
+ * EfficientFormer-V2 - https://arxiv.org/abs/2212.08059
306
+ * EfficientNet (MBConvNet Family)
307
+ * EfficientNet NoisyStudent (B0-B7, L2) - https://arxiv.org/abs/1911.04252
308
+ * EfficientNet AdvProp (B0-B8) - https://arxiv.org/abs/1911.09665
309
+ * EfficientNet (B0-B7) - https://arxiv.org/abs/1905.11946
310
+ * EfficientNet-EdgeTPU (S, M, L) - https://ai.googleblog.com/2019/08/efficientnet-edgetpu-creating.html
311
+ * EfficientNet V2 - https://arxiv.org/abs/2104.00298
312
+ * FBNet-C - https://arxiv.org/abs/1812.03443
313
+ * MixNet - https://arxiv.org/abs/1907.09595
314
+ * MNASNet B1, A1 (Squeeze-Excite), and Small - https://arxiv.org/abs/1807.11626
315
+ * MobileNet-V2 - https://arxiv.org/abs/1801.04381
316
+ * Single-Path NAS - https://arxiv.org/abs/1904.02877
317
+ * TinyNet - https://arxiv.org/abs/2010.14819
318
+ * EfficientViT (MIT) - https://arxiv.org/abs/2205.14756
319
+ * EfficientViT (MSRA) - https://arxiv.org/abs/2305.07027
320
+ * EVA - https://arxiv.org/abs/2211.07636
321
+ * EVA-02 - https://arxiv.org/abs/2303.11331
322
+ * FasterNet - https://arxiv.org/abs/2303.03667
323
+ * FastViT - https://arxiv.org/abs/2303.14189
324
+ * FlexiViT - https://arxiv.org/abs/2212.08013
325
+ * FocalNet (Focal Modulation Networks) - https://arxiv.org/abs/2203.11926
326
+ * GCViT (Global Context Vision Transformer) - https://arxiv.org/abs/2206.09959
327
+ * GhostNet - https://arxiv.org/abs/1911.11907
328
+ * GhostNet-V2 - https://arxiv.org/abs/2211.12905
329
+ * GhostNet-V3 - https://arxiv.org/abs/2404.11202
330
+ * gMLP - https://arxiv.org/abs/2105.08050
331
+ * GPU-Efficient Networks - https://arxiv.org/abs/2006.14090
332
+ * Halo Nets - https://arxiv.org/abs/2103.12731
333
+ * HGNet / HGNet-V2 - TBD
334
+ * HRNet - https://arxiv.org/abs/1908.07919
335
+ * InceptionNeXt - https://arxiv.org/abs/2303.16900
336
+ * Inception-V3 - https://arxiv.org/abs/1512.00567
337
+ * Inception-ResNet-V2 and Inception-V4 - https://arxiv.org/abs/1602.07261
338
+ * Lambda Networks - https://arxiv.org/abs/2102.08602
339
+ * LeViT (Vision Transformer in ConvNet's Clothing) - https://arxiv.org/abs/2104.01136
340
+ * MambaOut - https://arxiv.org/abs/2405.07992
341
+ * MaxViT (Multi-Axis Vision Transformer) - https://arxiv.org/abs/2204.01697
342
+ * MetaFormer (PoolFormer-v2, ConvFormer, CAFormer) - https://arxiv.org/abs/2210.13452
343
+ * MLP-Mixer - https://arxiv.org/abs/2105.01601
344
+ * MobileCLIP - https://arxiv.org/abs/2311.17049
345
+ * MobileNet-V3 (MBConvNet w/ Efficient Head) - https://arxiv.org/abs/1905.02244
346
+ * FBNet-V3 - https://arxiv.org/abs/2006.02049
347
+ * HardCoRe-NAS - https://arxiv.org/abs/2102.11646
348
+ * LCNet - https://arxiv.org/abs/2109.15099
349
+ * MobileNetV4 - https://arxiv.org/abs/2404.10518
350
+ * MobileOne - https://arxiv.org/abs/2206.04040
351
+ * MobileViT - https://arxiv.org/abs/2110.02178
352
+ * MobileViT-V2 - https://arxiv.org/abs/2206.02680
353
+ * MViT-V2 (Improved Multiscale Vision Transformer) - https://arxiv.org/abs/2112.01526
354
+ * NASNet-A - https://arxiv.org/abs/1707.07012
355
+ * NesT - https://arxiv.org/abs/2105.12723
356
+ * Next-ViT - https://arxiv.org/abs/2207.05501
357
+ * NFNet-F - https://arxiv.org/abs/2102.06171
358
+ * NF-RegNet / NF-ResNet - https://arxiv.org/abs/2101.08692
359
+ * PE (Perception Encoder) - https://arxiv.org/abs/2504.13181
360
+ * PNasNet - https://arxiv.org/abs/1712.00559
361
+ * PoolFormer (MetaFormer) - https://arxiv.org/abs/2111.11418
362
+ * Pooling-based Vision Transformer (PiT) - https://arxiv.org/abs/2103.16302
363
+ * PVT-V2 (Improved Pyramid Vision Transformer) - https://arxiv.org/abs/2106.13797
364
+ * RDNet (DenseNets Reloaded) - https://arxiv.org/abs/2403.19588
365
+ * RegNet - https://arxiv.org/abs/2003.13678
366
+ * RegNetZ - https://arxiv.org/abs/2103.06877
367
+ * RepVGG - https://arxiv.org/abs/2101.03697
368
+ * RepGhostNet - https://arxiv.org/abs/2211.06088
369
+ * RepViT - https://arxiv.org/abs/2307.09283
370
+ * ResMLP - https://arxiv.org/abs/2105.03404
371
+ * ResNet/ResNeXt
372
+ * ResNet (v1b/v1.5) - https://arxiv.org/abs/1512.03385
373
+ * ResNeXt - https://arxiv.org/abs/1611.05431
374
+ * 'Bag of Tricks' / Gluon C, D, E, S variations - https://arxiv.org/abs/1812.01187
375
+ * Weakly-supervised (WSL) Instagram pretrained / ImageNet tuned ResNeXt101 - https://arxiv.org/abs/1805.00932
376
+ * Semi-supervised (SSL) / Semi-weakly Supervised (SWSL) ResNet/ResNeXts - https://arxiv.org/abs/1905.00546
377
+ * ECA-Net (ECAResNet) - https://arxiv.org/abs/1910.03151v4
378
+ * Squeeze-and-Excitation Networks (SEResNet) - https://arxiv.org/abs/1709.01507
379
+ * ResNet-RS - https://arxiv.org/abs/2103.07579
380
+ * Res2Net - https://arxiv.org/abs/1904.01169
381
+ * ResNeSt - https://arxiv.org/abs/2004.08955
382
+ * ReXNet - https://arxiv.org/abs/2007.00992
383
+ * ROPE-ViT - https://arxiv.org/abs/2403.13298
384
+ * SelecSLS - https://arxiv.org/abs/1907.00837
385
+ * Selective Kernel Networks - https://arxiv.org/abs/1903.06586
386
+ * Sequencer2D - https://arxiv.org/abs/2205.01972
387
+ * SHViT - https://arxiv.org/abs/2401.16456
388
+ * SigLIP (image encoder) - https://arxiv.org/abs/2303.15343
389
+ * SigLIP 2 (image encoder) - https://arxiv.org/abs/2502.14786
390
+ * StarNet - https://arxiv.org/abs/2403.19967
391
+ * SwiftFormer - https://arxiv.org/pdf/2303.15446
392
+ * Swin S3 (AutoFormerV2) - https://arxiv.org/abs/2111.14725
393
+ * Swin Transformer - https://arxiv.org/abs/2103.14030
394
+ * Swin Transformer V2 - https://arxiv.org/abs/2111.09883
395
+ * TinyViT - https://arxiv.org/abs/2207.10666
396
+ * Transformer-iN-Transformer (TNT) - https://arxiv.org/abs/2103.00112
397
+ * TResNet - https://arxiv.org/abs/2003.13630
398
+ * Twins (Spatial Attention in Vision Transformers) - https://arxiv.org/pdf/2104.13840.pdf
399
+ * VGG - https://arxiv.org/abs/1409.1556
400
+ * Visformer - https://arxiv.org/abs/2104.12533
401
+ * Vision Transformer - https://arxiv.org/abs/2010.11929
402
+ * ViTamin - https://arxiv.org/abs/2404.02132
403
+ * VOLO (Vision Outlooker) - https://arxiv.org/abs/2106.13112
404
+ * VovNet V2 and V1 - https://arxiv.org/abs/1911.06667
405
+ * Xception - https://arxiv.org/abs/1610.02357
406
+ * Xception (Modified Aligned, Gluon) - https://arxiv.org/abs/1802.02611
407
+ * Xception (Modified Aligned, TF) - https://arxiv.org/abs/1802.02611
408
+ * XCiT (Cross-Covariance Image Transformers) - https://arxiv.org/abs/2106.09681
409
+
410
+ ### Optimizers
411
+ To see full list of optimizers w/ descriptions: `timm.optim.list_optimizers(with_description=True)`
412
+
413
+ Included optimizers available via `timm.optim.create_optimizer_v2` factory method:
414
+ * `adabelief` an implementation of AdaBelief adapted from https://github.com/juntang-zhuang/Adabelief-Optimizer - https://arxiv.org/abs/2010.07468
415
+ * `adafactor` adapted from [FAIRSeq impl](https://github.com/pytorch/fairseq/blob/master/fairseq/optim/adafactor.py) - https://arxiv.org/abs/1804.04235
416
+ * `adafactorbv` adapted from [Big Vision](https://github.com/google-research/big_vision/blob/main/big_vision/optax.py) - https://arxiv.org/abs/2106.04560
417
+ * `adahessian` by [David Samuel](https://github.com/davda54/ada-hessian) - https://arxiv.org/abs/2006.00719
418
+ * `adamp` and `sgdp` by [Naver ClovAI](https://github.com/clovaai) - https://arxiv.org/abs/2006.08217
419
+ * `adamuon` and `nadamuon` as per https://github.com/Chongjie-Si/AdaMuon - https://arxiv.org/abs/2507.11005
420
+ * `adan` an implementation of Adan adapted from https://github.com/sail-sg/Adan - https://arxiv.org/abs/2208.06677
421
+ * `adopt` ADOPT adapted from https://github.com/iShohei220/adopt - https://arxiv.org/abs/2411.02853
422
+ * `kron` PSGD w/ Kronecker-factored preconditioner from https://github.com/evanatyourservice/kron_torch - https://sites.google.com/site/lixilinx/home/psgd
423
+ * `lamb` an implementation of Lamb and LambC (w/ trust-clipping) cleaned up and modified to support use with XLA - https://arxiv.org/abs/1904.00962
424
+ * `laprop` optimizer from https://github.com/Z-T-WANG/LaProp-Optimizer - https://arxiv.org/abs/2002.04839
425
+ * `lars` an implementation of LARS and LARC (w/ trust-clipping) - https://arxiv.org/abs/1708.03888
426
+ * `lion` and implementation of Lion adapted from https://github.com/google/automl/tree/master/lion - https://arxiv.org/abs/2302.06675
427
+ * `lookahead` adapted from impl by [Liam](https://github.com/alphadl/lookahead.pytorch) - https://arxiv.org/abs/1907.08610
428
+ * `madgrad` an implementation of MADGRAD adapted from https://github.com/facebookresearch/madgrad - https://arxiv.org/abs/2101.11075
429
+ * `mars` MARS optimizer from https://github.com/AGI-Arena/MARS - https://arxiv.org/abs/2411.10438
430
+ * `muon` MUON optimizer from https://github.com/KellerJordan/Muon with numerous additions and improved non-transformer behaviour
431
+ * `nadam` an implementation of Adam w/ Nesterov momentum
432
+ * `nadamw` an implementation of AdamW (Adam w/ decoupled weight-decay) w/ Nesterov momentum. A simplified impl based on https://github.com/mlcommons/algorithmic-efficiency
433
+ * `novograd` by [Masashi Kimura](https://github.com/convergence-lab/novograd) - https://arxiv.org/abs/1905.11286
434
+ * `radam` by [Liyuan Liu](https://github.com/LiyuanLucasLiu/RAdam) - https://arxiv.org/abs/1908.03265
435
+ * `rmsprop_tf` adapted from PyTorch RMSProp by myself. Reproduces much improved Tensorflow RMSProp behaviour
436
+ * `sgdw` and implementation of SGD w/ decoupled weight-decay
437
+ * `fused<name>` optimizers by name with [NVIDIA Apex](https://github.com/NVIDIA/apex/tree/master/apex/optimizers) installed
438
+ * `bnb<name>` optimizers by name with [BitsAndBytes](https://github.com/TimDettmers/bitsandbytes) installed
439
+ * `cadamw`, `clion`, and more 'Cautious' optimizers from https://github.com/kyleliang919/C-Optim - https://arxiv.org/abs/2411.16085
440
+ * `adam`, `adamw`, `rmsprop`, `adadelta`, `adagrad`, and `sgd` pass through to `torch.optim` implementations
441
+ * `c` suffix (eg `adamc`, `nadamc` to implement 'corrected weight decay' in https://arxiv.org/abs/2506.02285)
442
+
443
+ ### Augmentations
444
+ * Random Erasing from [Zhun Zhong](https://github.com/zhunzhong07/Random-Erasing/blob/master/transforms.py) - https://arxiv.org/abs/1708.04896)
445
+ * Mixup - https://arxiv.org/abs/1710.09412
446
+ * CutMix - https://arxiv.org/abs/1905.04899
447
+ * AutoAugment (https://arxiv.org/abs/1805.09501) and RandAugment (https://arxiv.org/abs/1909.13719) ImageNet configurations modeled after impl for EfficientNet training (https://github.com/tensorflow/tpu/blob/master/models/official/efficientnet/autoaugment.py)
448
+ * AugMix w/ JSD loss, JSD w/ clean + augmented mixing support works with AutoAugment and RandAugment as well - https://arxiv.org/abs/1912.02781
449
+ * SplitBachNorm - allows splitting batch norm layers between clean and augmented (auxiliary batch norm) data
450
+
451
+ ### Regularization
452
+ * DropPath aka "Stochastic Depth" - https://arxiv.org/abs/1603.09382
453
+ * DropBlock - https://arxiv.org/abs/1810.12890
454
+ * Blur Pooling - https://arxiv.org/abs/1904.11486
455
+
456
+ ### Other
457
+
458
+ Several (less common) features that I often utilize in my projects are included. Many of their additions are the reason why I maintain my own set of models, instead of using others' via PIP:
459
+
460
+ * All models have a common default configuration interface and API for
461
+ * accessing/changing the classifier - `get_classifier` and `reset_classifier`
462
+ * doing a forward pass on just the features - `forward_features` (see [documentation](https://huggingface.co/docs/timm/feature_extraction))
463
+ * these makes it easy to write consistent network wrappers that work with any of the models
464
+ * All models support multi-scale feature map extraction (feature pyramids) via create_model (see [documentation](https://huggingface.co/docs/timm/feature_extraction))
465
+ * `create_model(name, features_only=True, out_indices=..., output_stride=...)`
466
+ * `out_indices` creation arg specifies which feature maps to return, these indices are 0 based and generally correspond to the `C(i + 1)` feature level.
467
+ * `output_stride` creation arg controls output stride of the network by using dilated convolutions. Most networks are stride 32 by default. Not all networks support this.
468
+ * feature map channel counts, reduction level (stride) can be queried AFTER model creation via the `.feature_info` member
469
+ * All models have a consistent pretrained weight loader that adapts last linear if necessary, and from 3 to 1 channel input if desired
470
+ * High performance [reference training, validation, and inference scripts](https://huggingface.co/docs/timm/training_script) that work in several process/GPU modes:
471
+ * NVIDIA DDP w/ a single GPU per process, multiple processes with APEX present (AMP mixed-precision optional)
472
+ * PyTorch DistributedDataParallel w/ multi-gpu, single process (AMP disabled as it crashes when enabled)
473
+ * PyTorch w/ single GPU single process (AMP optional)
474
+ * A dynamic global pool implementation that allows selecting from average pooling, max pooling, average + max, or concat([average, max]) at model creation. All global pooling is adaptive average by default and compatible with pretrained weights.
475
+ * A 'Test Time Pool' wrapper that can wrap any of the included models and usually provides improved performance doing inference with input images larger than the training size. Idea adapted from original DPN implementation when I ported (https://github.com/cypw/DPNs)
476
+ * Learning rate schedulers
477
+ * Ideas adopted from
478
+ * [AllenNLP schedulers](https://github.com/allenai/allennlp/tree/master/allennlp/training/learning_rate_schedulers)
479
+ * [FAIRseq lr_scheduler](https://github.com/pytorch/fairseq/tree/master/fairseq/optim/lr_scheduler)
480
+ * SGDR: Stochastic Gradient Descent with Warm Restarts (https://arxiv.org/abs/1608.03983)
481
+ * Schedulers include `step`, `cosine` w/ restarts, `tanh` w/ restarts, `plateau`
482
+ * Space-to-Depth by [mrT23](https://github.com/mrT23/TResNet/blob/master/src/models/tresnet/layers/space_to_depth.py) (https://arxiv.org/abs/1801.04590)
483
+ * Adaptive Gradient Clipping (https://arxiv.org/abs/2102.06171, https://github.com/deepmind/deepmind-research/tree/master/nfnets)
484
+ * An extensive selection of channel and/or spatial attention modules:
485
+ * Bottleneck Transformer - https://arxiv.org/abs/2101.11605
486
+ * CBAM - https://arxiv.org/abs/1807.06521
487
+ * Effective Squeeze-Excitation (ESE) - https://arxiv.org/abs/1911.06667
488
+ * Efficient Channel Attention (ECA) - https://arxiv.org/abs/1910.03151
489
+ * Gather-Excite (GE) - https://arxiv.org/abs/1810.12348
490
+ * Global Context (GC) - https://arxiv.org/abs/1904.11492
491
+ * Halo - https://arxiv.org/abs/2103.12731
492
+ * Involution - https://arxiv.org/abs/2103.06255
493
+ * Lambda Layer - https://arxiv.org/abs/2102.08602
494
+ * Non-Local (NL) - https://arxiv.org/abs/1711.07971
495
+ * Squeeze-and-Excitation (SE) - https://arxiv.org/abs/1709.01507
496
+ * Selective Kernel (SK) - (https://arxiv.org/abs/1903.06586
497
+ * Split (SPLAT) - https://arxiv.org/abs/2004.08955
498
+ * Shifted Window (SWIN) - https://arxiv.org/abs/2103.14030
499
+
500
+ ## Results
501
+
502
+ Model validation results can be found in the [results tables](results/README.md)
503
+
504
+ ## Getting Started (Documentation)
505
+
506
+ The official documentation can be found at https://huggingface.co/docs/hub/timm. Documentation contributions are welcome.
507
+
508
+ [Getting Started with PyTorch Image Models (timm): A Practitioner’s Guide](https://towardsdatascience.com/getting-started-with-pytorch-image-models-timm-a-practitioners-guide-4e77b4bf9055-2/) by [Chris Hughes](https://github.com/Chris-hughes10) is an extensive blog post covering many aspects of `timm` in detail.
509
+
510
+ [timmdocs](http://timm.fast.ai/) is an alternate set of documentation for `timm`. A big thanks to [Aman Arora](https://github.com/amaarora) for his efforts creating timmdocs.
511
+
512
+ [paperswithcode](https://paperswithcode.com/lib/timm) is a good resource for browsing the models within `timm`.
513
+
514
+ ## Train, Validation, Inference Scripts
515
+
516
+ The root folder of the repository contains reference train, validation, and inference scripts that work with the included models and other features of this repository. They are adaptable for other datasets and use cases with a little hacking. See [documentation](https://huggingface.co/docs/timm/training_script).
517
+
518
+ ## Awesome PyTorch Resources
519
+
520
+ One of the greatest assets of PyTorch is the community and their contributions. A few of my favourite resources that pair well with the models and components here are listed below.
521
+
522
+ ### Object Detection, Instance and Semantic Segmentation
523
+ * Detectron2 - https://github.com/facebookresearch/detectron2
524
+ * Segmentation Models (Semantic) - https://github.com/qubvel/segmentation_models.pytorch
525
+ * EfficientDet (Obj Det, Semantic soon) - https://github.com/rwightman/efficientdet-pytorch
526
+
527
+ ### Computer Vision / Image Augmentation
528
+ * Albumentations - https://github.com/albumentations-team/albumentations
529
+ * Kornia - https://github.com/kornia/kornia
530
+
531
+ ### Knowledge Distillation
532
+ * RepDistiller - https://github.com/HobbitLong/RepDistiller
533
+ * torchdistill - https://github.com/yoshitomo-matsubara/torchdistill
534
+
535
+ ### Metric Learning
536
+ * PyTorch Metric Learning - https://github.com/KevinMusgrave/pytorch-metric-learning
537
+
538
+ ### Training / Frameworks
539
+ * fastai - https://github.com/fastai/fastai
540
+ * lightly_train - https://github.com/lightly-ai/lightly-train
541
+
542
+ ### Deployment
543
+ * timmx (Export timm models to ONNX, CoreML, LiteRT, TensorRT, and more) - https://github.com/Boulaouaney/timmx
544
+
545
+ ## Licenses
546
+
547
+ ### Code
548
+ The code here is licensed Apache 2.0. I've taken care to make sure any third party code included or adapted has compatible (permissive) licenses such as MIT, BSD, etc. I've made an effort to avoid any GPL / LGPL conflicts. That said, it is your responsibility to ensure you comply with licenses here and conditions of any dependent licenses. Where applicable, I've linked the sources/references for various components in docstrings. If you think I've missed anything please create an issue.
549
+
550
+ ### Pretrained Weights
551
+ So far all of the pretrained weights available here are pretrained on ImageNet with a select few that have some additional pretraining (see extra note below). ImageNet was released for non-commercial research purposes only (https://image-net.org/download). It's not clear what the implications of that are for the use of pretrained weights from that dataset. Any models I have trained with ImageNet are done for research purposes and one should assume that the original dataset license applies to the weights. It's best to seek legal advice if you intend to use the pretrained weights in a commercial product.
552
+
553
+ #### Pretrained on more than ImageNet
554
+ Several weights included or references here were pretrained with proprietary datasets that I do not have access to. These include the Facebook WSL, SSL, SWSL ResNe(Xt) and the Google Noisy Student EfficientNet models. The Facebook models have an explicit non-commercial license (CC-BY-NC 4.0, https://github.com/facebookresearch/semi-supervised-ImageNet1K-models, https://github.com/facebookresearch/WSL-Images). The Google models do not appear to have any restriction beyond the Apache 2.0 license (and ImageNet concerns). In either case, you should contact Facebook or Google with any questions.
555
+
556
+ ## Citing
557
+
558
+ ### BibTeX
559
+
560
+ ```bibtex
561
+ @misc{rw2019timm,
562
+ author = {Ross Wightman},
563
+ title = {PyTorch Image Models},
564
+ year = {2019},
565
+ publisher = {GitHub},
566
+ journal = {GitHub repository},
567
+ doi = {10.5281/zenodo.4414861},
568
+ howpublished = {\url{https://github.com/rwightman/pytorch-image-models}}
569
+ }
570
+ ```
571
+
572
+ ### Latest DOI
573
+
574
+ [![DOI](https://zenodo.org/badge/168799526.svg)](https://zenodo.org/badge/latestdoi/168799526)
.cache/pip/http-v2/3/d/7/c/9/3d7c98da48a1e2c979be55081370491e3fd204bfa81dbfbd046f0829 ADDED
Binary file (1.22 kB). View file
 
.cache/pip/http-v2/3/d/7/c/9/3d7c98da48a1e2c979be55081370491e3fd204bfa81dbfbd046f0829.body ADDED
@@ -0,0 +1,1383 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Metadata-Version: 2.1
2
+ Name: pandas
3
+ Version: 3.0.2
4
+ Summary: Powerful data structures for data analysis, time series, and statistics
5
+ Author-Email: The Pandas Development Team <pandas-dev@python.org>
6
+ License: BSD 3-Clause License
7
+
8
+ Copyright (c) 2008-2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
9
+ All rights reserved.
10
+
11
+ Copyright (c) 2011-2026, Open source contributors.
12
+
13
+ Redistribution and use in source and binary forms, with or without
14
+ modification, are permitted provided that the following conditions are met:
15
+
16
+ * Redistributions of source code must retain the above copyright notice, this
17
+ list of conditions and the following disclaimer.
18
+
19
+ * Redistributions in binary form must reproduce the above copyright notice,
20
+ this list of conditions and the following disclaimer in the documentation
21
+ and/or other materials provided with the distribution.
22
+
23
+ * Neither the name of the copyright holder nor the names of its
24
+ contributors may be used to endorse or promote products derived from
25
+ this software without specific prior written permission.
26
+
27
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
30
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
31
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
33
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
34
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
35
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37
+ Copyright (c) 2010-2019 Keith Goodman
38
+ Copyright (c) 2019 Bottleneck Developers
39
+ All rights reserved.
40
+
41
+ Redistribution and use in source and binary forms, with or without
42
+ modification, are permitted provided that the following conditions are met:
43
+
44
+ * Redistributions of source code must retain the above copyright notice,
45
+ this list of conditions and the following disclaimer.
46
+
47
+ * Redistributions in binary form must reproduce the above copyright
48
+ notice, this list of conditions and the following disclaimer in the
49
+ documentation and/or other materials provided with the distribution.
50
+
51
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
52
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
53
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
54
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
55
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
56
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
57
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
58
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
59
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
60
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
61
+ POSSIBILITY OF SUCH DAMAGE.Copyright 2017- Paul Ganssle <paul@ganssle.io>
62
+ Copyright 2017- dateutil contributors (see AUTHORS file)
63
+
64
+ Licensed under the Apache License, Version 2.0 (the "License");
65
+ you may not use this file except in compliance with the License.
66
+ You may obtain a copy of the License at
67
+
68
+ http://www.apache.org/licenses/LICENSE-2.0
69
+
70
+ Unless required by applicable law or agreed to in writing, software
71
+ distributed under the License is distributed on an "AS IS" BASIS,
72
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
73
+ See the License for the specific language governing permissions and
74
+ limitations under the License.
75
+
76
+ The above license applies to all contributions after 2017-12-01, as well as
77
+ all contributions that have been re-licensed (see AUTHORS file for the list of
78
+ contributors who have re-licensed their code).
79
+ --------------------------------------------------------------------------------
80
+ dateutil - Extensions to the standard Python datetime module.
81
+
82
+ Copyright (c) 2003-2011 - Gustavo Niemeyer <gustavo@niemeyer.net>
83
+ Copyright (c) 2012-2014 - Tomi Pieviläinen <tomi.pievilainen@iki.fi>
84
+ Copyright (c) 2014-2016 - Yaron de Leeuw <me@jarondl.net>
85
+ Copyright (c) 2015- - Paul Ganssle <paul@ganssle.io>
86
+ Copyright (c) 2015- - dateutil contributors (see AUTHORS file)
87
+
88
+ All rights reserved.
89
+
90
+ Redistribution and use in source and binary forms, with or without
91
+ modification, are permitted provided that the following conditions are met:
92
+
93
+ * Redistributions of source code must retain the above copyright notice,
94
+ this list of conditions and the following disclaimer.
95
+ * Redistributions in binary form must reproduce the above copyright notice,
96
+ this list of conditions and the following disclaimer in the documentation
97
+ and/or other materials provided with the distribution.
98
+ * Neither the name of the copyright holder nor the names of its
99
+ contributors may be used to endorse or promote products derived from
100
+ this software without specific prior written permission.
101
+
102
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
103
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
104
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
105
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
106
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
107
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
108
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
109
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
110
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
111
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
112
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
113
+
114
+ The above BSD License Applies to all code, even that also covered by Apache 2.0.# MIT License
115
+
116
+ Copyright (c) 2019 Hadley Wickham; RStudio; and Evan Miller
117
+
118
+ Permission is hereby granted, free of charge, to any person obtaining a copy
119
+ of this software and associated documentation files (the "Software"), to deal
120
+ in the Software without restriction, including without limitation the rights
121
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
122
+ copies of the Software, and to permit persons to whom the Software is
123
+ furnished to do so, subject to the following conditions:
124
+
125
+ The above copyright notice and this permission notice shall be included in all
126
+ copies or substantial portions of the Software.
127
+
128
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
129
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
130
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
131
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
132
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
133
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
134
+ SOFTWARE.
135
+ Based on http://opensource.org/licenses/MIT
136
+
137
+ This is a template. Complete and ship as file LICENSE the following 2
138
+ lines (only)
139
+
140
+ YEAR:
141
+ COPYRIGHT HOLDER:
142
+
143
+ and specify as
144
+
145
+ License: MIT + file LICENSE
146
+
147
+ Copyright (c) <YEAR>, <COPYRIGHT HOLDER>
148
+
149
+ Permission is hereby granted, free of charge, to any person obtaining
150
+ a copy of this software and associated documentation files (the
151
+ "Software"), to deal in the Software without restriction, including
152
+ without limitation the rights to use, copy, modify, merge, publish,
153
+ distribute, sublicense, and/or sell copies of the Software, and to
154
+ permit persons to whom the Software is furnished to do so, subject to
155
+ the following conditions:
156
+
157
+ The above copyright notice and this permission notice shall be
158
+ included in all copies or substantial portions of the Software.
159
+
160
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
161
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
162
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
163
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
164
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
165
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
166
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
167
+ The MIT License
168
+
169
+ Copyright (c) 2008- Attractive Chaos <attractor@live.co.uk>
170
+
171
+ Permission is hereby granted, free of charge, to any person obtaining
172
+ a copy of this software and associated documentation files (the
173
+ "Software"), to deal in the Software without restriction, including
174
+ without limitation the rights to use, copy, modify, merge, publish,
175
+ distribute, sublicense, and/or sell copies of the Software, and to
176
+ permit persons to whom the Software is furnished to do so, subject to
177
+ the following conditions:
178
+
179
+ The above copyright notice and this permission notice shall be
180
+ included in all copies or substantial portions of the Software.
181
+
182
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
183
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
184
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
185
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
186
+ BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
187
+ ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
188
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
189
+ SOFTWARE.musl as a whole is licensed under the following standard MIT license:
190
+
191
+ ----------------------------------------------------------------------
192
+ Copyright © 2005-2020 Rich Felker, et al.
193
+
194
+ Permission is hereby granted, free of charge, to any person obtaining
195
+ a copy of this software and associated documentation files (the
196
+ "Software"), to deal in the Software without restriction, including
197
+ without limitation the rights to use, copy, modify, merge, publish,
198
+ distribute, sublicense, and/or sell copies of the Software, and to
199
+ permit persons to whom the Software is furnished to do so, subject to
200
+ the following conditions:
201
+
202
+ The above copyright notice and this permission notice shall be
203
+ included in all copies or substantial portions of the Software.
204
+
205
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
206
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
207
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
208
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
209
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
210
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
211
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
212
+ ----------------------------------------------------------------------
213
+
214
+ Authors/contributors include:
215
+
216
+ A. Wilcox
217
+ Ada Worcester
218
+ Alex Dowad
219
+ Alex Suykov
220
+ Alexander Monakov
221
+ Andre McCurdy
222
+ Andrew Kelley
223
+ Anthony G. Basile
224
+ Aric Belsito
225
+ Arvid Picciani
226
+ Bartosz Brachaczek
227
+ Benjamin Peterson
228
+ Bobby Bingham
229
+ Boris Brezillon
230
+ Brent Cook
231
+ Chris Spiegel
232
+ Clément Vasseur
233
+ Daniel Micay
234
+ Daniel Sabogal
235
+ Daurnimator
236
+ David Carlier
237
+ David Edelsohn
238
+ Denys Vlasenko
239
+ Dmitry Ivanov
240
+ Dmitry V. Levin
241
+ Drew DeVault
242
+ Emil Renner Berthing
243
+ Fangrui Song
244
+ Felix Fietkau
245
+ Felix Janda
246
+ Gianluca Anzolin
247
+ Hauke Mehrtens
248
+ He X
249
+ Hiltjo Posthuma
250
+ Isaac Dunham
251
+ Jaydeep Patil
252
+ Jens Gustedt
253
+ Jeremy Huntwork
254
+ Jo-Philipp Wich
255
+ Joakim Sindholt
256
+ John Spencer
257
+ Julien Ramseier
258
+ Justin Cormack
259
+ Kaarle Ritvanen
260
+ Khem Raj
261
+ Kylie McClain
262
+ Leah Neukirchen
263
+ Luca Barbato
264
+ Luka Perkov
265
+ M Farkas-Dyck (Strake)
266
+ Mahesh Bodapati
267
+ Markus Wichmann
268
+ Masanori Ogino
269
+ Michael Clark
270
+ Michael Forney
271
+ Mikhail Kremnyov
272
+ Natanael Copa
273
+ Nicholas J. Kain
274
+ orc
275
+ Pascal Cuoq
276
+ Patrick Oppenlander
277
+ Petr Hosek
278
+ Petr Skocik
279
+ Pierre Carrier
280
+ Reini Urban
281
+ Rich Felker
282
+ Richard Pennington
283
+ Ryan Fairfax
284
+ Samuel Holland
285
+ Segev Finer
286
+ Shiz
287
+ sin
288
+ Solar Designer
289
+ Stefan Kristiansson
290
+ Stefan O'Rear
291
+ Szabolcs Nagy
292
+ Timo Teräs
293
+ Trutz Behn
294
+ Valentin Ochs
295
+ Will Dietz
296
+ William Haddon
297
+ William Pitcock
298
+
299
+ Portions of this software are derived from third-party works licensed
300
+ under terms compatible with the above MIT license:
301
+
302
+ The TRE regular expression implementation (src/regex/reg* and
303
+ src/regex/tre*) is Copyright © 2001-2008 Ville Laurikari and licensed
304
+ under a 2-clause BSD license (license text in the source files). The
305
+ included version has been heavily modified by Rich Felker in 2012, in
306
+ the interests of size, simplicity, and namespace cleanliness.
307
+
308
+ Much of the math library code (src/math/* and src/complex/*) is
309
+ Copyright © 1993,2004 Sun Microsystems or
310
+ Copyright © 2003-2011 David Schultz or
311
+ Copyright © 2003-2009 Steven G. Kargl or
312
+ Copyright © 2003-2009 Bruce D. Evans or
313
+ Copyright © 2008 Stephen L. Moshier or
314
+ Copyright © 2017-2018 Arm Limited
315
+ and labelled as such in comments in the individual source files. All
316
+ have been licensed under extremely permissive terms.
317
+
318
+ The ARM memcpy code (src/string/arm/memcpy.S) is Copyright © 2008
319
+ The Android Open Source Project and is licensed under a two-clause BSD
320
+ license. It was taken from Bionic libc, used on Android.
321
+
322
+ The AArch64 memcpy and memset code (src/string/aarch64/*) are
323
+ Copyright © 1999-2019, Arm Limited.
324
+
325
+ The implementation of DES for crypt (src/crypt/crypt_des.c) is
326
+ Copyright © 1994 David Burren. It is licensed under a BSD license.
327
+
328
+ The implementation of blowfish crypt (src/crypt/crypt_blowfish.c) was
329
+ originally written by Solar Designer and placed into the public
330
+ domain. The code also comes with a fallback permissive license for use
331
+ in jurisdictions that may not recognize the public domain.
332
+
333
+ The smoothsort implementation (src/stdlib/qsort.c) is Copyright © 2011
334
+ Valentin Ochs and is licensed under an MIT-style license.
335
+
336
+ The x86_64 port was written by Nicholas J. Kain and is licensed under
337
+ the standard MIT terms.
338
+
339
+ The mips and microblaze ports were originally written by Richard
340
+ Pennington for use in the ellcc project. The original code was adapted
341
+ by Rich Felker for build system and code conventions during upstream
342
+ integration. It is licensed under the standard MIT terms.
343
+
344
+ The mips64 port was contributed by Imagination Technologies and is
345
+ licensed under the standard MIT terms.
346
+
347
+ The powerpc port was also originally written by Richard Pennington,
348
+ and later supplemented and integrated by John Spencer. It is licensed
349
+ under the standard MIT terms.
350
+
351
+ All other files which have no copyright comments are original works
352
+ produced specifically for use as part of this library, written either
353
+ by Rich Felker, the main author of the library, or by one or more
354
+ contibutors listed above. Details on authorship of individual files
355
+ can be found in the git version control history of the project. The
356
+ omission of copyright and license comments in each file is in the
357
+ interest of source tree size.
358
+
359
+ In addition, permission is hereby granted for all public header files
360
+ (include/* and arch/*/bits/*) and crt files intended to be linked into
361
+ applications (crt/*, ldso/dlstart.c, and arch/*/crt_arch.h) to omit
362
+ the copyright notice and permission notice otherwise required by the
363
+ license, and to use these files without any requirement of
364
+ attribution. These files include substantial contributions from:
365
+
366
+ Bobby Bingham
367
+ John Spencer
368
+ Nicholas J. Kain
369
+ Rich Felker
370
+ Richard Pennington
371
+ Stefan Kristiansson
372
+ Szabolcs Nagy
373
+
374
+ all of whom have explicitly granted such permission.
375
+
376
+ This file previously contained text expressing a belief that most of
377
+ the files covered by the above exception were sufficiently trivial not
378
+ to be subject to copyright, resulting in confusion over whether it
379
+ negated the permissions granted in the license. In the spirit of
380
+ permissive licensing, and of not having licensing issues being an
381
+ obstacle to adoption, that text has been removed.Copyright (c) 2005-2023, NumPy Developers.
382
+ All rights reserved.
383
+
384
+ Redistribution and use in source and binary forms, with or without
385
+ modification, are permitted provided that the following conditions are
386
+ met:
387
+
388
+ * Redistributions of source code must retain the above copyright
389
+ notice, this list of conditions and the following disclaimer.
390
+
391
+ * Redistributions in binary form must reproduce the above
392
+ copyright notice, this list of conditions and the following
393
+ disclaimer in the documentation and/or other materials provided
394
+ with the distribution.
395
+
396
+ * Neither the name of the NumPy Developers nor the names of any
397
+ contributors may be used to endorse or promote products derived
398
+ from this software without specific prior written permission.
399
+
400
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
401
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
402
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
403
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
404
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
405
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
406
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
407
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
408
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
409
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
410
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
411
+ Apache License
412
+ Version 2.0, January 2004
413
+ http://www.apache.org/licenses/
414
+
415
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
416
+
417
+ 1. Definitions.
418
+
419
+ "License" shall mean the terms and conditions for use, reproduction,
420
+ and distribution as defined by Sections 1 through 9 of this document.
421
+
422
+ "Licensor" shall mean the copyright owner or entity authorized by
423
+ the copyright owner that is granting the License.
424
+
425
+ "Legal Entity" shall mean the union of the acting entity and all
426
+ other entities that control, are controlled by, or are under common
427
+ control with that entity. For the purposes of this definition,
428
+ "control" means (i) the power, direct or indirect, to cause the
429
+ direction or management of such entity, whether by contract or
430
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
431
+ outstanding shares, or (iii) beneficial ownership of such entity.
432
+
433
+ "You" (or "Your") shall mean an individual or Legal Entity
434
+ exercising permissions granted by this License.
435
+
436
+ "Source" form shall mean the preferred form for making modifications,
437
+ including but not limited to software source code, documentation
438
+ source, and configuration files.
439
+
440
+ "Object" form shall mean any form resulting from mechanical
441
+ transformation or translation of a Source form, including but
442
+ not limited to compiled object code, generated documentation,
443
+ and conversions to other media types.
444
+
445
+ "Work" shall mean the work of authorship, whether in Source or
446
+ Object form, made available under the License, as indicated by a
447
+ copyright notice that is included in or attached to the work
448
+ (an example is provided in the Appendix below).
449
+
450
+ "Derivative Works" shall mean any work, whether in Source or Object
451
+ form, that is based on (or derived from) the Work and for which the
452
+ editorial revisions, annotations, elaborations, or other modifications
453
+ represent, as a whole, an original work of authorship. For the purposes
454
+ of this License, Derivative Works shall not include works that remain
455
+ separable from, or merely link (or bind by name) to the interfaces of,
456
+ the Work and Derivative Works thereof.
457
+
458
+ "Contribution" shall mean any work of authorship, including
459
+ the original version of the Work and any modifications or additions
460
+ to that Work or Derivative Works thereof, that is intentionally
461
+ submitted to Licensor for inclusion in the Work by the copyright owner
462
+ or by an individual or Legal Entity authorized to submit on behalf of
463
+ the copyright owner. For the purposes of this definition, "submitted"
464
+ means any form of electronic, verbal, or written communication sent
465
+ to the Licensor or its representatives, including but not limited to
466
+ communication on electronic mailing lists, source code control systems,
467
+ and issue tracking systems that are managed by, or on behalf of, the
468
+ Licensor for the purpose of discussing and improving the Work, but
469
+ excluding communication that is conspicuously marked or otherwise
470
+ designated in writing by the copyright owner as "Not a Contribution."
471
+
472
+ "Contributor" shall mean Licensor and any individual or Legal Entity
473
+ on behalf of whom a Contribution has been received by Licensor and
474
+ subsequently incorporated within the Work.
475
+
476
+ 2. Grant of Copyright License. Subject to the terms and conditions of
477
+ this License, each Contributor hereby grants to You a perpetual,
478
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
479
+ copyright license to reproduce, prepare Derivative Works of,
480
+ publicly display, publicly perform, sublicense, and distribute the
481
+ Work and such Derivative Works in Source or Object form.
482
+
483
+ 3. Grant of Patent License. Subject to the terms and conditions of
484
+ this License, each Contributor hereby grants to You a perpetual,
485
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
486
+ (except as stated in this section) patent license to make, have made,
487
+ use, offer to sell, sell, import, and otherwise transfer the Work,
488
+ where such license applies only to those patent claims licensable
489
+ by such Contributor that are necessarily infringed by their
490
+ Contribution(s) alone or by combination of their Contribution(s)
491
+ with the Work to which such Contribution(s) was submitted. If You
492
+ institute patent litigation against any entity (including a
493
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
494
+ or a Contribution incorporated within the Work constitutes direct
495
+ or contributory patent infringement, then any patent licenses
496
+ granted to You under this License for that Work shall terminate
497
+ as of the date such litigation is filed.
498
+
499
+ 4. Redistribution. You may reproduce and distribute copies of the
500
+ Work or Derivative Works thereof in any medium, with or without
501
+ modifications, and in Source or Object form, provided that You
502
+ meet the following conditions:
503
+
504
+ (a) You must give any other recipients of the Work or
505
+ Derivative Works a copy of this License; and
506
+
507
+ (b) You must cause any modified files to carry prominent notices
508
+ stating that You changed the files; and
509
+
510
+ (c) You must retain, in the Source form of any Derivative Works
511
+ that You distribute, all copyright, patent, trademark, and
512
+ attribution notices from the Source form of the Work,
513
+ excluding those notices that do not pertain to any part of
514
+ the Derivative Works; and
515
+
516
+ (d) If the Work includes a "NOTICE" text file as part of its
517
+ distribution, then any Derivative Works that You distribute must
518
+ include a readable copy of the attribution notices contained
519
+ within such NOTICE file, excluding those notices that do not
520
+ pertain to any part of the Derivative Works, in at least one
521
+ of the following places: within a NOTICE text file distributed
522
+ as part of the Derivative Works; within the Source form or
523
+ documentation, if provided along with the Derivative Works; or,
524
+ within a display generated by the Derivative Works, if and
525
+ wherever such third-party notices normally appear. The contents
526
+ of the NOTICE file are for informational purposes only and
527
+ do not modify the License. You may add Your own attribution
528
+ notices within Derivative Works that You distribute, alongside
529
+ or as an addendum to the NOTICE text from the Work, provided
530
+ that such additional attribution notices cannot be construed
531
+ as modifying the License.
532
+
533
+ You may add Your own copyright statement to Your modifications and
534
+ may provide additional or different license terms and conditions
535
+ for use, reproduction, or distribution of Your modifications, or
536
+ for any such Derivative Works as a whole, provided Your use,
537
+ reproduction, and distribution of the Work otherwise complies with
538
+ the conditions stated in this License.
539
+
540
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
541
+ any Contribution intentionally submitted for inclusion in the Work
542
+ by You to the Licensor shall be under the terms and conditions of
543
+ this License, without any additional terms or conditions.
544
+ Notwithstanding the above, nothing herein shall supersede or modify
545
+ the terms of any separate license agreement you may have executed
546
+ with Licensor regarding such Contributions.
547
+
548
+ 6. Trademarks. This License does not grant permission to use the trade
549
+ names, trademarks, service marks, or product names of the Licensor,
550
+ except as required for reasonable and customary use in describing the
551
+ origin of the Work and reproducing the content of the NOTICE file.
552
+
553
+ 7. Disclaimer of Warranty. Unless required by applicable law or
554
+ agreed to in writing, Licensor provides the Work (and each
555
+ Contributor provides its Contributions) on an "AS IS" BASIS,
556
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
557
+ implied, including, without limitation, any warranties or conditions
558
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
559
+ PARTICULAR PURPOSE. You are solely responsible for determining the
560
+ appropriateness of using or redistributing the Work and assume any
561
+ risks associated with Your exercise of permissions under this License.
562
+
563
+ 8. Limitation of Liability. In no event and under no legal theory,
564
+ whether in tort (including negligence), contract, or otherwise,
565
+ unless required by applicable law (such as deliberate and grossly
566
+ negligent acts) or agreed to in writing, shall any Contributor be
567
+ liable to You for damages, including any direct, indirect, special,
568
+ incidental, or consequential damages of any character arising as a
569
+ result of this License or out of the use or inability to use the
570
+ Work (including but not limited to damages for loss of goodwill,
571
+ work stoppage, computer failure or malfunction, or any and all
572
+ other commercial damages or losses), even if such Contributor
573
+ has been advised of the possibility of such damages.
574
+
575
+ 9. Accepting Warranty or Additional Liability. While redistributing
576
+ the Work or Derivative Works thereof, You may choose to offer,
577
+ and charge a fee for, acceptance of support, warranty, indemnity,
578
+ or other liability obligations and/or rights consistent with this
579
+ License. However, in accepting such obligations, You may act only
580
+ on Your own behalf and on Your sole responsibility, not on behalf
581
+ of any other Contributor, and only if You agree to indemnify,
582
+ defend, and hold each Contributor harmless for any liability
583
+ incurred by, or claims asserted against, such Contributor by reason
584
+ of your accepting any such warranty or additional liability.
585
+
586
+ END OF TERMS AND CONDITIONS
587
+
588
+
589
+ Copyright (c) Donald Stufft and individual contributors.
590
+ All rights reserved.
591
+
592
+ Redistribution and use in source and binary forms, with or without
593
+ modification, are permitted provided that the following conditions are met:
594
+
595
+ 1. Redistributions of source code must retain the above copyright notice,
596
+ this list of conditions and the following disclaimer.
597
+
598
+ 2. Redistributions in binary form must reproduce the above copyright
599
+ notice, this list of conditions and the following disclaimer in the
600
+ documentation and/or other materials provided with the distribution.
601
+
602
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
603
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
604
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
605
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
606
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
607
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
608
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
609
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
610
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
611
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.A. HISTORY OF THE SOFTWARE
612
+ ==========================
613
+
614
+ Python was created in the early 1990s by Guido van Rossum at Stichting
615
+ Mathematisch Centrum (CWI, see https://www.cwi.nl) in the Netherlands
616
+ as a successor of a language called ABC. Guido remains Python's
617
+ principal author, although it includes many contributions from others.
618
+
619
+ In 1995, Guido continued his work on Python at the Corporation for
620
+ National Research Initiatives (CNRI, see https://www.cnri.reston.va.us)
621
+ in Reston, Virginia where he released several versions of the
622
+ software.
623
+
624
+ In May 2000, Guido and the Python core development team moved to
625
+ BeOpen.com to form the BeOpen PythonLabs team. In October of the same
626
+ year, the PythonLabs team moved to Digital Creations, which became
627
+ Zope Corporation. In 2001, the Python Software Foundation (PSF, see
628
+ https://www.python.org/psf/) was formed, a non-profit organization
629
+ created specifically to own Python-related Intellectual Property.
630
+ Zope Corporation was a sponsoring member of the PSF.
631
+
632
+ All Python releases are Open Source (see https://opensource.org for
633
+ the Open Source Definition). Historically, most, but not all, Python
634
+ releases have also been GPL-compatible; the table below summarizes
635
+ the various releases.
636
+
637
+ Release Derived Year Owner GPL-
638
+ from compatible? (1)
639
+
640
+ 0.9.0 thru 1.2 1991-1995 CWI yes
641
+ 1.3 thru 1.5.2 1.2 1995-1999 CNRI yes
642
+ 1.6 1.5.2 2000 CNRI no
643
+ 2.0 1.6 2000 BeOpen.com no
644
+ 1.6.1 1.6 2001 CNRI yes (2)
645
+ 2.1 2.0+1.6.1 2001 PSF no
646
+ 2.0.1 2.0+1.6.1 2001 PSF yes
647
+ 2.1.1 2.1+2.0.1 2001 PSF yes
648
+ 2.1.2 2.1.1 2002 PSF yes
649
+ 2.1.3 2.1.2 2002 PSF yes
650
+ 2.2 and above 2.1.1 2001-now PSF yes
651
+
652
+ Footnotes:
653
+
654
+ (1) GPL-compatible doesn't mean that we're distributing Python under
655
+ the GPL. All Python licenses, unlike the GPL, let you distribute
656
+ a modified version without making your changes open source. The
657
+ GPL-compatible licenses make it possible to combine Python with
658
+ other software that is released under the GPL; the others don't.
659
+
660
+ (2) According to Richard Stallman, 1.6.1 is not GPL-compatible,
661
+ because its license has a choice of law clause. According to
662
+ CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1
663
+ is "not incompatible" with the GPL.
664
+
665
+ Thanks to the many outside volunteers who have worked under Guido's
666
+ direction to make these releases possible.
667
+
668
+
669
+ B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON
670
+ ===============================================================
671
+
672
+ Python software and documentation are licensed under the
673
+ Python Software Foundation License Version 2.
674
+
675
+ Starting with Python 3.8.6, examples, recipes, and other code in
676
+ the documentation are dual licensed under the PSF License Version 2
677
+ and the Zero-Clause BSD license.
678
+
679
+ Some software incorporated into Python is under different licenses.
680
+ The licenses are listed with code falling under that license.
681
+
682
+
683
+ PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
684
+ --------------------------------------------
685
+
686
+ 1. This LICENSE AGREEMENT is between the Python Software Foundation
687
+ ("PSF"), and the Individual or Organization ("Licensee") accessing and
688
+ otherwise using this software ("Python") in source or binary form and
689
+ its associated documentation.
690
+
691
+ 2. Subject to the terms and conditions of this License Agreement, PSF hereby
692
+ grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
693
+ analyze, test, perform and/or display publicly, prepare derivative works,
694
+ distribute, and otherwise use Python alone or in any derivative version,
695
+ provided, however, that PSF's License Agreement and PSF's notice of copyright,
696
+ i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
697
+ 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Python Software Foundation;
698
+ All Rights Reserved" are retained in Python alone or in any derivative version
699
+ prepared by Licensee.
700
+
701
+ 3. In the event Licensee prepares a derivative work that is based on
702
+ or incorporates Python or any part thereof, and wants to make
703
+ the derivative work available to others as provided herein, then
704
+ Licensee hereby agrees to include in any such work a brief summary of
705
+ the changes made to Python.
706
+
707
+ 4. PSF is making Python available to Licensee on an "AS IS"
708
+ basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
709
+ IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
710
+ DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
711
+ FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
712
+ INFRINGE ANY THIRD PARTY RIGHTS.
713
+
714
+ 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
715
+ FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
716
+ A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
717
+ OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
718
+
719
+ 6. This License Agreement will automatically terminate upon a material
720
+ breach of its terms and conditions.
721
+
722
+ 7. Nothing in this License Agreement shall be deemed to create any
723
+ relationship of agency, partnership, or joint venture between PSF and
724
+ Licensee. This License Agreement does not grant permission to use PSF
725
+ trademarks or trade name in a trademark sense to endorse or promote
726
+ products or services of Licensee, or any third party.
727
+
728
+ 8. By copying, installing or otherwise using Python, Licensee
729
+ agrees to be bound by the terms and conditions of this License
730
+ Agreement.
731
+
732
+
733
+ BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0
734
+ -------------------------------------------
735
+
736
+ BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1
737
+
738
+ 1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an
739
+ office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the
740
+ Individual or Organization ("Licensee") accessing and otherwise using
741
+ this software in source or binary form and its associated
742
+ documentation ("the Software").
743
+
744
+ 2. Subject to the terms and conditions of this BeOpen Python License
745
+ Agreement, BeOpen hereby grants Licensee a non-exclusive,
746
+ royalty-free, world-wide license to reproduce, analyze, test, perform
747
+ and/or display publicly, prepare derivative works, distribute, and
748
+ otherwise use the Software alone or in any derivative version,
749
+ provided, however, that the BeOpen Python License is retained in the
750
+ Software, alone or in any derivative version prepared by Licensee.
751
+
752
+ 3. BeOpen is making the Software available to Licensee on an "AS IS"
753
+ basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
754
+ IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND
755
+ DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
756
+ FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT
757
+ INFRINGE ANY THIRD PARTY RIGHTS.
758
+
759
+ 4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE
760
+ SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
761
+ AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY
762
+ DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
763
+
764
+ 5. This License Agreement will automatically terminate upon a material
765
+ breach of its terms and conditions.
766
+
767
+ 6. This License Agreement shall be governed by and interpreted in all
768
+ respects by the law of the State of California, excluding conflict of
769
+ law provisions. Nothing in this License Agreement shall be deemed to
770
+ create any relationship of agency, partnership, or joint venture
771
+ between BeOpen and Licensee. This License Agreement does not grant
772
+ permission to use BeOpen trademarks or trade names in a trademark
773
+ sense to endorse or promote products or services of Licensee, or any
774
+ third party. As an exception, the "BeOpen Python" logos available at
775
+ http://www.pythonlabs.com/logos.html may be used according to the
776
+ permissions granted on that web page.
777
+
778
+ 7. By copying, installing or otherwise using the software, Licensee
779
+ agrees to be bound by the terms and conditions of this License
780
+ Agreement.
781
+
782
+
783
+ CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1
784
+ ---------------------------------------
785
+
786
+ 1. This LICENSE AGREEMENT is between the Corporation for National
787
+ Research Initiatives, having an office at 1895 Preston White Drive,
788
+ Reston, VA 20191 ("CNRI"), and the Individual or Organization
789
+ ("Licensee") accessing and otherwise using Python 1.6.1 software in
790
+ source or binary form and its associated documentation.
791
+
792
+ 2. Subject to the terms and conditions of this License Agreement, CNRI
793
+ hereby grants Licensee a nonexclusive, royalty-free, world-wide
794
+ license to reproduce, analyze, test, perform and/or display publicly,
795
+ prepare derivative works, distribute, and otherwise use Python 1.6.1
796
+ alone or in any derivative version, provided, however, that CNRI's
797
+ License Agreement and CNRI's notice of copyright, i.e., "Copyright (c)
798
+ 1995-2001 Corporation for National Research Initiatives; All Rights
799
+ Reserved" are retained in Python 1.6.1 alone or in any derivative
800
+ version prepared by Licensee. Alternately, in lieu of CNRI's License
801
+ Agreement, Licensee may substitute the following text (omitting the
802
+ quotes): "Python 1.6.1 is made available subject to the terms and
803
+ conditions in CNRI's License Agreement. This Agreement together with
804
+ Python 1.6.1 may be located on the internet using the following
805
+ unique, persistent identifier (known as a handle): 1895.22/1013. This
806
+ Agreement may also be obtained from a proxy server on the internet
807
+ using the following URL: http://hdl.handle.net/1895.22/1013".
808
+
809
+ 3. In the event Licensee prepares a derivative work that is based on
810
+ or incorporates Python 1.6.1 or any part thereof, and wants to make
811
+ the derivative work available to others as provided herein, then
812
+ Licensee hereby agrees to include in any such work a brief summary of
813
+ the changes made to Python 1.6.1.
814
+
815
+ 4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS"
816
+ basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
817
+ IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND
818
+ DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
819
+ FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT
820
+ INFRINGE ANY THIRD PARTY RIGHTS.
821
+
822
+ 5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
823
+ 1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
824
+ A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,
825
+ OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
826
+
827
+ 6. This License Agreement will automatically terminate upon a material
828
+ breach of its terms and conditions.
829
+
830
+ 7. This License Agreement shall be governed by the federal
831
+ intellectual property law of the United States, including without
832
+ limitation the federal copyright law, and, to the extent such
833
+ U.S. federal law does not apply, by the law of the Commonwealth of
834
+ Virginia, excluding Virginia's conflict of law provisions.
835
+ Notwithstanding the foregoing, with regard to derivative works based
836
+ on Python 1.6.1 that incorporate non-separable material that was
837
+ previously distributed under the GNU General Public License (GPL), the
838
+ law of the Commonwealth of Virginia shall govern this License
839
+ Agreement only as to issues arising under or with respect to
840
+ Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this
841
+ License Agreement shall be deemed to create any relationship of
842
+ agency, partnership, or joint venture between CNRI and Licensee. This
843
+ License Agreement does not grant permission to use CNRI trademarks or
844
+ trade name in a trademark sense to endorse or promote products or
845
+ services of Licensee, or any third party.
846
+
847
+ 8. By clicking on the "ACCEPT" button where indicated, or by copying,
848
+ installing or otherwise using Python 1.6.1, Licensee agrees to be
849
+ bound by the terms and conditions of this License Agreement.
850
+
851
+ ACCEPT
852
+
853
+
854
+ CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2
855
+ --------------------------------------------------
856
+
857
+ Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,
858
+ The Netherlands. All rights reserved.
859
+
860
+ Permission to use, copy, modify, and distribute this software and its
861
+ documentation for any purpose and without fee is hereby granted,
862
+ provided that the above copyright notice appear in all copies and that
863
+ both that copyright notice and this permission notice appear in
864
+ supporting documentation, and that the name of Stichting Mathematisch
865
+ Centrum or CWI not be used in advertising or publicity pertaining to
866
+ distribution of the software without specific, written prior
867
+ permission.
868
+
869
+ STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
870
+ THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
871
+ FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
872
+ FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
873
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
874
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
875
+ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
876
+
877
+ ZERO-CLAUSE BSD LICENSE FOR CODE IN THE PYTHON DOCUMENTATION
878
+ ----------------------------------------------------------------------
879
+
880
+ Permission to use, copy, modify, and/or distribute this software for any
881
+ purpose with or without fee is hereby granted.
882
+
883
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
884
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
885
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
886
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
887
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
888
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
889
+ PERFORMANCE OF THIS SOFTWARE.
890
+ Copyright (c) 2014, Al Sweigart
891
+ All rights reserved.
892
+
893
+ Redistribution and use in source and binary forms, with or without
894
+ modification, are permitted provided that the following conditions are met:
895
+
896
+ * Redistributions of source code must retain the above copyright notice, this
897
+ list of conditions and the following disclaimer.
898
+
899
+ * Redistributions in binary form must reproduce the above copyright notice,
900
+ this list of conditions and the following disclaimer in the documentation
901
+ and/or other materials provided with the distribution.
902
+
903
+ * Neither the name of the {organization} nor the names of its
904
+ contributors may be used to endorse or promote products derived from
905
+ this software without specific prior written permission.
906
+
907
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
908
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
909
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
910
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
911
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
912
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
913
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
914
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
915
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
916
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.Copyright (c) 2017 Anthony Sottile
917
+
918
+ Permission is hereby granted, free of charge, to any person obtaining a copy
919
+ of this software and associated documentation files (the "Software"), to deal
920
+ in the Software without restriction, including without limitation the rights
921
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
922
+ copies of the Software, and to permit persons to whom the Software is
923
+ furnished to do so, subject to the following conditions:
924
+
925
+ The above copyright notice and this permission notice shall be included in
926
+ all copies or substantial portions of the Software.
927
+
928
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
929
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
930
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
931
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
932
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
933
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
934
+ THE SOFTWARE.Copyright (c) 2015-2019 Jared Hobbs
935
+
936
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
937
+ this software and associated documentation files (the "Software"), to deal in
938
+ the Software without restriction, including without limitation the rights to
939
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
940
+ of the Software, and to permit persons to whom the Software is furnished to do
941
+ so, subject to the following conditions:
942
+
943
+ The above copyright notice and this permission notice shall be included in all
944
+ copies or substantial portions of the Software.
945
+
946
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
947
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
948
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
949
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
950
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
951
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
952
+ SOFTWARE.Developed by ESN, an Electronic Arts Inc. studio.
953
+ Copyright (c) 2014, Electronic Arts Inc.
954
+ All rights reserved.
955
+
956
+ Redistribution and use in source and binary forms, with or without
957
+ modification, are permitted provided that the following conditions are met:
958
+ * Redistributions of source code must retain the above copyright
959
+ notice, this list of conditions and the following disclaimer.
960
+ * Redistributions in binary form must reproduce the above copyright
961
+ notice, this list of conditions and the following disclaimer in the
962
+ documentation and/or other materials provided with the distribution.
963
+ * Neither the name of ESN, Electronic Arts Inc. nor the
964
+ names of its contributors may be used to endorse or promote products
965
+ derived from this software without specific prior written permission.
966
+
967
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
968
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
969
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
970
+ DISCLAIMED. IN NO EVENT SHALL ELECTRONIC ARTS INC. BE LIABLE
971
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
972
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
973
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
974
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
975
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
976
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
977
+
978
+ ----
979
+
980
+ Portions of code from MODP_ASCII - Ascii transformations (upper/lower, etc)
981
+ https://github.com/client9/stringencoders
982
+
983
+ Copyright 2005, 2006, 2007
984
+ Nick Galbreath -- nickg [at] modp [dot] com
985
+ All rights reserved.
986
+
987
+ Redistribution and use in source and binary forms, with or without
988
+ modification, are permitted provided that the following conditions are
989
+ met:
990
+
991
+ Redistributions of source code must retain the above copyright
992
+ notice, this list of conditions and the following disclaimer.
993
+
994
+ Redistributions in binary form must reproduce the above copyright
995
+ notice, this list of conditions and the following disclaimer in the
996
+ documentation and/or other materials provided with the distribution.
997
+
998
+ Neither the name of the modp.com nor the names of its
999
+ contributors may be used to endorse or promote products derived from
1000
+ this software without specific prior written permission.
1001
+
1002
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1003
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1004
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1005
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1006
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1007
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1008
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1009
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1010
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1011
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1012
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1013
+
1014
+ This is the standard "new" BSD license:
1015
+ http://www.opensource.org/licenses/bsd-license.php
1016
+
1017
+ https://github.com/client9/stringencoders/blob/cfd5c1507325ae497ea9bacdacba12c0ffd79d30/COPYING
1018
+
1019
+ ----
1020
+
1021
+ Numeric decoder derived from from TCL library
1022
+ https://opensource.apple.com/source/tcl/tcl-14/tcl/license.terms
1023
+ * Copyright (c) 1988-1993 The Regents of the University of California.
1024
+ * Copyright (c) 1994 Sun Microsystems, Inc.
1025
+
1026
+ This software is copyrighted by the Regents of the University of
1027
+ California, Sun Microsystems, Inc., Scriptics Corporation, ActiveState
1028
+ Corporation and other parties. The following terms apply to all files
1029
+ associated with the software unless explicitly disclaimed in
1030
+ individual files.
1031
+
1032
+ The authors hereby grant permission to use, copy, modify, distribute,
1033
+ and license this software and its documentation for any purpose, provided
1034
+ that existing copyright notices are retained in all copies and that this
1035
+ notice is included verbatim in any distributions. No written agreement,
1036
+ license, or royalty fee is required for any of the authorized uses.
1037
+ Modifications to this software may be copyrighted by their authors
1038
+ and need not follow the licensing terms described here, provided that
1039
+ the new terms are clearly indicated on the first page of each file where
1040
+ they apply.
1041
+
1042
+ IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
1043
+ FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
1044
+ ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
1045
+ DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
1046
+ POSSIBILITY OF SUCH DAMAGE.
1047
+
1048
+ THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
1049
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
1050
+ FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
1051
+ IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
1052
+ NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
1053
+ MODIFICATIONS.
1054
+
1055
+ GOVERNMENT USE: If you are acquiring this software on behalf of the
1056
+ U.S. government, the Government shall have only "Restricted Rights"
1057
+ in the software and related documentation as defined in the Federal
1058
+ Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
1059
+ are acquiring the software on behalf of the Department of Defense, the
1060
+ software shall be classified as "Commercial Computer Software" and the
1061
+ Government shall have only "Restricted Rights" as defined in Clause
1062
+ 252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the
1063
+ authors grant the U.S. Government and others acting in its behalf
1064
+ permission to use and distribute the software in accordance with the
1065
+ terms specified in this license.
1066
+ Classifier: Development Status :: 5 - Production/Stable
1067
+ Classifier: Environment :: Console
1068
+ Classifier: Intended Audience :: Science/Research
1069
+ Classifier: License :: OSI Approved :: BSD License
1070
+ Classifier: Operating System :: OS Independent
1071
+ Classifier: Programming Language :: Cython
1072
+ Classifier: Programming Language :: Python
1073
+ Classifier: Programming Language :: Python :: 3
1074
+ Classifier: Programming Language :: Python :: 3 :: Only
1075
+ Classifier: Programming Language :: Python :: 3.11
1076
+ Classifier: Programming Language :: Python :: 3.12
1077
+ Classifier: Programming Language :: Python :: 3.13
1078
+ Classifier: Programming Language :: Python :: 3.14
1079
+ Classifier: Topic :: Scientific/Engineering
1080
+ Project-URL: homepage, https://pandas.pydata.org
1081
+ Project-URL: documentation, https://pandas.pydata.org/docs/
1082
+ Project-URL: repository, https://github.com/pandas-dev/pandas
1083
+ Requires-Python: >=3.11
1084
+ Requires-Dist: numpy>=1.26.0; python_version < "3.14"
1085
+ Requires-Dist: numpy>=2.3.3; python_version >= "3.14"
1086
+ Requires-Dist: python-dateutil>=2.8.2
1087
+ Requires-Dist: tzdata; sys_platform == "win32"
1088
+ Requires-Dist: tzdata; sys_platform == "emscripten"
1089
+ Provides-Extra: test
1090
+ Requires-Dist: hypothesis>=6.116.0; extra == "test"
1091
+ Requires-Dist: pytest>=8.3.4; extra == "test"
1092
+ Requires-Dist: pytest-xdist>=3.6.1; extra == "test"
1093
+ Provides-Extra: pyarrow
1094
+ Requires-Dist: pyarrow>=13.0.0; extra == "pyarrow"
1095
+ Provides-Extra: performance
1096
+ Requires-Dist: bottleneck>=1.4.2; extra == "performance"
1097
+ Requires-Dist: numba>=0.60.0; extra == "performance"
1098
+ Requires-Dist: numexpr>=2.10.2; extra == "performance"
1099
+ Provides-Extra: computation
1100
+ Requires-Dist: scipy>=1.14.1; extra == "computation"
1101
+ Requires-Dist: xarray>=2024.10.0; extra == "computation"
1102
+ Provides-Extra: fss
1103
+ Requires-Dist: fsspec>=2024.10.0; extra == "fss"
1104
+ Provides-Extra: aws
1105
+ Requires-Dist: s3fs>=2024.10.0; extra == "aws"
1106
+ Provides-Extra: gcp
1107
+ Requires-Dist: gcsfs>=2024.10.0; extra == "gcp"
1108
+ Provides-Extra: excel
1109
+ Requires-Dist: odfpy>=1.4.1; extra == "excel"
1110
+ Requires-Dist: openpyxl>=3.1.5; extra == "excel"
1111
+ Requires-Dist: python-calamine>=0.3.0; extra == "excel"
1112
+ Requires-Dist: pyxlsb>=1.0.10; extra == "excel"
1113
+ Requires-Dist: xlrd>=2.0.1; extra == "excel"
1114
+ Requires-Dist: xlsxwriter>=3.2.0; extra == "excel"
1115
+ Provides-Extra: parquet
1116
+ Requires-Dist: pyarrow>=13.0.0; extra == "parquet"
1117
+ Provides-Extra: feather
1118
+ Requires-Dist: pyarrow>=13.0.0; extra == "feather"
1119
+ Provides-Extra: iceberg
1120
+ Requires-Dist: pyiceberg>=0.8.1; extra == "iceberg"
1121
+ Provides-Extra: hdf5
1122
+ Requires-Dist: tables>=3.10.1; extra == "hdf5"
1123
+ Provides-Extra: spss
1124
+ Requires-Dist: pyreadstat>=1.2.8; extra == "spss"
1125
+ Provides-Extra: postgresql
1126
+ Requires-Dist: SQLAlchemy>=2.0.36; extra == "postgresql"
1127
+ Requires-Dist: psycopg2>=2.9.10; extra == "postgresql"
1128
+ Requires-Dist: adbc-driver-postgresql>=1.2.0; extra == "postgresql"
1129
+ Provides-Extra: mysql
1130
+ Requires-Dist: SQLAlchemy>=2.0.36; extra == "mysql"
1131
+ Requires-Dist: pymysql>=1.1.1; extra == "mysql"
1132
+ Provides-Extra: sql-other
1133
+ Requires-Dist: SQLAlchemy>=2.0.36; extra == "sql-other"
1134
+ Requires-Dist: adbc-driver-postgresql>=1.2.0; extra == "sql-other"
1135
+ Requires-Dist: adbc-driver-sqlite>=1.2.0; extra == "sql-other"
1136
+ Provides-Extra: html
1137
+ Requires-Dist: beautifulsoup4>=4.12.3; extra == "html"
1138
+ Requires-Dist: html5lib>=1.1; extra == "html"
1139
+ Requires-Dist: lxml>=5.3.0; extra == "html"
1140
+ Provides-Extra: xml
1141
+ Requires-Dist: lxml>=5.3.0; extra == "xml"
1142
+ Provides-Extra: plot
1143
+ Requires-Dist: matplotlib>=3.9.3; extra == "plot"
1144
+ Provides-Extra: output-formatting
1145
+ Requires-Dist: jinja2>=3.1.5; extra == "output-formatting"
1146
+ Requires-Dist: tabulate>=0.9.0; extra == "output-formatting"
1147
+ Provides-Extra: clipboard
1148
+ Requires-Dist: PyQt5>=5.15.9; extra == "clipboard"
1149
+ Requires-Dist: qtpy>=2.4.2; extra == "clipboard"
1150
+ Provides-Extra: compression
1151
+ Requires-Dist: zstandard>=0.23.0; extra == "compression"
1152
+ Provides-Extra: timezone
1153
+ Requires-Dist: pytz>=2024.2; extra == "timezone"
1154
+ Provides-Extra: all
1155
+ Requires-Dist: adbc-driver-postgresql>=1.2.0; extra == "all"
1156
+ Requires-Dist: adbc-driver-sqlite>=1.2.0; extra == "all"
1157
+ Requires-Dist: beautifulsoup4>=4.12.3; extra == "all"
1158
+ Requires-Dist: bottleneck>=1.4.2; extra == "all"
1159
+ Requires-Dist: fastparquet>=2024.11.0; extra == "all"
1160
+ Requires-Dist: fsspec>=2024.10.0; extra == "all"
1161
+ Requires-Dist: gcsfs>=2024.10.0; extra == "all"
1162
+ Requires-Dist: html5lib>=1.1; extra == "all"
1163
+ Requires-Dist: hypothesis>=6.116.0; extra == "all"
1164
+ Requires-Dist: jinja2>=3.1.5; extra == "all"
1165
+ Requires-Dist: lxml>=5.3.0; extra == "all"
1166
+ Requires-Dist: matplotlib>=3.9.3; extra == "all"
1167
+ Requires-Dist: numba>=0.60.0; extra == "all"
1168
+ Requires-Dist: numexpr>=2.10.2; extra == "all"
1169
+ Requires-Dist: odfpy>=1.4.1; extra == "all"
1170
+ Requires-Dist: openpyxl>=3.1.5; extra == "all"
1171
+ Requires-Dist: psycopg2>=2.9.10; extra == "all"
1172
+ Requires-Dist: pyarrow>=13.0.0; extra == "all"
1173
+ Requires-Dist: pyiceberg>=0.8.1; extra == "all"
1174
+ Requires-Dist: pymysql>=1.1.1; extra == "all"
1175
+ Requires-Dist: PyQt5>=5.15.9; extra == "all"
1176
+ Requires-Dist: pyreadstat>=1.2.8; extra == "all"
1177
+ Requires-Dist: pytest>=8.3.4; extra == "all"
1178
+ Requires-Dist: pytest-xdist>=3.6.1; extra == "all"
1179
+ Requires-Dist: python-calamine>=0.3.0; extra == "all"
1180
+ Requires-Dist: pytz>=2024.2; extra == "all"
1181
+ Requires-Dist: pyxlsb>=1.0.10; extra == "all"
1182
+ Requires-Dist: qtpy>=2.4.2; extra == "all"
1183
+ Requires-Dist: scipy>=1.14.1; extra == "all"
1184
+ Requires-Dist: s3fs>=2024.10.0; extra == "all"
1185
+ Requires-Dist: SQLAlchemy>=2.0.36; extra == "all"
1186
+ Requires-Dist: tables>=3.10.1; extra == "all"
1187
+ Requires-Dist: tabulate>=0.9.0; extra == "all"
1188
+ Requires-Dist: xarray>=2024.10.0; extra == "all"
1189
+ Requires-Dist: xlrd>=2.0.1; extra == "all"
1190
+ Requires-Dist: xlsxwriter>=3.2.0; extra == "all"
1191
+ Requires-Dist: zstandard>=0.23.0; extra == "all"
1192
+ Description-Content-Type: text/markdown
1193
+
1194
+ <picture align="center">
1195
+ <source media="(prefers-color-scheme: dark)" srcset="https://pandas.pydata.org/static/img/pandas_white.svg">
1196
+ <img alt="Pandas Logo" src="https://pandas.pydata.org/static/img/pandas.svg">
1197
+ </picture>
1198
+
1199
+ -----------------
1200
+
1201
+ # pandas: A Powerful Python Data Analysis Toolkit
1202
+
1203
+ | | |
1204
+ | --- | --- |
1205
+ | Testing | [![CI - Test](https://github.com/pandas-dev/pandas/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/pandas-dev/pandas/actions/workflows/unit-tests.yml) [![Coverage](https://codecov.io/github/pandas-dev/pandas/coverage.svg?branch=main)](https://codecov.io/gh/pandas-dev/pandas) |
1206
+ | Package | [![PyPI Latest Release](https://img.shields.io/pypi/v/pandas.svg)](https://pypi.org/project/pandas/) [![PyPI Downloads](https://img.shields.io/pypi/dm/pandas.svg?label=PyPI%20downloads)](https://pypi.org/project/pandas/) [![Conda Latest Release](https://anaconda.org/conda-forge/pandas/badges/version.svg)](https://anaconda.org/conda-forge/pandas) [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/pandas.svg?label=Conda%20downloads)](https://anaconda.org/conda-forge/pandas) |
1207
+ | Meta | [![Powered by NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](https://numfocus.org) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3509134.svg)](https://doi.org/10.5281/zenodo.3509134) [![License - BSD 3-Clause](https://img.shields.io/pypi/l/pandas.svg)](https://github.com/pandas-dev/pandas/blob/main/LICENSE) [![Slack](https://img.shields.io/badge/join_Slack-information-brightgreen.svg?logo=slack)](https://pandas.pydata.org/docs/dev/development/community.html?highlight=slack#community-slack) [![LFX Health Score](https://insights.linuxfoundation.org/api/badge/health-score?project=pandas-dev-pandas)](https://insights.linuxfoundation.org/project/pandas-dev-pandas) |
1208
+
1209
+
1210
+ ## What is it?
1211
+
1212
+ **pandas** is a Python package that provides fast, flexible, and expressive data
1213
+ structures designed to make working with "relational" or "labeled" data both
1214
+ easy and intuitive. It aims to be the fundamental high-level building block for
1215
+ doing practical, **real-world** data analysis in Python. Additionally, it has
1216
+ the broader goal of becoming **the most powerful and flexible open-source data
1217
+ analysis/manipulation tool available in any language**. It is already well on
1218
+ its way towards this goal.
1219
+
1220
+ ## Table of Contents
1221
+
1222
+ - [Main Features](#main-features)
1223
+ - [Where to get it](#where-to-get-it)
1224
+ - [Dependencies](#dependencies)
1225
+ - [Installation from sources](#installation-from-sources)
1226
+ - [License](#license)
1227
+ - [Documentation](#documentation)
1228
+ - [Background](#background)
1229
+ - [Getting Help](#getting-help)
1230
+ - [Discussion and Development](#discussion-and-development)
1231
+ - [Contributing to pandas](#contributing-to-pandas)
1232
+
1233
+ ## Main Features
1234
+ Here are just a few of the things that pandas does well:
1235
+
1236
+ - Easy handling of [**missing data**][missing-data] (represented as
1237
+ `NaN`, `NA`, or `NaT`) in floating point as well as non-floating point data
1238
+ - Size mutability: columns can be [**inserted and
1239
+ deleted**][insertion-deletion] from DataFrame and higher dimensional
1240
+ objects
1241
+ - Automatic and explicit [**data alignment**][alignment]: objects can
1242
+ be explicitly aligned to a set of labels, or the user can simply
1243
+ ignore the labels and let `Series`, `DataFrame`, etc. automatically
1244
+ align the data for you in computations
1245
+ - Powerful, flexible [**group by**][groupby] functionality to perform
1246
+ split-apply-combine operations on data sets, for both aggregating
1247
+ and transforming data
1248
+ - Make it [**easy to convert**][conversion] ragged,
1249
+ differently-indexed data in other Python and NumPy data structures
1250
+ into DataFrame objects
1251
+ - Intelligent label-based [**slicing**][slicing], [**fancy
1252
+ indexing**][fancy-indexing], and [**subsetting**][subsetting] of
1253
+ large data sets
1254
+ - Intuitive [**merging**][merging] and [**joining**][joining] data
1255
+ sets
1256
+ - Flexible [**reshaping**][reshape] and [**pivoting**][pivot-table] of
1257
+ data sets
1258
+ - [**Hierarchical**][mi] labeling of axes (possible to have multiple
1259
+ labels per tick)
1260
+ - Robust I/O tools for loading data from [**flat files**][flat-files]
1261
+ (CSV and delimited), [**Excel files**][excel], [**databases**][db],
1262
+ and saving/loading data from the ultrafast [**HDF5 format**][hdfstore]
1263
+ - [**Time series**][timeseries]-specific functionality: date range
1264
+ generation and frequency conversion, moving window statistics,
1265
+ date shifting and lagging
1266
+
1267
+
1268
+ [missing-data]: https://pandas.pydata.org/pandas-docs/stable/user_guide/missing_data.html
1269
+ [insertion-deletion]: https://pandas.pydata.org/pandas-docs/stable/user_guide/dsintro.html#column-selection-addition-deletion
1270
+ [alignment]: https://pandas.pydata.org/pandas-docs/stable/user_guide/dsintro.html?highlight=alignment#intro-to-data-structures
1271
+ [groupby]: https://pandas.pydata.org/pandas-docs/stable/user_guide/groupby.html#group-by-split-apply-combine
1272
+ [conversion]: https://pandas.pydata.org/pandas-docs/stable/user_guide/dsintro.html#dataframe
1273
+ [slicing]: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#slicing-ranges
1274
+ [fancy-indexing]: https://pandas.pydata.org/pandas-docs/stable/user_guide/advanced.html#advanced
1275
+ [subsetting]: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#boolean-indexing
1276
+ [merging]: https://pandas.pydata.org/pandas-docs/stable/user_guide/merging.html#database-style-dataframe-or-named-series-joining-merging
1277
+ [joining]: https://pandas.pydata.org/pandas-docs/stable/user_guide/merging.html#joining-on-index
1278
+ [reshape]: https://pandas.pydata.org/pandas-docs/stable/user_guide/reshaping.html
1279
+ [pivot-table]: https://pandas.pydata.org/pandas-docs/stable/user_guide/reshaping.html
1280
+ [mi]: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#hierarchical-indexing-multiindex
1281
+ [flat-files]: https://pandas.pydata.org/pandas-docs/stable/user_guide/io.html#csv-text-files
1282
+ [excel]: https://pandas.pydata.org/pandas-docs/stable/user_guide/io.html#excel-files
1283
+ [db]: https://pandas.pydata.org/pandas-docs/stable/user_guide/io.html#sql-queries
1284
+ [hdfstore]: https://pandas.pydata.org/pandas-docs/stable/user_guide/io.html#hdf5-pytables
1285
+ [timeseries]: https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#time-series-date-functionality
1286
+
1287
+ ## Where to get it
1288
+ The source code is currently hosted on GitHub at:
1289
+ https://github.com/pandas-dev/pandas
1290
+
1291
+ Binary installers for the latest released version are available at the [Python
1292
+ Package Index (PyPI)](https://pypi.org/project/pandas) and on [Conda](https://anaconda.org/conda-forge/pandas).
1293
+
1294
+ ```sh
1295
+ # conda
1296
+ conda install -c conda-forge pandas
1297
+ ```
1298
+
1299
+ ```sh
1300
+ # or PyPI
1301
+ pip install pandas
1302
+ ```
1303
+
1304
+ The list of changes to pandas between each release can be found
1305
+ [here](https://pandas.pydata.org/pandas-docs/stable/whatsnew/index.html). For full
1306
+ details, see the commit logs at https://github.com/pandas-dev/pandas.
1307
+
1308
+ ## Dependencies
1309
+ - [NumPy - Adds support for large, multi-dimensional arrays, matrices and high-level mathematical functions to operate on these arrays](https://www.numpy.org)
1310
+ - [python-dateutil - Provides powerful extensions to the standard datetime module](https://dateutil.readthedocs.io/en/stable/index.html)
1311
+ - [tzdata - Provides an IANA time zone database](https://tzdata.readthedocs.io/en/latest/) (Only required on Windows/Emscripten)
1312
+
1313
+ See the [full installation instructions](https://pandas.pydata.org/pandas-docs/stable/install.html#dependencies) for minimum supported versions of required, recommended and optional dependencies.
1314
+
1315
+ ## Installation from sources
1316
+ To install pandas from source you need [Cython](https://cython.org/) in addition to the normal
1317
+ dependencies above. Cython can be installed from PyPI:
1318
+
1319
+ ```sh
1320
+ pip install cython
1321
+ ```
1322
+
1323
+ In the `pandas` directory (same one where you found this file after
1324
+ cloning the git repo), execute:
1325
+
1326
+ ```sh
1327
+ pip install .
1328
+ ```
1329
+
1330
+ or for installing in [development mode](https://pip.pypa.io/en/latest/cli/pip_install/#install-editable):
1331
+
1332
+
1333
+ ```sh
1334
+ python -m pip install -ve . --no-build-isolation --config-settings editable-verbose=true
1335
+ ```
1336
+
1337
+ See the full instructions for [installing from source](https://pandas.pydata.org/docs/dev/development/contributing_environment.html).
1338
+
1339
+ ## License
1340
+ [BSD 3](LICENSE)
1341
+
1342
+ ## Documentation
1343
+ The official documentation is hosted on [PyData.org](https://pandas.pydata.org/pandas-docs/stable/).
1344
+
1345
+ ## Background
1346
+ Work on ``pandas`` started at [AQR](https://www.aqr.com/) (a quantitative hedge fund) in 2008 and
1347
+ has been under active development since then.
1348
+
1349
+ ## Getting Help
1350
+
1351
+ For usage questions, the best place to go to is [Stack Overflow](https://stackoverflow.com/questions/tagged/pandas).
1352
+ Further, general questions and discussions can also take place on the [pydata mailing list](https://groups.google.com/forum/?fromgroups#!forum/pydata).
1353
+
1354
+ ## Discussion and Development
1355
+ Most development discussions take place on GitHub in this repo, via the [GitHub issue tracker](https://github.com/pandas-dev/pandas/issues).
1356
+
1357
+ Further, the [pandas-dev mailing list](https://mail.python.org/mailman/listinfo/pandas-dev) can also be used for specialized discussions or design issues, and a [Slack channel](https://pandas.pydata.org/docs/dev/development/community.html?highlight=slack#community-slack) is available for quick development related questions.
1358
+
1359
+ There are also frequent [community meetings](https://pandas.pydata.org/docs/dev/development/community.html#community-meeting) for project maintainers open to the community as well as monthly [new contributor meetings](https://pandas.pydata.org/docs/dev/development/community.html#new-contributor-meeting) to help support new contributors.
1360
+
1361
+ Additional information on the communication channels can be found on the [contributor community](https://pandas.pydata.org/docs/development/community.html) page.
1362
+
1363
+ ## Contributing to pandas
1364
+
1365
+ [![Open Source Helpers](https://www.codetriage.com/pandas-dev/pandas/badges/users.svg)](https://www.codetriage.com/pandas-dev/pandas)
1366
+
1367
+ All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome.
1368
+
1369
+ A detailed overview on how to contribute can be found in the **[contributing guide](https://pandas.pydata.org/docs/dev/development/contributing.html)**.
1370
+
1371
+ If you are simply looking to start working with the pandas codebase, navigate to the [GitHub "issues" tab](https://github.com/pandas-dev/pandas/issues) and start looking through interesting issues. There are a number of issues listed under [Docs](https://github.com/pandas-dev/pandas/issues?q=is%3Aissue%20state%3Aopen%20label%3ADocs%20sort%3Aupdated-desc) and [good first issue](https://github.com/pandas-dev/pandas/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22good%20first%20issue%22%20sort%3Aupdated-desc) where you could start out.
1372
+
1373
+ You can also triage issues which may include reproducing bug reports, or asking for vital information such as version numbers or reproduction instructions. If you would like to start triaging issues, one easy way to get started is to [subscribe to pandas on CodeTriage](https://www.codetriage.com/pandas-dev/pandas).
1374
+
1375
+ Or maybe through using pandas you have an idea of your own or are looking for something in the documentation and thinking ‘this can be improved’... you can do something about it!
1376
+
1377
+ Feel free to ask questions on the [mailing list](https://groups.google.com/forum/?fromgroups#!forum/pydata) or on [Slack](https://pandas.pydata.org/docs/dev/development/community.html?highlight=slack#community-slack).
1378
+
1379
+ As contributors and maintainers to this project, you are expected to abide by pandas' code of conduct. More information can be found at: [Contributor Code of Conduct](https://github.com/pandas-dev/.github/blob/master/CODE_OF_CONDUCT.md)
1380
+
1381
+ <hr>
1382
+
1383
+ [Go to Top](#table-of-contents)
.cache/pip/http-v2/4/4/a/d/5/44ad51ab4fe732177892254938ca19df59a19add805fe17b3b22c658 ADDED
Binary file (1.2 kB). View file
 
.cache/pip/http-v2/4/4/a/d/5/44ad51ab4fe732177892254938ca19df59a19add805fe17b3b22c658.body ADDED
@@ -0,0 +1,1595 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Metadata-Version: 2.4
2
+ Name: tqdm
3
+ Version: 4.67.3
4
+ Summary: Fast, Extensible Progress Meter
5
+ Maintainer-email: tqdm developers <devs@tqdm.ml>
6
+ License: MPL-2.0 AND MIT
7
+ Project-URL: homepage, https://tqdm.github.io
8
+ Project-URL: repository, https://github.com/tqdm/tqdm
9
+ Project-URL: changelog, https://tqdm.github.io/releases
10
+ Project-URL: wiki, https://github.com/tqdm/tqdm/wiki
11
+ Keywords: progressbar,progressmeter,progress,bar,meter,rate,eta,console,terminal,time
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Environment :: Console
14
+ Classifier: Environment :: MacOS X
15
+ Classifier: Environment :: Other Environment
16
+ Classifier: Environment :: Win32 (MS Windows)
17
+ Classifier: Environment :: X11 Applications
18
+ Classifier: Framework :: IPython
19
+ Classifier: Framework :: Jupyter
20
+ Classifier: Intended Audience :: Developers
21
+ Classifier: Intended Audience :: Education
22
+ Classifier: Intended Audience :: End Users/Desktop
23
+ Classifier: Intended Audience :: Other Audience
24
+ Classifier: Intended Audience :: System Administrators
25
+ Classifier: Operating System :: MacOS
26
+ Classifier: Operating System :: MacOS :: MacOS X
27
+ Classifier: Operating System :: Microsoft
28
+ Classifier: Operating System :: Microsoft :: MS-DOS
29
+ Classifier: Operating System :: Microsoft :: Windows
30
+ Classifier: Operating System :: POSIX
31
+ Classifier: Operating System :: POSIX :: BSD
32
+ Classifier: Operating System :: POSIX :: BSD :: FreeBSD
33
+ Classifier: Operating System :: POSIX :: Linux
34
+ Classifier: Operating System :: POSIX :: SunOS/Solaris
35
+ Classifier: Operating System :: Unix
36
+ Classifier: Programming Language :: Python
37
+ Classifier: Programming Language :: Python :: 3
38
+ Classifier: Programming Language :: Python :: 3.7
39
+ Classifier: Programming Language :: Python :: 3.8
40
+ Classifier: Programming Language :: Python :: 3.9
41
+ Classifier: Programming Language :: Python :: 3.10
42
+ Classifier: Programming Language :: Python :: 3.11
43
+ Classifier: Programming Language :: Python :: 3.12
44
+ Classifier: Programming Language :: Python :: 3.13
45
+ Classifier: Programming Language :: Python :: 3 :: Only
46
+ Classifier: Programming Language :: Python :: Implementation
47
+ Classifier: Programming Language :: Python :: Implementation :: IronPython
48
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
49
+ Classifier: Programming Language :: Unix Shell
50
+ Classifier: Topic :: Desktop Environment
51
+ Classifier: Topic :: Education :: Computer Aided Instruction (CAI)
52
+ Classifier: Topic :: Education :: Testing
53
+ Classifier: Topic :: Office/Business
54
+ Classifier: Topic :: Other/Nonlisted Topic
55
+ Classifier: Topic :: Software Development :: Build Tools
56
+ Classifier: Topic :: Software Development :: Libraries
57
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
58
+ Classifier: Topic :: Software Development :: Pre-processors
59
+ Classifier: Topic :: Software Development :: User Interfaces
60
+ Classifier: Topic :: System :: Installation/Setup
61
+ Classifier: Topic :: System :: Logging
62
+ Classifier: Topic :: System :: Monitoring
63
+ Classifier: Topic :: System :: Shells
64
+ Classifier: Topic :: Terminals
65
+ Classifier: Topic :: Utilities
66
+ Requires-Python: >=3.7
67
+ Description-Content-Type: text/x-rst
68
+ License-File: LICENCE
69
+ Requires-Dist: colorama; platform_system == "Windows"
70
+ Requires-Dist: importlib_metadata; python_version < "3.8"
71
+ Provides-Extra: dev
72
+ Requires-Dist: pytest>=6; extra == "dev"
73
+ Requires-Dist: pytest-cov; extra == "dev"
74
+ Requires-Dist: pytest-timeout; extra == "dev"
75
+ Requires-Dist: pytest-asyncio>=0.24; extra == "dev"
76
+ Requires-Dist: nbval; extra == "dev"
77
+ Provides-Extra: discord
78
+ Requires-Dist: requests; extra == "discord"
79
+ Provides-Extra: slack
80
+ Requires-Dist: slack-sdk; extra == "slack"
81
+ Provides-Extra: telegram
82
+ Requires-Dist: requests; extra == "telegram"
83
+ Provides-Extra: notebook
84
+ Requires-Dist: ipywidgets>=6; extra == "notebook"
85
+ Dynamic: license-file
86
+
87
+ |Logo|
88
+
89
+ tqdm
90
+ ====
91
+
92
+ |Py-Versions| |Versions| |Conda-Forge-Status| |Docker| |Snapcraft|
93
+
94
+ |Build-Status| |Coverage-Status| |Branch-Coverage-Status| |Codacy-Grade| |Libraries-Rank| |PyPI-Downloads|
95
+
96
+ |LICENCE| |OpenHub-Status| |binder-demo| |awesome-python|
97
+
98
+ ``tqdm`` derives from the Arabic word *taqaddum* (تقدّم) which can mean "progress,"
99
+ and is an abbreviation for "I love you so much" in Spanish (*te quiero demasiado*).
100
+
101
+ Instantly make your loops show a smart progress meter - just wrap any
102
+ iterable with ``tqdm(iterable)``, and you're done!
103
+
104
+ .. code:: python
105
+
106
+ from tqdm import tqdm
107
+ for i in tqdm(range(10000)):
108
+ ...
109
+
110
+ ``76%|████████████████████████        | 7568/10000 [00:33<00:10, 229.00it/s]``
111
+
112
+ ``trange(N)`` can be also used as a convenient shortcut for
113
+ ``tqdm(range(N))``.
114
+
115
+ |Screenshot|
116
+ |Video| |Slides| |Merch|
117
+
118
+ It can also be executed as a module with pipes:
119
+
120
+ .. code:: sh
121
+
122
+ $ seq 9999999 | tqdm --bytes | wc -l
123
+ 75.2MB [00:00, 217MB/s]
124
+ 9999999
125
+
126
+ $ tar -zcf - docs/ | tqdm --bytes --total `du -sb docs/ | cut -f1` \
127
+ > backup.tgz
128
+ 32%|██████████▍ | 8.89G/27.9G [00:42<01:31, 223MB/s]
129
+
130
+ Overhead is low -- about 60ns per iteration (80ns with ``tqdm.gui``), and is
131
+ unit tested against performance regression.
132
+ By comparison, the well-established
133
+ `ProgressBar <https://github.com/niltonvolpato/python-progressbar>`__ has
134
+ an 800ns/iter overhead.
135
+
136
+ In addition to its low overhead, ``tqdm`` uses smart algorithms to predict
137
+ the remaining time and to skip unnecessary iteration displays, which allows
138
+ for a negligible overhead in most cases.
139
+
140
+ ``tqdm`` works on any platform
141
+ (Linux, Windows, Mac, FreeBSD, NetBSD, Solaris/SunOS),
142
+ in any console or in a GUI, and is also friendly with IPython/Jupyter notebooks.
143
+
144
+ ``tqdm`` does not require any dependencies (not even ``curses``!), just
145
+ Python and an environment supporting ``carriage return \r`` and
146
+ ``line feed \n`` control characters.
147
+
148
+ ------------------------------------------
149
+
150
+ .. contents:: Table of contents
151
+ :backlinks: top
152
+ :local:
153
+
154
+
155
+ Installation
156
+ ------------
157
+
158
+ Latest PyPI stable release
159
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
160
+
161
+ |Versions| |PyPI-Downloads| |Libraries-Dependents|
162
+
163
+ .. code:: sh
164
+
165
+ pip install tqdm
166
+
167
+ Latest development release on GitHub
168
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
169
+
170
+ |GitHub-Status| |GitHub-Stars| |GitHub-Commits| |GitHub-Forks| |GitHub-Updated|
171
+
172
+ Pull and install pre-release ``devel`` branch:
173
+
174
+ .. code:: sh
175
+
176
+ pip install "git+https://github.com/tqdm/tqdm.git@devel#egg=tqdm"
177
+
178
+ Latest Conda release
179
+ ~~~~~~~~~~~~~~~~~~~~
180
+
181
+ |Conda-Forge-Status|
182
+
183
+ .. code:: sh
184
+
185
+ conda install -c conda-forge tqdm
186
+
187
+ Latest Snapcraft release
188
+ ~~~~~~~~~~~~~~~~~~~~~~~~
189
+
190
+ |Snapcraft|
191
+
192
+ There are 3 channels to choose from:
193
+
194
+ .. code:: sh
195
+
196
+ snap install tqdm # implies --stable, i.e. latest tagged release
197
+ snap install tqdm --candidate # master branch
198
+ snap install tqdm --edge # devel branch
199
+
200
+ Note that ``snap`` binaries are purely for CLI use (not ``import``-able), and
201
+ automatically set up ``bash`` tab-completion.
202
+
203
+ Latest Docker release
204
+ ~~~~~~~~~~~~~~~~~~~~~
205
+
206
+ |Docker|
207
+
208
+ .. code:: sh
209
+
210
+ docker pull tqdm/tqdm
211
+ docker run -i --rm tqdm/tqdm --help
212
+
213
+ Other
214
+ ~~~~~
215
+
216
+ There are other (unofficial) places where ``tqdm`` may be downloaded, particularly for CLI use:
217
+
218
+ |Repology|
219
+
220
+ .. |Repology| image:: https://repology.org/badge/tiny-repos/python:tqdm.svg
221
+ :target: https://repology.org/project/python:tqdm/versions
222
+
223
+ Changelog
224
+ ---------
225
+
226
+ The list of all changes is available either on GitHub's Releases:
227
+ |GitHub-Status|, on the
228
+ `wiki <https://github.com/tqdm/tqdm/wiki/Releases>`__, or on the
229
+ `website <https://tqdm.github.io/releases>`__.
230
+
231
+
232
+ Usage
233
+ -----
234
+
235
+ ``tqdm`` is very versatile and can be used in a number of ways.
236
+ The three main ones are given below.
237
+
238
+ Iterable-based
239
+ ~~~~~~~~~~~~~~
240
+
241
+ Wrap ``tqdm()`` around any iterable:
242
+
243
+ .. code:: python
244
+
245
+ from tqdm import tqdm
246
+ from time import sleep
247
+
248
+ text = ""
249
+ for char in tqdm(["a", "b", "c", "d"]):
250
+ sleep(0.25)
251
+ text = text + char
252
+
253
+ ``trange(i)`` is a special optimised instance of ``tqdm(range(i))``:
254
+
255
+ .. code:: python
256
+
257
+ from tqdm import trange
258
+
259
+ for i in trange(100):
260
+ sleep(0.01)
261
+
262
+ Instantiation outside of the loop allows for manual control over ``tqdm()``:
263
+
264
+ .. code:: python
265
+
266
+ pbar = tqdm(["a", "b", "c", "d"])
267
+ for char in pbar:
268
+ sleep(0.25)
269
+ pbar.set_description("Processing %s" % char)
270
+
271
+ Manual
272
+ ~~~~~~
273
+
274
+ Manual control of ``tqdm()`` updates using a ``with`` statement:
275
+
276
+ .. code:: python
277
+
278
+ with tqdm(total=100) as pbar:
279
+ for i in range(10):
280
+ sleep(0.1)
281
+ pbar.update(10)
282
+
283
+ If the optional variable ``total`` (or an iterable with ``len()``) is
284
+ provided, predictive stats are displayed.
285
+
286
+ ``with`` is also optional (you can just assign ``tqdm()`` to a variable,
287
+ but in this case don't forget to ``del`` or ``close()`` at the end:
288
+
289
+ .. code:: python
290
+
291
+ pbar = tqdm(total=100)
292
+ for i in range(10):
293
+ sleep(0.1)
294
+ pbar.update(10)
295
+ pbar.close()
296
+
297
+ Module
298
+ ~~~~~~
299
+
300
+ Perhaps the most wonderful use of ``tqdm`` is in a script or on the command
301
+ line. Simply inserting ``tqdm`` (or ``python -m tqdm``) between pipes will pass
302
+ through all ``stdin`` to ``stdout`` while printing progress to ``stderr``.
303
+
304
+ The example below demonstrate counting the number of lines in all Python files
305
+ in the current directory, with timing information included.
306
+
307
+ .. code:: sh
308
+
309
+ $ time find . -name '*.py' -type f -exec cat \{} \; | wc -l
310
+ 857365
311
+
312
+ real 0m3.458s
313
+ user 0m0.274s
314
+ sys 0m3.325s
315
+
316
+ $ time find . -name '*.py' -type f -exec cat \{} \; | tqdm | wc -l
317
+ 857366it [00:03, 246471.31it/s]
318
+ 857365
319
+
320
+ real 0m3.585s
321
+ user 0m0.862s
322
+ sys 0m3.358s
323
+
324
+ Note that the usual arguments for ``tqdm`` can also be specified.
325
+
326
+ .. code:: sh
327
+
328
+ $ find . -name '*.py' -type f -exec cat \{} \; |
329
+ tqdm --unit loc --unit_scale --total 857366 >> /dev/null
330
+ 100%|█████████████████████████████████| 857K/857K [00:04<00:00, 246Kloc/s]
331
+
332
+ Backing up a large directory?
333
+
334
+ .. code:: sh
335
+
336
+ $ tar -zcf - docs/ | tqdm --bytes --total `du -sb docs/ | cut -f1` \
337
+ > backup.tgz
338
+ 44%|██████████████▊ | 153M/352M [00:14<00:18, 11.0MB/s]
339
+
340
+ This can be beautified further:
341
+
342
+ .. code:: sh
343
+
344
+ $ BYTES=$(du -sb docs/ | cut -f1)
345
+ $ tar -cf - docs/ \
346
+ | tqdm --bytes --total "$BYTES" --desc Processing | gzip \
347
+ | tqdm --bytes --total "$BYTES" --desc Compressed --position 1 \
348
+ > ~/backup.tgz
349
+ Processing: 100%|██████████████████████| 352M/352M [00:14<00:00, 30.2MB/s]
350
+ Compressed: 42%|█████████▎ | 148M/352M [00:14<00:19, 10.9MB/s]
351
+
352
+ Or done on a file level using 7-zip:
353
+
354
+ .. code:: sh
355
+
356
+ $ 7z a -bd -r backup.7z docs/ | grep Compressing \
357
+ | tqdm --total $(find docs/ -type f | wc -l) --unit files \
358
+ | grep -v Compressing
359
+ 100%|██████████████████████████▉| 15327/15327 [01:00<00:00, 712.96files/s]
360
+
361
+ Pre-existing CLI programs already outputting basic progress information will
362
+ benefit from ``tqdm``'s ``--update`` and ``--update_to`` flags:
363
+
364
+ .. code:: sh
365
+
366
+ $ seq 3 0.1 5 | tqdm --total 5 --update_to --null
367
+ 100%|████████████████████████████████████| 5.0/5 [00:00<00:00, 9673.21it/s]
368
+ $ seq 10 | tqdm --update --null # 1 + 2 + ... + 10 = 55 iterations
369
+ 55it [00:00, 90006.52it/s]
370
+
371
+ FAQ and Known Issues
372
+ --------------------
373
+
374
+ |GitHub-Issues|
375
+
376
+ The most common issues relate to excessive output on multiple lines, instead
377
+ of a neat one-line progress bar.
378
+
379
+ - Consoles in general: require support for carriage return (``CR``, ``\r``).
380
+
381
+ * Some cloud logging consoles which don't support ``\r`` properly
382
+ (`cloudwatch <https://github.com/tqdm/tqdm/issues/966>`__,
383
+ `K8s <https://github.com/tqdm/tqdm/issues/1319>`__) may benefit from
384
+ ``export TQDM_POSITION=-1``.
385
+
386
+ - Nested progress bars:
387
+
388
+ * Consoles in general: require support for moving cursors up to the
389
+ previous line. For example,
390
+ `IDLE <https://github.com/tqdm/tqdm/issues/191#issuecomment-230168030>`__,
391
+ `ConEmu <https://github.com/tqdm/tqdm/issues/254>`__ and
392
+ `PyCharm <https://github.com/tqdm/tqdm/issues/203>`__ (also
393
+ `here <https://github.com/tqdm/tqdm/issues/208>`__,
394
+ `here <https://github.com/tqdm/tqdm/issues/307>`__, and
395
+ `here <https://github.com/tqdm/tqdm/issues/454#issuecomment-335416815>`__)
396
+ lack full support.
397
+ * Windows: additionally may require the Python module ``colorama``
398
+ to ensure nested bars stay within their respective lines.
399
+
400
+ - Unicode:
401
+
402
+ * Environments which report that they support unicode will have solid smooth
403
+ progressbars. The fallback is an ``ascii``-only bar.
404
+ * Windows consoles often only partially support unicode and thus
405
+ `often require explicit ascii=True <https://github.com/tqdm/tqdm/issues/454#issuecomment-335416815>`__
406
+ (also `here <https://github.com/tqdm/tqdm/issues/499>`__). This is due to
407
+ either normal-width unicode characters being incorrectly displayed as
408
+ "wide", or some unicode characters not rendering.
409
+
410
+ - Wrapping generators:
411
+
412
+ * Generator wrapper functions tend to hide the length of iterables.
413
+ ``tqdm`` does not.
414
+ * Replace ``tqdm(enumerate(...))`` with ``enumerate(tqdm(...))`` or
415
+ ``tqdm(enumerate(x), total=len(x), ...)``.
416
+ The same applies to ``numpy.ndenumerate``.
417
+ * Replace ``tqdm(zip(a, b))`` with ``zip(tqdm(a), b)`` or even
418
+ ``zip(tqdm(a), tqdm(b))``.
419
+ * The same applies to ``itertools``.
420
+ * Some useful convenience functions can be found under ``tqdm.contrib``.
421
+
422
+ - `No intermediate output in docker-compose <https://github.com/tqdm/tqdm/issues/771>`__:
423
+ use ``docker-compose run`` instead of ``docker-compose up`` and ``tty: true``.
424
+
425
+ - Overriding defaults via environment variables:
426
+ e.g. in CI/cloud jobs, ``export TQDM_MININTERVAL=5`` to avoid log spam.
427
+ This override logic is handled by the ``tqdm.utils.envwrap`` decorator
428
+ (useful independent of ``tqdm``).
429
+
430
+ If you come across any other difficulties, browse and file |GitHub-Issues|.
431
+
432
+ Documentation
433
+ -------------
434
+
435
+ |Py-Versions| |README-Hits| (Since 19 May 2016)
436
+
437
+ .. code:: python
438
+
439
+ class tqdm():
440
+ """
441
+ Decorate an iterable object, returning an iterator which acts exactly
442
+ like the original iterable, but prints a dynamically updating
443
+ progressbar every time a value is requested.
444
+ """
445
+
446
+ @envwrap("TQDM_") # override defaults via env vars
447
+ def __init__(self, iterable=None, desc=None, total=None, leave=True,
448
+ file=None, ncols=None, mininterval=0.1,
449
+ maxinterval=10.0, miniters=None, ascii=None, disable=False,
450
+ unit='it', unit_scale=False, dynamic_ncols=False,
451
+ smoothing=0.3, bar_format=None, initial=0, position=None,
452
+ postfix=None, unit_divisor=1000, write_bytes=False,
453
+ lock_args=None, nrows=None, colour=None, delay=0):
454
+
455
+ Parameters
456
+ ~~~~~~~~~~
457
+
458
+ * iterable : iterable, optional
459
+ Iterable to decorate with a progressbar.
460
+ Leave blank to manually manage the updates.
461
+ * desc : str, optional
462
+ Prefix for the progressbar.
463
+ * total : int or float, optional
464
+ The number of expected iterations. If unspecified,
465
+ len(iterable) is used if possible. If float("inf") or as a last
466
+ resort, only basic progress statistics are displayed
467
+ (no ETA, no progressbar).
468
+ If ``gui`` is True and this parameter needs subsequent updating,
469
+ specify an initial arbitrary large positive number,
470
+ e.g. 9e9.
471
+ * leave : bool, optional
472
+ If [default: True], keeps all traces of the progressbar
473
+ upon termination of iteration.
474
+ If ``None``, will leave only if ``position`` is ``0``.
475
+ * file : ``io.TextIOWrapper`` or ``io.StringIO``, optional
476
+ Specifies where to output the progress messages
477
+ (default: sys.stderr). Uses ``file.write(str)`` and ``file.flush()``
478
+ methods. For encoding, see ``write_bytes``.
479
+ * ncols : int, optional
480
+ The width of the entire output message. If specified,
481
+ dynamically resizes the progressbar to stay within this bound.
482
+ If unspecified, attempts to use environment width. The
483
+ fallback is a meter width of 10 and no limit for the counter and
484
+ statistics. If 0, will not print any meter (only stats).
485
+ * mininterval : float, optional
486
+ Minimum progress display update interval [default: 0.1] seconds.
487
+ * maxinterval : float, optional
488
+ Maximum progress display update interval [default: 10] seconds.
489
+ Automatically adjusts ``miniters`` to correspond to ``mininterval``
490
+ after long display update lag. Only works if ``dynamic_miniters``
491
+ or monitor thread is enabled.
492
+ * miniters : int or float, optional
493
+ Minimum progress display update interval, in iterations.
494
+ If 0 and ``dynamic_miniters``, will automatically adjust to equal
495
+ ``mininterval`` (more CPU efficient, good for tight loops).
496
+ If > 0, will skip display of specified number of iterations.
497
+ Tweak this and ``mininterval`` to get very efficient loops.
498
+ If your progress is erratic with both fast and slow iterations
499
+ (network, skipping items, etc) you should set miniters=1.
500
+ * ascii : bool or str, optional
501
+ If unspecified or False, use unicode (smooth blocks) to fill
502
+ the meter. The fallback is to use ASCII characters " 123456789#".
503
+ * disable : bool, optional
504
+ Whether to disable the entire progressbar wrapper
505
+ [default: False]. If set to None, disable on non-TTY.
506
+ * unit : str, optional
507
+ String that will be used to define the unit of each iteration
508
+ [default: it].
509
+ * unit_scale : bool or int or float, optional
510
+ If 1 or True, the number of iterations will be reduced/scaled
511
+ automatically and a metric prefix following the
512
+ International System of Units standard will be added
513
+ (kilo, mega, etc.) [default: False]. If any other non-zero
514
+ number, will scale ``total`` and ``n``.
515
+ * dynamic_ncols : bool, optional
516
+ If set, constantly alters ``ncols`` and ``nrows`` to the
517
+ environment (allowing for window resizes) [default: False].
518
+ * smoothing : float, optional
519
+ Exponential moving average smoothing factor for speed estimates
520
+ (ignored in GUI mode). Ranges from 0 (average speed) to 1
521
+ (current/instantaneous speed) [default: 0.3].
522
+ * bar_format : str, optional
523
+ Specify a custom bar string formatting. May impact performance.
524
+ [default: '{l_bar}{bar}{r_bar}'], where
525
+ l_bar='{desc}: {percentage:3.0f}%|' and
526
+ r_bar='| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, '
527
+ '{rate_fmt}{postfix}]'
528
+ Possible vars: l_bar, bar, r_bar, n, n_fmt, total, total_fmt,
529
+ percentage, elapsed, elapsed_s, ncols, nrows, desc, unit,
530
+ rate, rate_fmt, rate_noinv, rate_noinv_fmt,
531
+ rate_inv, rate_inv_fmt, postfix, unit_divisor,
532
+ remaining, remaining_s, eta.
533
+ Note that a trailing ": " is automatically removed after {desc}
534
+ if the latter is empty.
535
+ * initial : int or float, optional
536
+ The initial counter value. Useful when restarting a progress
537
+ bar [default: 0]. If using float, consider specifying ``{n:.3f}``
538
+ or similar in ``bar_format``, or specifying ``unit_scale``.
539
+ * position : int, optional
540
+ Specify the line offset to print this bar (starting from 0)
541
+ Automatic if unspecified.
542
+ Useful to manage multiple bars at once (eg, from threads).
543
+ * postfix : dict or ``*``, optional
544
+ Specify additional stats to display at the end of the bar.
545
+ Calls ``set_postfix(**postfix)`` if possible (dict).
546
+ * unit_divisor : float, optional
547
+ [default: 1000], ignored unless ``unit_scale`` is True.
548
+ * write_bytes : bool, optional
549
+ Whether to write bytes. If (default: False) will write unicode.
550
+ * lock_args : tuple, optional
551
+ Passed to ``refresh`` for intermediate output
552
+ (initialisation, iterating, and updating).
553
+ * nrows : int, optional
554
+ The screen height. If specified, hides nested bars outside this
555
+ bound. If unspecified, attempts to use environment height.
556
+ The fallback is 20.
557
+ * colour : str, optional
558
+ Bar colour (e.g. 'green', '#00ff00').
559
+ * delay : float, optional
560
+ Don't display until [default: 0] seconds have elapsed.
561
+
562
+ Extra CLI Options
563
+ ~~~~~~~~~~~~~~~~~
564
+
565
+ * delim : chr, optional
566
+ Delimiting character [default: '\n']. Use '\0' for null.
567
+ N.B.: on Windows systems, Python converts '\n' to '\r\n'.
568
+ * buf_size : int, optional
569
+ String buffer size in bytes [default: 256]
570
+ used when ``delim`` is specified.
571
+ * bytes : bool, optional
572
+ If true, will count bytes, ignore ``delim``, and default
573
+ ``unit_scale`` to True, ``unit_divisor`` to 1024, and ``unit`` to 'B'.
574
+ * tee : bool, optional
575
+ If true, passes ``stdin`` to both ``stderr`` and ``stdout``.
576
+ * update : bool, optional
577
+ If true, will treat input as newly elapsed iterations,
578
+ i.e. numbers to pass to ``update()``. Note that this is slow
579
+ (~2e5 it/s) since every input must be decoded as a number.
580
+ * update_to : bool, optional
581
+ If true, will treat input as total elapsed iterations,
582
+ i.e. numbers to assign to ``self.n``. Note that this is slow
583
+ (~2e5 it/s) since every input must be decoded as a number.
584
+ * null : bool, optional
585
+ If true, will discard input (no stdout).
586
+ * manpath : str, optional
587
+ Directory in which to install tqdm man pages.
588
+ * comppath : str, optional
589
+ Directory in which to place tqdm completion.
590
+ * log : str, optional
591
+ CRITICAL|FATAL|ERROR|WARN(ING)|[default: 'INFO']|DEBUG|NOTSET.
592
+
593
+ Returns
594
+ ~~~~~~~
595
+
596
+ * out : decorated iterator.
597
+
598
+ .. code:: python
599
+
600
+ class tqdm():
601
+ def update(self, n=1):
602
+ """
603
+ Manually update the progress bar, useful for streams
604
+ such as reading files.
605
+ E.g.:
606
+ >>> t = tqdm(total=filesize) # Initialise
607
+ >>> for current_buffer in stream:
608
+ ... ...
609
+ ... t.update(len(current_buffer))
610
+ >>> t.close()
611
+ The last line is highly recommended, but possibly not necessary if
612
+ ``t.update()`` will be called in such a way that ``filesize`` will be
613
+ exactly reached and printed.
614
+
615
+ Parameters
616
+ ----------
617
+ n : int or float, optional
618
+ Increment to add to the internal counter of iterations
619
+ [default: 1]. If using float, consider specifying ``{n:.3f}``
620
+ or similar in ``bar_format``, or specifying ``unit_scale``.
621
+
622
+ Returns
623
+ -------
624
+ out : bool or None
625
+ True if a ``display()`` was triggered.
626
+ """
627
+
628
+ def close(self):
629
+ """Cleanup and (if leave=False) close the progressbar."""
630
+
631
+ def clear(self, nomove=False):
632
+ """Clear current bar display."""
633
+
634
+ def refresh(self):
635
+ """
636
+ Force refresh the display of this bar.
637
+
638
+ Parameters
639
+ ----------
640
+ nolock : bool, optional
641
+ If ``True``, does not lock.
642
+ If [default: ``False``]: calls ``acquire()`` on internal lock.
643
+ lock_args : tuple, optional
644
+ Passed to internal lock's ``acquire()``.
645
+ If specified, will only ``display()`` if ``acquire()`` returns ``True``.
646
+ """
647
+
648
+ def unpause(self):
649
+ """Restart tqdm timer from last print time."""
650
+
651
+ def reset(self, total=None):
652
+ """
653
+ Resets to 0 iterations for repeated use.
654
+
655
+ Consider combining with ``leave=True``.
656
+
657
+ Parameters
658
+ ----------
659
+ total : int or float, optional. Total to use for the new bar.
660
+ """
661
+
662
+ def set_description(self, desc=None, refresh=True):
663
+ """
664
+ Set/modify description of the progress bar.
665
+
666
+ Parameters
667
+ ----------
668
+ desc : str, optional
669
+ refresh : bool, optional
670
+ Forces refresh [default: True].
671
+ """
672
+
673
+ def set_postfix(self, ordered_dict=None, refresh=True, **tqdm_kwargs):
674
+ """
675
+ Set/modify postfix (additional stats)
676
+ with automatic formatting based on datatype.
677
+
678
+ Parameters
679
+ ----------
680
+ ordered_dict : dict or OrderedDict, optional
681
+ refresh : bool, optional
682
+ Forces refresh [default: True].
683
+ kwargs : dict, optional
684
+ """
685
+
686
+ @classmethod
687
+ def write(cls, s, file=sys.stdout, end="\n"):
688
+ """Print a message via tqdm (without overlap with bars)."""
689
+
690
+ @property
691
+ def format_dict(self):
692
+ """Public API for read-only member access."""
693
+
694
+ def display(self, msg=None, pos=None):
695
+ """
696
+ Use ``self.sp`` to display ``msg`` in the specified ``pos``.
697
+
698
+ Consider overloading this function when inheriting to use e.g.:
699
+ ``self.some_frontend(**self.format_dict)`` instead of ``self.sp``.
700
+
701
+ Parameters
702
+ ----------
703
+ msg : str, optional. What to display (default: ``repr(self)``).
704
+ pos : int, optional. Position to ``moveto``
705
+ (default: ``abs(self.pos)``).
706
+ """
707
+
708
+ @classmethod
709
+ @contextmanager
710
+ def wrapattr(cls, stream, method, total=None, bytes=True, **tqdm_kwargs):
711
+ """
712
+ stream : file-like object.
713
+ method : str, "read" or "write". The result of ``read()`` and
714
+ the first argument of ``write()`` should have a ``len()``.
715
+
716
+ >>> with tqdm.wrapattr(file_obj, "read", total=file_obj.size) as fobj:
717
+ ... while True:
718
+ ... chunk = fobj.read(chunk_size)
719
+ ... if not chunk:
720
+ ... break
721
+ """
722
+
723
+ @classmethod
724
+ def pandas(cls, *targs, **tqdm_kwargs):
725
+ """Registers the current `tqdm` class with `pandas`."""
726
+
727
+ def trange(*args, **tqdm_kwargs):
728
+ """Shortcut for `tqdm(range(*args), **tqdm_kwargs)`."""
729
+
730
+ Convenience Functions
731
+ ~~~~~~~~~~~~~~~~~~~~~
732
+
733
+ .. code:: python
734
+
735
+ def tqdm.contrib.tenumerate(iterable, start=0, total=None,
736
+ tqdm_class=tqdm.auto.tqdm, **tqdm_kwargs):
737
+ """Equivalent of `numpy.ndenumerate` or builtin `enumerate`."""
738
+
739
+ def tqdm.contrib.tzip(iter1, *iter2plus, **tqdm_kwargs):
740
+ """Equivalent of builtin `zip`."""
741
+
742
+ def tqdm.contrib.tmap(function, *sequences, **tqdm_kwargs):
743
+ """Equivalent of builtin `map`."""
744
+
745
+ Submodules
746
+ ~~~~~~~~~~
747
+
748
+ .. code:: python
749
+
750
+ class tqdm.notebook.tqdm(tqdm.tqdm):
751
+ """IPython/Jupyter Notebook widget."""
752
+
753
+ class tqdm.auto.tqdm(tqdm.tqdm):
754
+ """Automatically chooses beween `tqdm.notebook` and `tqdm.tqdm`."""
755
+
756
+ class tqdm.asyncio.tqdm(tqdm.tqdm):
757
+ """Asynchronous version."""
758
+ @classmethod
759
+ def as_completed(cls, fs, *, loop=None, timeout=None, total=None,
760
+ **tqdm_kwargs):
761
+ """Wrapper for `asyncio.as_completed`."""
762
+
763
+ class tqdm.gui.tqdm(tqdm.tqdm):
764
+ """Matplotlib GUI version."""
765
+
766
+ class tqdm.tk.tqdm(tqdm.tqdm):
767
+ """Tkinter GUI version."""
768
+
769
+ class tqdm.rich.tqdm(tqdm.tqdm):
770
+ """`rich.progress` version."""
771
+
772
+ class tqdm.keras.TqdmCallback(keras.callbacks.Callback):
773
+ """Keras callback for epoch and batch progress."""
774
+
775
+ class tqdm.dask.TqdmCallback(dask.callbacks.Callback):
776
+ """Dask callback for task progress."""
777
+
778
+
779
+ ``contrib``
780
+ +++++++++++
781
+
782
+ The ``tqdm.contrib`` package also contains experimental modules:
783
+
784
+ - ``tqdm.contrib.itertools``: Thin wrappers around ``itertools``
785
+ - ``tqdm.contrib.concurrent``: Thin wrappers around ``concurrent.futures``
786
+ - ``tqdm.contrib.slack``: Posts to `Slack <https://slack.com>`__ bots
787
+ - ``tqdm.contrib.discord``: Posts to `Discord <https://discord.com>`__ bots
788
+ - ``tqdm.contrib.telegram``: Posts to `Telegram <https://telegram.org>`__ bots
789
+ - ``tqdm.contrib.bells``: Automagically enables all optional features
790
+
791
+ * ``auto``, ``pandas``, ``slack``, ``discord``, ``telegram``
792
+
793
+ Examples and Advanced Usage
794
+ ---------------------------
795
+
796
+ - See the `examples <https://github.com/tqdm/tqdm/tree/master/examples>`__
797
+ folder;
798
+ - import the module and run ``help()``;
799
+ - consult the `wiki <https://github.com/tqdm/tqdm/wiki>`__;
800
+
801
+ * this has an
802
+ `excellent article <https://github.com/tqdm/tqdm/wiki/How-to-make-a-great-Progress-Bar>`__
803
+ on how to make a **great** progressbar;
804
+
805
+ - check out the `slides from PyData London <https://tqdm.github.io/PyData2019/slides.html>`__, or
806
+ - run the |binder-demo|.
807
+
808
+ Description and additional stats
809
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
810
+
811
+ Custom information can be displayed and updated dynamically on ``tqdm`` bars
812
+ with the ``desc`` and ``postfix`` arguments:
813
+
814
+ .. code:: python
815
+
816
+ from tqdm import tqdm, trange
817
+ from random import random, randint
818
+ from time import sleep
819
+
820
+ with trange(10) as t:
821
+ for i in t:
822
+ # Description will be displayed on the left
823
+ t.set_description('GEN %i' % i)
824
+ # Postfix will be displayed on the right,
825
+ # formatted automatically based on argument's datatype
826
+ t.set_postfix(loss=random(), gen=randint(1,999), str='h',
827
+ lst=[1, 2])
828
+ sleep(0.1)
829
+
830
+ with tqdm(total=10, bar_format="{postfix[0]} {postfix[1][value]:>8.2g}",
831
+ postfix=["Batch", {"value": 0}]) as t:
832
+ for i in range(10):
833
+ sleep(0.1)
834
+ t.postfix[1]["value"] = i / 2
835
+ t.update()
836
+
837
+ Points to remember when using ``{postfix[...]}`` in the ``bar_format`` string:
838
+
839
+ - ``postfix`` also needs to be passed as an initial argument in a compatible
840
+ format, and
841
+ - ``postfix`` will be auto-converted to a string if it is a ``dict``-like
842
+ object. To prevent this behaviour, insert an extra item into the dictionary
843
+ where the key is not a string.
844
+
845
+ Additional ``bar_format`` parameters may also be defined by overriding
846
+ ``format_dict``, and the bar itself may be modified using ``ascii``:
847
+
848
+ .. code:: python
849
+
850
+ from tqdm import tqdm
851
+ class TqdmExtraFormat(tqdm):
852
+ """Provides a `total_time` format parameter"""
853
+ @property
854
+ def format_dict(self):
855
+ d = super().format_dict
856
+ total_time = d["elapsed"] * (d["total"] or 0) / max(d["n"], 1)
857
+ d.update(total_time=self.format_interval(total_time) + " in total")
858
+ return d
859
+
860
+ for i in TqdmExtraFormat(
861
+ range(9), ascii=" .oO0",
862
+ bar_format="{total_time}: {percentage:.0f}%|{bar}{r_bar}"):
863
+ if i == 4:
864
+ break
865
+
866
+ .. code::
867
+
868
+ 00:00 in total: 44%|0000. | 4/9 [00:00<00:00, 962.93it/s]
869
+
870
+ Note that ``{bar}`` also supports a format specifier ``[width][type]``.
871
+
872
+ - ``width``
873
+
874
+ * unspecified (default): automatic to fill ``ncols``
875
+ * ``int >= 0``: fixed width overriding ``ncols`` logic
876
+ * ``int < 0``: subtract from the automatic default
877
+
878
+ - ``type``
879
+
880
+ * ``a``: ascii (``ascii=True`` override)
881
+ * ``u``: unicode (``ascii=False`` override)
882
+ * ``b``: blank (``ascii=" "`` override)
883
+
884
+ This means a fixed bar with right-justified text may be created by using:
885
+ ``bar_format="{l_bar}{bar:10}|{bar:-10b}right-justified"``
886
+
887
+ Nested progress bars
888
+ ~~~~~~~~~~~~~~~~~~~~
889
+
890
+ ``tqdm`` supports nested progress bars. Here's an example:
891
+
892
+ .. code:: python
893
+
894
+ from tqdm.auto import trange
895
+ from time import sleep
896
+
897
+ for i in trange(4, desc='1st loop'):
898
+ for j in trange(5, desc='2nd loop'):
899
+ for k in trange(50, desc='3rd loop', leave=False):
900
+ sleep(0.01)
901
+
902
+ For manual control over positioning (e.g. for multi-processing use),
903
+ you may specify ``position=n`` where ``n=0`` for the outermost bar,
904
+ ``n=1`` for the next, and so on.
905
+ However, it's best to check if ``tqdm`` can work without manual ``position``
906
+ first.
907
+
908
+ .. code:: python
909
+
910
+ from time import sleep
911
+ from tqdm import trange, tqdm
912
+ from multiprocessing import Pool, RLock, freeze_support
913
+
914
+ L = list(range(9))
915
+
916
+ def progresser(n):
917
+ interval = 0.001 / (n + 2)
918
+ total = 5000
919
+ text = f"#{n}, est. {interval * total:<04.2}s"
920
+ for _ in trange(total, desc=text, position=n):
921
+ sleep(interval)
922
+
923
+ if __name__ == '__main__':
924
+ freeze_support() # for Windows support
925
+ tqdm.set_lock(RLock()) # for managing output contention
926
+ p = Pool(initializer=tqdm.set_lock, initargs=(tqdm.get_lock(),))
927
+ p.map(progresser, L)
928
+
929
+ Note that in Python 3, ``tqdm.write`` is thread-safe:
930
+
931
+ .. code:: python
932
+
933
+ from time import sleep
934
+ from tqdm import tqdm, trange
935
+ from concurrent.futures import ThreadPoolExecutor
936
+
937
+ L = list(range(9))
938
+
939
+ def progresser(n):
940
+ interval = 0.001 / (n + 2)
941
+ total = 5000
942
+ text = f"#{n}, est. {interval * total:<04.2}s"
943
+ for _ in trange(total, desc=text):
944
+ sleep(interval)
945
+ if n == 6:
946
+ tqdm.write("n == 6 completed.")
947
+ tqdm.write("`tqdm.write()` is thread-safe in py3!")
948
+
949
+ if __name__ == '__main__':
950
+ with ThreadPoolExecutor() as p:
951
+ p.map(progresser, L)
952
+
953
+ Hooks and callbacks
954
+ ~~~~~~~~~~~~~~~~~~~
955
+
956
+ ``tqdm`` can easily support callbacks/hooks and manual updates.
957
+ Here's an example with ``urllib``:
958
+
959
+ **``urllib.urlretrieve`` documentation**
960
+
961
+ | [...]
962
+ | If present, the hook function will be called once
963
+ | on establishment of the network connection and once after each block read
964
+ | thereafter. The hook will be passed three arguments; a count of blocks
965
+ | transferred so far, a block size in bytes, and the total size of the file.
966
+ | [...]
967
+
968
+ .. code:: python
969
+
970
+ import urllib, os
971
+ from tqdm import tqdm
972
+ urllib = getattr(urllib, 'request', urllib)
973
+
974
+ class TqdmUpTo(tqdm):
975
+ """Provides `update_to(n)` which uses `tqdm.update(delta_n)`."""
976
+ def update_to(self, b=1, bsize=1, tsize=None):
977
+ """
978
+ b : int, optional
979
+ Number of blocks transferred so far [default: 1].
980
+ bsize : int, optional
981
+ Size of each block (in tqdm units) [default: 1].
982
+ tsize : int, optional
983
+ Total size (in tqdm units). If [default: None] remains unchanged.
984
+ """
985
+ if tsize is not None:
986
+ self.total = tsize
987
+ return self.update(b * bsize - self.n) # also sets self.n = b * bsize
988
+
989
+ eg_link = "https://caspersci.uk.to/matryoshka.zip"
990
+ with TqdmUpTo(unit='B', unit_scale=True, unit_divisor=1024, miniters=1,
991
+ desc=eg_link.split('/')[-1]) as t: # all optional kwargs
992
+ urllib.urlretrieve(eg_link, filename=os.devnull,
993
+ reporthook=t.update_to, data=None)
994
+ t.total = t.n
995
+
996
+ Inspired by `twine#242 <https://github.com/pypa/twine/pull/242>`__.
997
+ Functional alternative in
998
+ `examples/tqdm_wget.py <https://github.com/tqdm/tqdm/blob/master/examples/tqdm_wget.py>`__.
999
+
1000
+ It is recommend to use ``miniters=1`` whenever there is potentially
1001
+ large differences in iteration speed (e.g. downloading a file over
1002
+ a patchy connection).
1003
+
1004
+ **Wrapping read/write methods**
1005
+
1006
+ To measure throughput through a file-like object's ``read`` or ``write``
1007
+ methods, use ``CallbackIOWrapper``:
1008
+
1009
+ .. code:: python
1010
+
1011
+ from tqdm.auto import tqdm
1012
+ from tqdm.utils import CallbackIOWrapper
1013
+
1014
+ with tqdm(total=file_obj.size,
1015
+ unit='B', unit_scale=True, unit_divisor=1024) as t:
1016
+ fobj = CallbackIOWrapper(t.update, file_obj, "read")
1017
+ while True:
1018
+ chunk = fobj.read(chunk_size)
1019
+ if not chunk:
1020
+ break
1021
+ t.reset()
1022
+ # ... continue to use `t` for something else
1023
+
1024
+ Alternatively, use the even simpler ``wrapattr`` convenience function,
1025
+ which would condense both the ``urllib`` and ``CallbackIOWrapper`` examples
1026
+ down to:
1027
+
1028
+ .. code:: python
1029
+
1030
+ import urllib, os
1031
+ from tqdm import tqdm
1032
+
1033
+ eg_link = "https://caspersci.uk.to/matryoshka.zip"
1034
+ response = getattr(urllib, 'request', urllib).urlopen(eg_link)
1035
+ with tqdm.wrapattr(open(os.devnull, "wb"), "write",
1036
+ miniters=1, desc=eg_link.split('/')[-1],
1037
+ total=getattr(response, 'length', None)) as fout:
1038
+ for chunk in response:
1039
+ fout.write(chunk)
1040
+
1041
+ The ``requests`` equivalent is nearly identical:
1042
+
1043
+ .. code:: python
1044
+
1045
+ import requests, os
1046
+ from tqdm import tqdm
1047
+
1048
+ eg_link = "https://caspersci.uk.to/matryoshka.zip"
1049
+ response = requests.get(eg_link, stream=True)
1050
+ with tqdm.wrapattr(open(os.devnull, "wb"), "write",
1051
+ miniters=1, desc=eg_link.split('/')[-1],
1052
+ total=int(response.headers.get('content-length', 0))) as fout:
1053
+ for chunk in response.iter_content(chunk_size=4096):
1054
+ fout.write(chunk)
1055
+
1056
+ **Custom callback**
1057
+
1058
+ ``tqdm`` is known for intelligently skipping unnecessary displays. To make a
1059
+ custom callback take advantage of this, simply use the return value of
1060
+ ``update()``. This is set to ``True`` if a ``display()`` was triggered.
1061
+
1062
+ .. code:: python
1063
+
1064
+ from tqdm.auto import tqdm as std_tqdm
1065
+
1066
+ def external_callback(*args, **kwargs):
1067
+ ...
1068
+
1069
+ class TqdmExt(std_tqdm):
1070
+ def update(self, n=1):
1071
+ displayed = super().update(n)
1072
+ if displayed:
1073
+ external_callback(**self.format_dict)
1074
+ return displayed
1075
+
1076
+ ``asyncio``
1077
+ ~~~~~~~~~~~
1078
+
1079
+ Note that ``break`` isn't currently caught by asynchronous iterators.
1080
+ This means that ``tqdm`` cannot clean up after itself in this case:
1081
+
1082
+ .. code:: python
1083
+
1084
+ from tqdm.asyncio import tqdm
1085
+
1086
+ async for i in tqdm(range(9)):
1087
+ if i == 2:
1088
+ break
1089
+
1090
+ Instead, either call ``pbar.close()`` manually or use the context manager syntax:
1091
+
1092
+ .. code:: python
1093
+
1094
+ from tqdm.asyncio import tqdm
1095
+
1096
+ with tqdm(range(9)) as pbar:
1097
+ async for i in pbar:
1098
+ if i == 2:
1099
+ break
1100
+
1101
+ Pandas Integration
1102
+ ~~~~~~~~~~~~~~~~~~
1103
+
1104
+ Due to popular demand we've added support for ``pandas`` -- here's an example
1105
+ for ``DataFrame.progress_apply`` and ``DataFrameGroupBy.progress_apply``:
1106
+
1107
+ .. code:: python
1108
+
1109
+ import pandas as pd
1110
+ import numpy as np
1111
+ from tqdm import tqdm
1112
+
1113
+ df = pd.DataFrame(np.random.randint(0, 100, (100000, 6)))
1114
+
1115
+ # Register `pandas.progress_apply` and `pandas.Series.map_apply` with `tqdm`
1116
+ # (can use `tqdm.gui.tqdm`, `tqdm.notebook.tqdm`, optional kwargs, etc.)
1117
+ tqdm.pandas(desc="my bar!")
1118
+
1119
+ # Now you can use `progress_apply` instead of `apply`
1120
+ # and `progress_map` instead of `map`
1121
+ df.progress_apply(lambda x: x**2)
1122
+ # can also groupby:
1123
+ # df.groupby(0).progress_apply(lambda x: x**2)
1124
+
1125
+ In case you're interested in how this works (and how to modify it for your
1126
+ own callbacks), see the
1127
+ `examples <https://github.com/tqdm/tqdm/tree/master/examples>`__
1128
+ folder or import the module and run ``help()``.
1129
+
1130
+ Keras Integration
1131
+ ~~~~~~~~~~~~~~~~~
1132
+
1133
+ A ``keras`` callback is also available:
1134
+
1135
+ .. code:: python
1136
+
1137
+ from tqdm.keras import TqdmCallback
1138
+
1139
+ ...
1140
+
1141
+ model.fit(..., verbose=0, callbacks=[TqdmCallback()])
1142
+
1143
+ Dask Integration
1144
+ ~~~~~~~~~~~~~~~~
1145
+
1146
+ A ``dask`` callback is also available:
1147
+
1148
+ .. code:: python
1149
+
1150
+ from tqdm.dask import TqdmCallback
1151
+
1152
+ with TqdmCallback(desc="compute"):
1153
+ ...
1154
+ arr.compute()
1155
+
1156
+ # or use callback globally
1157
+ cb = TqdmCallback(desc="global")
1158
+ cb.register()
1159
+ arr.compute()
1160
+
1161
+ IPython/Jupyter Integration
1162
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1163
+
1164
+ IPython/Jupyter is supported via the ``tqdm.notebook`` submodule:
1165
+
1166
+ .. code:: python
1167
+
1168
+ from tqdm.notebook import trange, tqdm
1169
+ from time import sleep
1170
+
1171
+ for i in trange(3, desc='1st loop'):
1172
+ for j in tqdm(range(100), desc='2nd loop'):
1173
+ sleep(0.01)
1174
+
1175
+ In addition to ``tqdm`` features, the submodule provides a native Jupyter
1176
+ widget (compatible with IPython v1-v4 and Jupyter), fully working nested bars
1177
+ and colour hints (blue: normal, green: completed, red: error/interrupt,
1178
+ light blue: no ETA); as demonstrated below.
1179
+
1180
+ |Screenshot-Jupyter1|
1181
+ |Screenshot-Jupyter2|
1182
+ |Screenshot-Jupyter3|
1183
+
1184
+ The ``notebook`` version supports percentage or pixels for overall width
1185
+ (e.g.: ``ncols='100%'`` or ``ncols='480px'``).
1186
+
1187
+ It is also possible to let ``tqdm`` automatically choose between
1188
+ console or notebook versions by using the ``autonotebook`` submodule:
1189
+
1190
+ .. code:: python
1191
+
1192
+ from tqdm.autonotebook import tqdm
1193
+ tqdm.pandas()
1194
+
1195
+ Note that this will issue a ``TqdmExperimentalWarning`` if run in a notebook
1196
+ since it is not meant to be possible to distinguish between ``jupyter notebook``
1197
+ and ``jupyter console``. Use ``auto`` instead of ``autonotebook`` to suppress
1198
+ this warning.
1199
+
1200
+ Note that notebooks will display the bar in the cell where it was created.
1201
+ This may be a different cell from the one where it is used.
1202
+ If this is not desired, either
1203
+
1204
+ - delay the creation of the bar to the cell where it must be displayed, or
1205
+ - create the bar with ``display=False``, and in a later cell call
1206
+ ``display(bar.container)``:
1207
+
1208
+ .. code:: python
1209
+
1210
+ from tqdm.notebook import tqdm
1211
+ pbar = tqdm(..., display=False)
1212
+
1213
+ .. code:: python
1214
+
1215
+ # different cell
1216
+ display(pbar.container)
1217
+
1218
+ The ``keras`` callback has a ``display()`` method which can be used likewise:
1219
+
1220
+ .. code:: python
1221
+
1222
+ from tqdm.keras import TqdmCallback
1223
+ cbk = TqdmCallback(display=False)
1224
+
1225
+ .. code:: python
1226
+
1227
+ # different cell
1228
+ cbk.display()
1229
+ model.fit(..., verbose=0, callbacks=[cbk])
1230
+
1231
+ Another possibility is to have a single bar (near the top of the notebook)
1232
+ which is constantly re-used (using ``reset()`` rather than ``close()``).
1233
+ For this reason, the notebook version (unlike the CLI version) does not
1234
+ automatically call ``close()`` upon ``Exception``.
1235
+
1236
+ .. code:: python
1237
+
1238
+ from tqdm.notebook import tqdm
1239
+ pbar = tqdm()
1240
+
1241
+ .. code:: python
1242
+
1243
+ # different cell
1244
+ iterable = range(100)
1245
+ pbar.reset(total=len(iterable)) # initialise with new `total`
1246
+ for i in iterable:
1247
+ pbar.update()
1248
+ pbar.refresh() # force print final status but don't `close()`
1249
+
1250
+ Custom Integration
1251
+ ~~~~~~~~~~~~~~~~~~
1252
+
1253
+ To change the default arguments (such as making ``dynamic_ncols=True``),
1254
+ simply use built-in Python magic:
1255
+
1256
+ .. code:: python
1257
+
1258
+ from functools import partial
1259
+ from tqdm import tqdm as std_tqdm
1260
+ tqdm = partial(std_tqdm, dynamic_ncols=True)
1261
+
1262
+ For further customisation,
1263
+ ``tqdm`` may be inherited from to create custom callbacks (as with the
1264
+ ``TqdmUpTo`` example `above <#hooks-and-callbacks>`__) or for custom frontends
1265
+ (e.g. GUIs such as notebook or plotting packages). In the latter case:
1266
+
1267
+ 1. ``def __init__()`` to call ``super().__init__(..., gui=True)`` to disable
1268
+ terminal ``status_printer`` creation.
1269
+ 2. Redefine: ``close()``, ``clear()``, ``display()``.
1270
+
1271
+ Consider overloading ``display()`` to use e.g.
1272
+ ``self.frontend(**self.format_dict)`` instead of ``self.sp(repr(self))``.
1273
+
1274
+ Some submodule examples of inheritance:
1275
+
1276
+ - `tqdm/notebook.py <https://github.com/tqdm/tqdm/blob/master/tqdm/notebook.py>`__
1277
+ - `tqdm/gui.py <https://github.com/tqdm/tqdm/blob/master/tqdm/gui.py>`__
1278
+ - `tqdm/tk.py <https://github.com/tqdm/tqdm/blob/master/tqdm/tk.py>`__
1279
+ - `tqdm/contrib/slack.py <https://github.com/tqdm/tqdm/blob/master/tqdm/contrib/slack.py>`__
1280
+ - `tqdm/contrib/discord.py <https://github.com/tqdm/tqdm/blob/master/tqdm/contrib/discord.py>`__
1281
+ - `tqdm/contrib/telegram.py <https://github.com/tqdm/tqdm/blob/master/tqdm/contrib/telegram.py>`__
1282
+
1283
+ Dynamic Monitor/Meter
1284
+ ~~~~~~~~~~~~~~~~~~~~~
1285
+
1286
+ You can use a ``tqdm`` as a meter which is not monotonically increasing.
1287
+ This could be because ``n`` decreases (e.g. a CPU usage monitor) or ``total``
1288
+ changes.
1289
+
1290
+ One example would be recursively searching for files. The ``total`` is the
1291
+ number of objects found so far, while ``n`` is the number of those objects which
1292
+ are files (rather than folders):
1293
+
1294
+ .. code:: python
1295
+
1296
+ from tqdm import tqdm
1297
+ import os.path
1298
+
1299
+ def find_files_recursively(path, show_progress=True):
1300
+ files = []
1301
+ # total=1 assumes `path` is a file
1302
+ t = tqdm(total=1, unit="file", disable=not show_progress)
1303
+ if not os.path.exists(path):
1304
+ raise IOError("Cannot find:" + path)
1305
+
1306
+ def append_found_file(f):
1307
+ files.append(f)
1308
+ t.update()
1309
+
1310
+ def list_found_dir(path):
1311
+ """returns os.listdir(path) assuming os.path.isdir(path)"""
1312
+ listing = os.listdir(path)
1313
+ # subtract 1 since a "file" we found was actually this directory
1314
+ t.total += len(listing) - 1
1315
+ # fancy way to give info without forcing a refresh
1316
+ t.set_postfix(dir=path[-10:], refresh=False)
1317
+ t.update(0) # may trigger a refresh
1318
+ return listing
1319
+
1320
+ def recursively_search(path):
1321
+ if os.path.isdir(path):
1322
+ for f in list_found_dir(path):
1323
+ recursively_search(os.path.join(path, f))
1324
+ else:
1325
+ append_found_file(path)
1326
+
1327
+ recursively_search(path)
1328
+ t.set_postfix(dir=path)
1329
+ t.close()
1330
+ return files
1331
+
1332
+ Using ``update(0)`` is a handy way to let ``tqdm`` decide when to trigger a
1333
+ display refresh to avoid console spamming.
1334
+
1335
+ Writing messages
1336
+ ~~~~~~~~~~~~~~~~
1337
+
1338
+ This is a work in progress (see
1339
+ `#737 <https://github.com/tqdm/tqdm/issues/737>`__).
1340
+
1341
+ Since ``tqdm`` uses a simple printing mechanism to display progress bars,
1342
+ you should not write any message in the terminal using ``print()`` while
1343
+ a progressbar is open.
1344
+
1345
+ To write messages in the terminal without any collision with ``tqdm`` bar
1346
+ display, a ``.write()`` method is provided:
1347
+
1348
+ .. code:: python
1349
+
1350
+ from tqdm.auto import tqdm, trange
1351
+ from time import sleep
1352
+
1353
+ bar = trange(10)
1354
+ for i in bar:
1355
+ # Print using tqdm class method .write()
1356
+ sleep(0.1)
1357
+ if not (i % 3):
1358
+ tqdm.write("Done task %i" % i)
1359
+ # Can also use bar.write()
1360
+
1361
+ By default, this will print to standard output ``sys.stdout``. but you can
1362
+ specify any file-like object using the ``file`` argument. For example, this
1363
+ can be used to redirect the messages writing to a log file or class.
1364
+
1365
+ Redirecting writing
1366
+ ~~~~~~~~~~~~~~~~~~~
1367
+
1368
+ If using a library that can print messages to the console, editing the library
1369
+ by replacing ``print()`` with ``tqdm.write()`` may not be desirable.
1370
+ In that case, redirecting ``sys.stdout`` to ``tqdm.write()`` is an option.
1371
+
1372
+ To redirect ``sys.stdout``, create a file-like class that will write
1373
+ any input string to ``tqdm.write()``, and supply the arguments
1374
+ ``file=sys.stdout, dynamic_ncols=True``.
1375
+
1376
+ A reusable canonical example is given below:
1377
+
1378
+ .. code:: python
1379
+
1380
+ from time import sleep
1381
+ import contextlib
1382
+ import sys
1383
+ from tqdm import tqdm
1384
+ from tqdm.contrib import DummyTqdmFile
1385
+
1386
+
1387
+ @contextlib.contextmanager
1388
+ def std_out_err_redirect_tqdm():
1389
+ orig_out_err = sys.stdout, sys.stderr
1390
+ try:
1391
+ sys.stdout, sys.stderr = map(DummyTqdmFile, orig_out_err)
1392
+ yield orig_out_err[0]
1393
+ # Relay exceptions
1394
+ except Exception as exc:
1395
+ raise exc
1396
+ # Always restore sys.stdout/err if necessary
1397
+ finally:
1398
+ sys.stdout, sys.stderr = orig_out_err
1399
+
1400
+ def some_fun(i):
1401
+ print("Fee, fi, fo,".split()[i])
1402
+
1403
+ # Redirect stdout to tqdm.write() (don't forget the `as save_stdout`)
1404
+ with std_out_err_redirect_tqdm() as orig_stdout:
1405
+ # tqdm needs the original stdout
1406
+ # and dynamic_ncols=True to autodetect console width
1407
+ for i in tqdm(range(3), file=orig_stdout, dynamic_ncols=True):
1408
+ sleep(.5)
1409
+ some_fun(i)
1410
+
1411
+ # After the `with`, printing is restored
1412
+ print("Done!")
1413
+
1414
+ Redirecting ``logging``
1415
+ ~~~~~~~~~~~~~~~~~~~~~~~
1416
+
1417
+ Similar to ``sys.stdout``/``sys.stderr`` as detailed above, console ``logging``
1418
+ may also be redirected to ``tqdm.write()``.
1419
+
1420
+ Warning: if also redirecting ``sys.stdout``/``sys.stderr``, make sure to
1421
+ redirect ``logging`` first if needed.
1422
+
1423
+ Helper methods are available in ``tqdm.contrib.logging``. For example:
1424
+
1425
+ .. code:: python
1426
+
1427
+ import logging
1428
+ from tqdm import trange
1429
+ from tqdm.contrib.logging import logging_redirect_tqdm
1430
+
1431
+ LOG = logging.getLogger(__name__)
1432
+
1433
+ if __name__ == '__main__':
1434
+ logging.basicConfig(level=logging.INFO)
1435
+ with logging_redirect_tqdm():
1436
+ for i in trange(9):
1437
+ if i == 4:
1438
+ LOG.info("console logging redirected to `tqdm.write()`")
1439
+ # logging restored
1440
+
1441
+ Monitoring thread, intervals and miniters
1442
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1443
+
1444
+ ``tqdm`` implements a few tricks to increase efficiency and reduce overhead.
1445
+
1446
+ - Avoid unnecessary frequent bar refreshing: ``mininterval`` defines how long
1447
+ to wait between each refresh. ``tqdm`` always gets updated in the background,
1448
+ but it will display only every ``mininterval``.
1449
+ - Reduce number of calls to check system clock/time.
1450
+ - ``mininterval`` is more intuitive to configure than ``miniters``.
1451
+ A clever adjustment system ``dynamic_miniters`` will automatically adjust
1452
+ ``miniters`` to the amount of iterations that fit into time ``mininterval``.
1453
+ Essentially, ``tqdm`` will check if it's time to print without actually
1454
+ checking time. This behaviour can be still be bypassed by manually setting
1455
+ ``miniters``.
1456
+
1457
+ However, consider a case with a combination of fast and slow iterations.
1458
+ After a few fast iterations, ``dynamic_miniters`` will set ``miniters`` to a
1459
+ large number. When iteration rate subsequently slows, ``miniters`` will
1460
+ remain large and thus reduce display update frequency. To address this:
1461
+
1462
+ - ``maxinterval`` defines the maximum time between display refreshes.
1463
+ A concurrent monitoring thread checks for overdue updates and forces one
1464
+ where necessary.
1465
+
1466
+ The monitoring thread should not have a noticeable overhead, and guarantees
1467
+ updates at least every 10 seconds by default.
1468
+ This value can be directly changed by setting the ``monitor_interval`` of
1469
+ any ``tqdm`` instance (i.e. ``t = tqdm.tqdm(...); t.monitor_interval = 2``).
1470
+ The monitor thread may be disabled application-wide by setting
1471
+ ``tqdm.tqdm.monitor_interval = 0`` before instantiation of any ``tqdm`` bar.
1472
+
1473
+
1474
+ Merch
1475
+ -----
1476
+
1477
+ You can buy `tqdm branded merch <https://tqdm.github.io/merch>`__ now!
1478
+
1479
+ Contributions
1480
+ -------------
1481
+
1482
+ |GitHub-Commits| |GitHub-Issues| |GitHub-PRs| |OpenHub-Status| |GitHub-Contributions| |CII Best Practices|
1483
+
1484
+ All source code is hosted on `GitHub <https://github.com/tqdm/tqdm>`__.
1485
+ Contributions are welcome.
1486
+
1487
+ See the
1488
+ `CONTRIBUTING <https://github.com/tqdm/tqdm/blob/master/CONTRIBUTING.md>`__
1489
+ file for more information.
1490
+
1491
+ Developers who have made significant contributions, ranked by *SLoC*
1492
+ (surviving lines of code,
1493
+ `git fame <https://github.com/casperdcl/git-fame>`__ ``-wMC --excl '\.(png|gif|jpg)$'``),
1494
+ are:
1495
+
1496
+ ==================== ======================================================== ==== ================================
1497
+ Name ID SLoC Notes
1498
+ ==================== ======================================================== ==== ================================
1499
+ Casper da Costa-Luis `casperdcl <https://github.com/casperdcl>`__ ~80% primary maintainer |Gift-Casper|
1500
+ Stephen Larroque `lrq3000 <https://github.com/lrq3000>`__ ~9% team member
1501
+ Martin Zugnoni `martinzugnoni <https://github.com/martinzugnoni>`__ ~3%
1502
+ Daniel Ecer `de-code <https://github.com/de-code>`__ ~2%
1503
+ Richard Sheridan `richardsheridan <https://github.com/richardsheridan>`__ ~1%
1504
+ Guangshuo Chen `chengs <https://github.com/chengs>`__ ~1%
1505
+ Helio Machado `0x2b3bfa0 <https://github.com/0x2b3bfa0>`__ ~1%
1506
+ Kyle Altendorf `altendky <https://github.com/altendky>`__ <1%
1507
+ Noam Yorav-Raphael `noamraph <https://github.com/noamraph>`__ <1% original author
1508
+ Matthew Stevens `mjstevens777 <https://github.com/mjstevens777>`__ <1%
1509
+ Hadrien Mary `hadim <https://github.com/hadim>`__ <1% team member
1510
+ Mikhail Korobov `kmike <https://github.com/kmike>`__ <1% team member
1511
+ ==================== ======================================================== ==== ================================
1512
+
1513
+ Ports to Other Languages
1514
+ ~~~~~~~~~~~~~~~~~~~~~~~~
1515
+
1516
+ A list is available on
1517
+ `this wiki page <https://github.com/tqdm/tqdm/wiki/tqdm-ports>`__.
1518
+
1519
+
1520
+ LICENCE
1521
+ -------
1522
+
1523
+ Open Source (OSI approved): |LICENCE|
1524
+
1525
+ Citation information: |DOI|
1526
+
1527
+ |README-Hits| (Since 19 May 2016)
1528
+
1529
+ .. |Logo| image:: https://tqdm.github.io/img/logo.gif
1530
+ .. |Screenshot| image:: https://tqdm.github.io/img/tqdm.gif
1531
+ .. |Video| image:: https://tqdm.github.io/img/video.jpg
1532
+ :target: https://tqdm.github.io/video
1533
+ .. |Slides| image:: https://tqdm.github.io/img/slides.jpg
1534
+ :target: https://tqdm.github.io/PyData2019/slides.html
1535
+ .. |Merch| image:: https://tqdm.github.io/img/merch.jpg
1536
+ :target: https://tqdm.github.io/merch
1537
+ .. |Build-Status| image:: https://img.shields.io/github/actions/workflow/status/tqdm/tqdm/test.yml?branch=master&label=tqdm&logo=GitHub
1538
+ :target: https://github.com/tqdm/tqdm/actions/workflows/test.yml
1539
+ .. |Coverage-Status| image:: https://img.shields.io/coveralls/github/tqdm/tqdm/master?logo=coveralls
1540
+ :target: https://coveralls.io/github/tqdm/tqdm
1541
+ .. |Branch-Coverage-Status| image:: https://codecov.io/gh/tqdm/tqdm/branch/master/graph/badge.svg
1542
+ :target: https://codecov.io/gh/tqdm/tqdm
1543
+ .. |Codacy-Grade| image:: https://app.codacy.com/project/badge/Grade/3f965571598f44549c7818f29cdcf177
1544
+ :target: https://www.codacy.com/gh/tqdm/tqdm/dashboard
1545
+ .. |CII Best Practices| image:: https://bestpractices.coreinfrastructure.org/projects/3264/badge
1546
+ :target: https://bestpractices.coreinfrastructure.org/projects/3264
1547
+ .. |GitHub-Status| image:: https://img.shields.io/github/tag/tqdm/tqdm.svg?maxAge=86400&logo=github&logoColor=white
1548
+ :target: https://github.com/tqdm/tqdm/releases
1549
+ .. |GitHub-Forks| image:: https://img.shields.io/github/forks/tqdm/tqdm.svg?logo=github&logoColor=white
1550
+ :target: https://github.com/tqdm/tqdm/network
1551
+ .. |GitHub-Stars| image:: https://img.shields.io/github/stars/tqdm/tqdm.svg?logo=github&logoColor=white
1552
+ :target: https://github.com/tqdm/tqdm/stargazers
1553
+ .. |GitHub-Commits| image:: https://img.shields.io/github/commit-activity/y/tqdm/tqdm.svg?logo=git&logoColor=white
1554
+ :target: https://github.com/tqdm/tqdm/graphs/commit-activity
1555
+ .. |GitHub-Issues| image:: https://img.shields.io/github/issues-closed/tqdm/tqdm.svg?logo=github&logoColor=white
1556
+ :target: https://github.com/tqdm/tqdm/issues?q=
1557
+ .. |GitHub-PRs| image:: https://img.shields.io/github/issues-pr-closed/tqdm/tqdm.svg?logo=github&logoColor=white
1558
+ :target: https://github.com/tqdm/tqdm/pulls
1559
+ .. |GitHub-Contributions| image:: https://img.shields.io/github/contributors/tqdm/tqdm.svg?logo=github&logoColor=white
1560
+ :target: https://github.com/tqdm/tqdm/graphs/contributors
1561
+ .. |GitHub-Updated| image:: https://img.shields.io/github/last-commit/tqdm/tqdm/master.svg?logo=github&logoColor=white&label=pushed
1562
+ :target: https://github.com/tqdm/tqdm/pulse
1563
+ .. |Gift-Casper| image:: https://img.shields.io/badge/dynamic/json.svg?color=ff69b4&label=gifts%20received&prefix=%C2%A3&query=%24..sum&url=https%3A%2F%2Fcaspersci.uk.to%2Fgifts.json
1564
+ :target: https://cdcl.ml/sponsor
1565
+ .. |Versions| image:: https://img.shields.io/pypi/v/tqdm.svg
1566
+ :target: https://tqdm.github.io/releases
1567
+ .. |PyPI-Downloads| image:: https://img.shields.io/pypi/dm/tqdm.svg?label=pypi%20downloads&logo=PyPI&logoColor=white
1568
+ :target: https://pepy.tech/project/tqdm
1569
+ .. |Py-Versions| image:: https://img.shields.io/pypi/pyversions/tqdm.svg?logo=python&logoColor=white
1570
+ :target: https://pypi.org/project/tqdm
1571
+ .. |Conda-Forge-Status| image:: https://img.shields.io/conda/v/conda-forge/tqdm.svg?label=conda-forge&logo=conda-forge
1572
+ :target: https://anaconda.org/conda-forge/tqdm
1573
+ .. |Snapcraft| image:: https://img.shields.io/badge/snap-install-82BEA0.svg?logo=snapcraft
1574
+ :target: https://snapcraft.io/tqdm
1575
+ .. |Docker| image:: https://img.shields.io/badge/docker-pull-blue.svg?logo=docker&logoColor=white
1576
+ :target: https://hub.docker.com/r/tqdm/tqdm
1577
+ .. |Libraries-Rank| image:: https://img.shields.io/librariesio/sourcerank/pypi/tqdm.svg?logo=koding&logoColor=white
1578
+ :target: https://libraries.io/pypi/tqdm
1579
+ .. |Libraries-Dependents| image:: https://img.shields.io/librariesio/dependent-repos/pypi/tqdm.svg?logo=koding&logoColor=white
1580
+ :target: https://github.com/tqdm/tqdm/network/dependents
1581
+ .. |OpenHub-Status| image:: https://www.openhub.net/p/tqdm/widgets/project_thin_badge?format=gif
1582
+ :target: https://www.openhub.net/p/tqdm?ref=Thin+badge
1583
+ .. |awesome-python| image:: https://awesome.re/mentioned-badge.svg
1584
+ :target: https://github.com/vinta/awesome-python
1585
+ .. |LICENCE| image:: https://img.shields.io/pypi/l/tqdm.svg
1586
+ :target: https://raw.githubusercontent.com/tqdm/tqdm/master/LICENCE
1587
+ .. |DOI| image:: https://img.shields.io/badge/DOI-10.5281/zenodo.595120-blue.svg
1588
+ :target: https://doi.org/10.5281/zenodo.595120
1589
+ .. |binder-demo| image:: https://mybinder.org/badge_logo.svg
1590
+ :target: https://mybinder.org/v2/gh/tqdm/tqdm/master?filepath=DEMO.ipynb
1591
+ .. |Screenshot-Jupyter1| image:: https://tqdm.github.io/img/jupyter-1.gif
1592
+ .. |Screenshot-Jupyter2| image:: https://tqdm.github.io/img/jupyter-2.gif
1593
+ .. |Screenshot-Jupyter3| image:: https://tqdm.github.io/img/jupyter-3.gif
1594
+ .. |README-Hits| image:: https://cgi.cdcl.ml/hits?q=tqdm&style=social&r=https://github.com/tqdm/tqdm&l=https://tqdm.github.io/img/favicon.png&f=https://tqdm.github.io/img/logo.gif
1595
+ :target: https://cgi.cdcl.ml/hits?q=tqdm&a=plot&r=https://github.com/tqdm/tqdm&l=https://tqdm.github.io/img/favicon.png&f=https://tqdm.github.io/img/logo.gif&style=social
.cache/pip/http-v2/4/a/5/b/6/4a5b6f0d76201de4cfd4884f5e95617a1848cf81c8357be4d12cbf6a ADDED
Binary file (1.2 kB). View file
 
.cache/pip/http-v2/4/a/5/b/6/4a5b6f0d76201de4cfd4884f5e95617a1848cf81c8357be4d12cbf6a.body ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Metadata-Version: 2.1
2
+ Name: openpyxl
3
+ Version: 3.1.5
4
+ Summary: A Python library to read/write Excel 2010 xlsx/xlsm files
5
+ Home-page: https://openpyxl.readthedocs.io
6
+ Author: See AUTHORS
7
+ Author-email: charlie.clark@clark-consulting.eu
8
+ License: MIT
9
+ Project-URL: Documentation, https://openpyxl.readthedocs.io/en/stable/
10
+ Project-URL: Source, https://foss.heptapod.net/openpyxl/openpyxl
11
+ Project-URL: Tracker, https://foss.heptapod.net/openpyxl/openpyxl/-/issues
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Operating System :: MacOS :: MacOS X
14
+ Classifier: Operating System :: Microsoft :: Windows
15
+ Classifier: Operating System :: POSIX
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Programming Language :: Python
18
+ Classifier: Programming Language :: Python :: 3.6
19
+ Classifier: Programming Language :: Python :: 3.7
20
+ Classifier: Programming Language :: Python :: 3.8
21
+ Classifier: Programming Language :: Python :: 3.9
22
+ Classifier: Programming Language :: Python :: 3.10
23
+ Classifier: Programming Language :: Python :: 3.11
24
+ Requires-Python: >=3.8
25
+ License-File: LICENCE.rst
26
+ Requires-Dist: et-xmlfile
27
+
28
+ .. image:: https://coveralls.io/repos/bitbucket/openpyxl/openpyxl/badge.svg?branch=default
29
+ :target: https://coveralls.io/bitbucket/openpyxl/openpyxl?branch=default
30
+ :alt: coverage status
31
+
32
+ Introduction
33
+ ------------
34
+
35
+ openpyxl is a Python library to read/write Excel 2010 xlsx/xlsm/xltx/xltm files.
36
+
37
+ It was born from lack of existing library to read/write natively from Python
38
+ the Office Open XML format.
39
+
40
+ All kudos to the PHPExcel team as openpyxl was initially based on PHPExcel.
41
+
42
+
43
+ Security
44
+ --------
45
+
46
+ By default openpyxl does not guard against quadratic blowup or billion laughs
47
+ xml attacks. To guard against these attacks install defusedxml.
48
+
49
+ Mailing List
50
+ ------------
51
+
52
+ The user list can be found on http://groups.google.com/group/openpyxl-users
53
+
54
+
55
+ Sample code::
56
+
57
+ from openpyxl import Workbook
58
+ wb = Workbook()
59
+
60
+ # grab the active worksheet
61
+ ws = wb.active
62
+
63
+ # Data can be assigned directly to cells
64
+ ws['A1'] = 42
65
+
66
+ # Rows can also be appended
67
+ ws.append([1, 2, 3])
68
+
69
+ # Python types will automatically be converted
70
+ import datetime
71
+ ws['A2'] = datetime.datetime.now()
72
+
73
+ # Save the file
74
+ wb.save("sample.xlsx")
75
+
76
+
77
+ Documentation
78
+ -------------
79
+
80
+ The documentation is at: https://openpyxl.readthedocs.io
81
+
82
+ * installation methods
83
+ * code examples
84
+ * instructions for contributing
85
+
86
+ Release notes: https://openpyxl.readthedocs.io/en/stable/changes.html
.cache/pip/http-v2/4/d/c/8/d/4dc8d567db4bc55c0684404c85a6b4572f87a99306be24cab65fbfae ADDED
Binary file (1.86 kB). View file
 
.cache/pip/http-v2/4/d/c/8/d/4dc8d567db4bc55c0684404c85a6b4572f87a99306be24cab65fbfae.body ADDED
Binary file (16.2 kB). View file
 
.cache/pip/http-v2/5/9/1/a/0/591a0a7ea47d81cffb332bf5e1460e560ce743822558c6f345314d4b ADDED
Binary file (1.16 kB). View file
 
.cache/pip/http-v2/5/9/1/a/0/591a0a7ea47d81cffb332bf5e1460e560ce743822558c6f345314d4b.body ADDED
Binary file (18.1 kB). View file
 
.cache/pip/http-v2/5/b/4/0/d/5b40d68cf8d927e2221e1237399fe71c3f05e873a098ccc481be149a ADDED
Binary file (1.2 kB). View file
 
.cache/pip/http-v2/5/b/4/0/d/5b40d68cf8d927e2221e1237399fe71c3f05e873a098ccc481be149a.body ADDED
@@ -0,0 +1,324 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Metadata-Version: 2.4
2
+ Name: huggingface_hub
3
+ Version: 1.10.1
4
+ Summary: Client library to download and publish models, datasets and other repos on the huggingface.co hub
5
+ Home-page: https://github.com/huggingface/huggingface_hub
6
+ Author: Hugging Face, Inc.
7
+ Author-email: julien@huggingface.co
8
+ License: Apache-2.0
9
+ Keywords: model-hub machine-learning models natural-language-processing deep-learning pytorch pretrained-models
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Intended Audience :: Education
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: License :: OSI Approved :: Apache Software License
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3 :: Only
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: 3.14
22
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
23
+ Requires-Python: >=3.10.0
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: filelock>=3.10.0
27
+ Requires-Dist: fsspec>=2023.5.0
28
+ Requires-Dist: hf-xet<2.0.0,>=1.4.3; platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64" or platform_machine == "arm64" or platform_machine == "aarch64"
29
+ Requires-Dist: httpx<1,>=0.23.0
30
+ Requires-Dist: packaging>=20.9
31
+ Requires-Dist: pyyaml>=5.1
32
+ Requires-Dist: tqdm>=4.42.1
33
+ Requires-Dist: typer
34
+ Requires-Dist: typing-extensions>=4.1.0
35
+ Provides-Extra: oauth
36
+ Requires-Dist: authlib>=1.3.2; extra == "oauth"
37
+ Requires-Dist: fastapi; extra == "oauth"
38
+ Requires-Dist: httpx; extra == "oauth"
39
+ Requires-Dist: itsdangerous; extra == "oauth"
40
+ Provides-Extra: torch
41
+ Requires-Dist: torch; extra == "torch"
42
+ Requires-Dist: safetensors[torch]; extra == "torch"
43
+ Provides-Extra: fastai
44
+ Requires-Dist: toml; extra == "fastai"
45
+ Requires-Dist: fastai>=2.4; extra == "fastai"
46
+ Requires-Dist: fastcore>=1.3.27; extra == "fastai"
47
+ Provides-Extra: hf-xet
48
+ Requires-Dist: hf-xet<2.0.0,>=1.4.3; extra == "hf-xet"
49
+ Provides-Extra: mcp
50
+ Requires-Dist: mcp>=1.8.0; extra == "mcp"
51
+ Provides-Extra: testing
52
+ Requires-Dist: authlib>=1.3.2; extra == "testing"
53
+ Requires-Dist: fastapi; extra == "testing"
54
+ Requires-Dist: httpx; extra == "testing"
55
+ Requires-Dist: itsdangerous; extra == "testing"
56
+ Requires-Dist: jedi; extra == "testing"
57
+ Requires-Dist: Jinja2; extra == "testing"
58
+ Requires-Dist: pytest>=8.4.2; extra == "testing"
59
+ Requires-Dist: pytest-cov; extra == "testing"
60
+ Requires-Dist: pytest-env; extra == "testing"
61
+ Requires-Dist: pytest-xdist; extra == "testing"
62
+ Requires-Dist: pytest-vcr; extra == "testing"
63
+ Requires-Dist: pytest-asyncio; extra == "testing"
64
+ Requires-Dist: pytest-rerunfailures<16.0; extra == "testing"
65
+ Requires-Dist: pytest-mock; extra == "testing"
66
+ Requires-Dist: urllib3<2.0; extra == "testing"
67
+ Requires-Dist: soundfile; extra == "testing"
68
+ Requires-Dist: Pillow; extra == "testing"
69
+ Requires-Dist: numpy; extra == "testing"
70
+ Requires-Dist: duckdb; extra == "testing"
71
+ Requires-Dist: fastapi; extra == "testing"
72
+ Provides-Extra: gradio
73
+ Requires-Dist: gradio>=5.0.0; extra == "gradio"
74
+ Requires-Dist: requests; extra == "gradio"
75
+ Provides-Extra: typing
76
+ Requires-Dist: typing-extensions>=4.8.0; extra == "typing"
77
+ Requires-Dist: types-PyYAML; extra == "typing"
78
+ Requires-Dist: types-simplejson; extra == "typing"
79
+ Requires-Dist: types-toml; extra == "typing"
80
+ Requires-Dist: types-tqdm; extra == "typing"
81
+ Requires-Dist: types-urllib3; extra == "typing"
82
+ Provides-Extra: quality
83
+ Requires-Dist: ruff>=0.9.0; extra == "quality"
84
+ Requires-Dist: mypy==1.15.0; extra == "quality"
85
+ Requires-Dist: libcst>=1.4.0; extra == "quality"
86
+ Requires-Dist: ty; extra == "quality"
87
+ Provides-Extra: all
88
+ Requires-Dist: authlib>=1.3.2; extra == "all"
89
+ Requires-Dist: fastapi; extra == "all"
90
+ Requires-Dist: httpx; extra == "all"
91
+ Requires-Dist: itsdangerous; extra == "all"
92
+ Requires-Dist: jedi; extra == "all"
93
+ Requires-Dist: Jinja2; extra == "all"
94
+ Requires-Dist: pytest>=8.4.2; extra == "all"
95
+ Requires-Dist: pytest-cov; extra == "all"
96
+ Requires-Dist: pytest-env; extra == "all"
97
+ Requires-Dist: pytest-xdist; extra == "all"
98
+ Requires-Dist: pytest-vcr; extra == "all"
99
+ Requires-Dist: pytest-asyncio; extra == "all"
100
+ Requires-Dist: pytest-rerunfailures<16.0; extra == "all"
101
+ Requires-Dist: pytest-mock; extra == "all"
102
+ Requires-Dist: urllib3<2.0; extra == "all"
103
+ Requires-Dist: soundfile; extra == "all"
104
+ Requires-Dist: Pillow; extra == "all"
105
+ Requires-Dist: numpy; extra == "all"
106
+ Requires-Dist: duckdb; extra == "all"
107
+ Requires-Dist: fastapi; extra == "all"
108
+ Requires-Dist: ruff>=0.9.0; extra == "all"
109
+ Requires-Dist: mypy==1.15.0; extra == "all"
110
+ Requires-Dist: libcst>=1.4.0; extra == "all"
111
+ Requires-Dist: ty; extra == "all"
112
+ Requires-Dist: typing-extensions>=4.8.0; extra == "all"
113
+ Requires-Dist: types-PyYAML; extra == "all"
114
+ Requires-Dist: types-simplejson; extra == "all"
115
+ Requires-Dist: types-toml; extra == "all"
116
+ Requires-Dist: types-tqdm; extra == "all"
117
+ Requires-Dist: types-urllib3; extra == "all"
118
+ Provides-Extra: dev
119
+ Requires-Dist: authlib>=1.3.2; extra == "dev"
120
+ Requires-Dist: fastapi; extra == "dev"
121
+ Requires-Dist: httpx; extra == "dev"
122
+ Requires-Dist: itsdangerous; extra == "dev"
123
+ Requires-Dist: jedi; extra == "dev"
124
+ Requires-Dist: Jinja2; extra == "dev"
125
+ Requires-Dist: pytest>=8.4.2; extra == "dev"
126
+ Requires-Dist: pytest-cov; extra == "dev"
127
+ Requires-Dist: pytest-env; extra == "dev"
128
+ Requires-Dist: pytest-xdist; extra == "dev"
129
+ Requires-Dist: pytest-vcr; extra == "dev"
130
+ Requires-Dist: pytest-asyncio; extra == "dev"
131
+ Requires-Dist: pytest-rerunfailures<16.0; extra == "dev"
132
+ Requires-Dist: pytest-mock; extra == "dev"
133
+ Requires-Dist: urllib3<2.0; extra == "dev"
134
+ Requires-Dist: soundfile; extra == "dev"
135
+ Requires-Dist: Pillow; extra == "dev"
136
+ Requires-Dist: numpy; extra == "dev"
137
+ Requires-Dist: duckdb; extra == "dev"
138
+ Requires-Dist: fastapi; extra == "dev"
139
+ Requires-Dist: ruff>=0.9.0; extra == "dev"
140
+ Requires-Dist: mypy==1.15.0; extra == "dev"
141
+ Requires-Dist: libcst>=1.4.0; extra == "dev"
142
+ Requires-Dist: ty; extra == "dev"
143
+ Requires-Dist: typing-extensions>=4.8.0; extra == "dev"
144
+ Requires-Dist: types-PyYAML; extra == "dev"
145
+ Requires-Dist: types-simplejson; extra == "dev"
146
+ Requires-Dist: types-toml; extra == "dev"
147
+ Requires-Dist: types-tqdm; extra == "dev"
148
+ Requires-Dist: types-urllib3; extra == "dev"
149
+ Dynamic: author
150
+ Dynamic: author-email
151
+ Dynamic: classifier
152
+ Dynamic: description
153
+ Dynamic: description-content-type
154
+ Dynamic: home-page
155
+ Dynamic: keywords
156
+ Dynamic: license
157
+ Dynamic: license-file
158
+ Dynamic: provides-extra
159
+ Dynamic: requires-dist
160
+ Dynamic: requires-python
161
+ Dynamic: summary
162
+
163
+ <p align="center">
164
+ <picture>
165
+ <source media="(prefers-color-scheme: dark)" srcset="https://huggingface.co/datasets/huggingface/documentation-images/raw/main/huggingface_hub-dark.svg">
166
+ <source media="(prefers-color-scheme: light)" srcset="https://huggingface.co/datasets/huggingface/documentation-images/raw/main/huggingface_hub.svg">
167
+ <img alt="huggingface_hub library logo" src="https://huggingface.co/datasets/huggingface/documentation-images/raw/main/huggingface_hub.svg" width="352" height="59" style="max-width: 100%">
168
+ </picture>
169
+ <br/>
170
+ <br/>
171
+ </p>
172
+
173
+ <p align="center">
174
+ <i>The official Python client for the Huggingface Hub.</i>
175
+ </p>
176
+
177
+ <p align="center">
178
+ <a href="https://huggingface.co/docs/huggingface_hub/en/index"><img alt="Documentation" src="https://img.shields.io/website/http/huggingface.co/docs/huggingface_hub/index.svg?down_color=red&down_message=offline&up_message=online&label=doc"></a>
179
+ <a href="https://github.com/huggingface/huggingface_hub/releases"><img alt="GitHub release" src="https://img.shields.io/github/release/huggingface/huggingface_hub.svg"></a>
180
+ <a href="https://github.com/huggingface/huggingface_hub"><img alt="PyPi version" src="https://img.shields.io/pypi/pyversions/huggingface_hub.svg"></a>
181
+ <a href="https://pypi.org/project/huggingface-hub"><img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/huggingface_hub"></a>
182
+ <a href="https://codecov.io/gh/huggingface/huggingface_hub"><img alt="Code coverage" src="https://codecov.io/gh/huggingface/huggingface_hub/branch/main/graph/badge.svg?token=RXP95LE2XL"></a>
183
+ </p>
184
+
185
+ <h4 align="center">
186
+ <p>
187
+ <b>English</b> |
188
+ <a href="https://github.com/huggingface/huggingface_hub/blob/main/i18n/README_de.md">Deutsch</a> |
189
+ <a href="https://github.com/huggingface/huggingface_hub/blob/main/i18n/README_fr.md">Français</a> |
190
+ <a href="https://github.com/huggingface/huggingface_hub/blob/main/i18n/README_hi.md">हिंदी</a> |
191
+ <a href="https://github.com/huggingface/huggingface_hub/blob/main/i18n/README_ko.md">한국어</a> |
192
+ <a href="https://github.com/huggingface/huggingface_hub/blob/main/i18n/README_cn.md">中文 (简体)</a>
193
+ <p>
194
+ </h4>
195
+
196
+ ---
197
+
198
+ **Documentation**: <a href="https://hf.co/docs/huggingface_hub" target="_blank">https://hf.co/docs/huggingface_hub</a>
199
+
200
+ **Source Code**: <a href="https://github.com/huggingface/huggingface_hub" target="_blank">https://github.com/huggingface/huggingface_hub</a>
201
+
202
+ ---
203
+
204
+ ## Welcome to the huggingface_hub library
205
+
206
+ The `huggingface_hub` library allows you to interact with the [Hugging Face Hub](https://huggingface.co/), a platform democratizing open-source Machine Learning for creators and collaborators. Discover pre-trained models and datasets for your projects or play with the thousands of machine learning apps hosted on the Hub. You can also create and share your own models, datasets and demos with the community. The `huggingface_hub` library provides a simple way to do all these things with Python.
207
+
208
+ ## Key features
209
+
210
+ - [Download files](https://huggingface.co/docs/huggingface_hub/en/guides/download) from the Hub.
211
+ - [Upload files](https://huggingface.co/docs/huggingface_hub/en/guides/upload) to the Hub.
212
+ - [Manage your repositories](https://huggingface.co/docs/huggingface_hub/en/guides/repository).
213
+ - [Run Inference](https://huggingface.co/docs/huggingface_hub/en/guides/inference) on deployed models.
214
+ - [Search](https://huggingface.co/docs/huggingface_hub/en/guides/search) for models, datasets and Spaces.
215
+ - [Share Model Cards](https://huggingface.co/docs/huggingface_hub/en/guides/model-cards) to document your models.
216
+ - [Engage with the community](https://huggingface.co/docs/huggingface_hub/en/guides/community) through PRs and comments.
217
+
218
+ ## Installation
219
+
220
+ Install the `huggingface_hub` package with [pip](https://pypi.org/project/huggingface-hub/):
221
+
222
+ ```bash
223
+ pip install huggingface_hub
224
+ ```
225
+
226
+ If you prefer, you can also install it with [conda](https://huggingface.co/docs/huggingface_hub/en/installation#install-with-conda).
227
+
228
+ In order to keep the package minimal by default, `huggingface_hub` comes with optional dependencies useful for some use cases. For example, if you want to use the MCP module, run:
229
+
230
+ ```bash
231
+ pip install "huggingface_hub[mcp]"
232
+ ```
233
+
234
+ To learn more installation and optional dependencies, check out the [installation guide](https://huggingface.co/docs/huggingface_hub/en/installation).
235
+
236
+ ## Quick start
237
+
238
+ ### Download files
239
+
240
+ Download a single file
241
+
242
+ ```py
243
+ from huggingface_hub import hf_hub_download
244
+
245
+ hf_hub_download(repo_id="tiiuae/falcon-7b-instruct", filename="config.json")
246
+ ```
247
+
248
+ Or an entire repository
249
+
250
+ ```py
251
+ from huggingface_hub import snapshot_download
252
+
253
+ snapshot_download("stabilityai/stable-diffusion-2-1")
254
+ ```
255
+
256
+ Files will be downloaded in a local cache folder. More details in [this guide](https://huggingface.co/docs/huggingface_hub/en/guides/manage-cache).
257
+
258
+ ### Login
259
+
260
+ The Hugging Face Hub uses tokens to authenticate applications (see [docs](https://huggingface.co/docs/hub/security-tokens)). To log in your machine, run the following CLI:
261
+
262
+ ```bash
263
+ hf auth login
264
+ # or using an environment variable
265
+ hf auth login --token $HUGGINGFACE_TOKEN
266
+ ```
267
+
268
+ ### Create a repository
269
+
270
+ ```py
271
+ from huggingface_hub import create_repo
272
+
273
+ create_repo(repo_id="super-cool-model")
274
+ ```
275
+
276
+ ### Upload files
277
+
278
+ Upload a single file
279
+
280
+ ```py
281
+ from huggingface_hub import upload_file
282
+
283
+ upload_file(
284
+ path_or_fileobj="/home/lysandre/dummy-test/README.md",
285
+ path_in_repo="README.md",
286
+ repo_id="lysandre/test-model",
287
+ )
288
+ ```
289
+
290
+ Or an entire folder
291
+
292
+ ```py
293
+ from huggingface_hub import upload_folder
294
+
295
+ upload_folder(
296
+ folder_path="/path/to/local/space",
297
+ repo_id="username/my-cool-space",
298
+ repo_type="space",
299
+ )
300
+ ```
301
+
302
+ For details in the [upload guide](https://huggingface.co/docs/huggingface_hub/en/guides/upload).
303
+
304
+ ## Integrating to the Hub.
305
+
306
+ We're partnering with cool open source ML libraries to provide free model hosting and versioning. You can find the existing integrations [here](https://huggingface.co/docs/hub/libraries).
307
+
308
+ The advantages are:
309
+
310
+ - Free model or dataset hosting for libraries and their users.
311
+ - Built-in file versioning, even with very large files, thanks to a git-based approach.
312
+ - In-browser widgets to play with the uploaded models.
313
+ - Anyone can upload a new model for your library, they just need to add the corresponding tag for the model to be discoverable.
314
+ - Fast downloads! We use Cloudfront (a CDN) to geo-replicate downloads so they're blazing fast from anywhere on the globe.
315
+ - Usage stats and more features to come.
316
+
317
+ If you would like to integrate your library, feel free to open an issue to begin the discussion. We wrote a [step-by-step guide](https://huggingface.co/docs/hub/adding-a-library) with ❤️ showing how to do this integration.
318
+
319
+ ## Contributions (feature requests, bugs, etc.) are super welcome 💙💚💛💜🧡❤️
320
+
321
+ Everyone is welcome to contribute, and we value everybody's contribution. Code is not the only way to help the community.
322
+ Answering questions, helping others, reaching out and improving the documentations are immensely valuable to the community.
323
+ We wrote a [contribution guide](https://github.com/huggingface/huggingface_hub/blob/main/CONTRIBUTING.md) to summarize
324
+ how to get started to contribute to this repository.
.cache/pip/http-v2/6/4/c/f/c/64cfc03e83f9fad4049b1d2a1d785c9273270a4ab9788b538f5054e3 ADDED
Binary file (1.87 kB). View file
 
.cache/pip/http-v2/6/5/1/e/5/651e58859e8db8c99b9e7068d03984cfd4577518ff0e021c717afbf4 ADDED
Binary file (1.2 kB). View file
 
.cache/pip/http-v2/6/5/1/e/5/651e58859e8db8c99b9e7068d03984cfd4577518ff0e021c717afbf4.body ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Metadata-Version: 2.1
2
+ Name: cycler
3
+ Version: 0.12.1
4
+ Summary: Composable style cycles
5
+ Author-email: Thomas A Caswell <matplotlib-users@python.org>
6
+ License: Copyright (c) 2015, matplotlib project
7
+ All rights reserved.
8
+
9
+ Redistribution and use in source and binary forms, with or without
10
+ modification, are permitted provided that the following conditions are met:
11
+
12
+ * Redistributions of source code must retain the above copyright notice, this
13
+ list of conditions and the following disclaimer.
14
+
15
+ * Redistributions in binary form must reproduce the above copyright notice,
16
+ this list of conditions and the following disclaimer in the documentation
17
+ and/or other materials provided with the distribution.
18
+
19
+ * Neither the name of the matplotlib project nor the names of its
20
+ contributors may be used to endorse or promote products derived from
21
+ this software without specific prior written permission.
22
+
23
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
27
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
29
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
31
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33
+ Project-URL: homepage, https://matplotlib.org/cycler/
34
+ Project-URL: repository, https://github.com/matplotlib/cycler
35
+ Keywords: cycle kwargs
36
+ Classifier: License :: OSI Approved :: BSD License
37
+ Classifier: Development Status :: 4 - Beta
38
+ Classifier: Programming Language :: Python :: 3
39
+ Classifier: Programming Language :: Python :: 3.8
40
+ Classifier: Programming Language :: Python :: 3.9
41
+ Classifier: Programming Language :: Python :: 3.10
42
+ Classifier: Programming Language :: Python :: 3.11
43
+ Classifier: Programming Language :: Python :: 3.12
44
+ Classifier: Programming Language :: Python :: 3 :: Only
45
+ Requires-Python: >=3.8
46
+ Description-Content-Type: text/x-rst
47
+ License-File: LICENSE
48
+ Provides-Extra: docs
49
+ Requires-Dist: ipython ; extra == 'docs'
50
+ Requires-Dist: matplotlib ; extra == 'docs'
51
+ Requires-Dist: numpydoc ; extra == 'docs'
52
+ Requires-Dist: sphinx ; extra == 'docs'
53
+ Provides-Extra: tests
54
+ Requires-Dist: pytest ; extra == 'tests'
55
+ Requires-Dist: pytest-cov ; extra == 'tests'
56
+ Requires-Dist: pytest-xdist ; extra == 'tests'
57
+
58
+ |PyPi|_ |Conda|_ |Supported Python versions|_ |GitHub Actions|_ |Codecov|_
59
+
60
+ .. |PyPi| image:: https://img.shields.io/pypi/v/cycler.svg?style=flat
61
+ .. _PyPi: https://pypi.python.org/pypi/cycler
62
+
63
+ .. |Conda| image:: https://img.shields.io/conda/v/conda-forge/cycler
64
+ .. _Conda: https://anaconda.org/conda-forge/cycler
65
+
66
+ .. |Supported Python versions| image:: https://img.shields.io/pypi/pyversions/cycler.svg
67
+ .. _Supported Python versions: https://pypi.python.org/pypi/cycler
68
+
69
+ .. |GitHub Actions| image:: https://github.com/matplotlib/cycler/actions/workflows/tests.yml/badge.svg
70
+ .. _GitHub Actions: https://github.com/matplotlib/cycler/actions
71
+
72
+ .. |Codecov| image:: https://codecov.io/github/matplotlib/cycler/badge.svg?branch=main&service=github
73
+ .. _Codecov: https://codecov.io/github/matplotlib/cycler?branch=main
74
+
75
+ cycler: composable cycles
76
+ =========================
77
+
78
+ Docs: https://matplotlib.org/cycler/
.cache/pip/http-v2/6/6/e/c/7/66ec76a7b6ed4081044f5c7821af293b63c17bc2ac523ff93d5ca7d5 ADDED
Binary file (1.87 kB). View file
 
.cache/pip/http-v2/6/8/0/d/4/680d4dd80dc6a3d2df9b9478dfcc8e81e0e4f130e154a3268b98b877 ADDED
Binary file (1.87 kB). View file
 
.cache/pip/http-v2/6/b/5/3/a/6b53a9dd0e4fce887cc28c1a921aa1befe8c1a82e6c213d2542d2acb ADDED
Binary file (1.85 kB). View file
 
.cache/pip/http-v2/6/b/5/3/a/6b53a9dd0e4fce887cc28c1a921aa1befe8c1a82e6c213d2542d2acb.body ADDED
Binary file (14.8 kB). View file
 
.cache/pip/http-v2/6/b/8/1/e/6b81e7b491d69713c085c9f59d6c9162e9c07ca91d4f2bb5b3cd4b8e ADDED
Binary file (1.16 kB). View file
 
.cache/pip/http-v2/6/b/8/1/e/6b81e7b491d69713c085c9f59d6c9162e9c07ca91d4f2bb5b3cd4b8e.body ADDED
@@ -0,0 +1,386 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Metadata-Version: 2.4
2
+ Name: optuna
3
+ Version: 4.8.0
4
+ Summary: A hyperparameter optimization framework
5
+ Author: Takuya Akiba
6
+ Project-URL: homepage, https://optuna.org/
7
+ Project-URL: repository, https://github.com/optuna/optuna
8
+ Project-URL: documentation, https://optuna.readthedocs.io
9
+ Project-URL: bugtracker, https://github.com/optuna/optuna/issues
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Intended Audience :: Science/Research
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Classifier: Programming Language :: Python :: 3 :: Only
22
+ Classifier: Topic :: Scientific/Engineering
23
+ Classifier: Topic :: Scientific/Engineering :: Mathematics
24
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
25
+ Classifier: Topic :: Software Development
26
+ Classifier: Topic :: Software Development :: Libraries
27
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
28
+ Requires-Python: >=3.9
29
+ Description-Content-Type: text/markdown
30
+ License-File: LICENSE
31
+ License-File: LICENSE_THIRD_PARTY
32
+ Requires-Dist: alembic>=1.5.0
33
+ Requires-Dist: colorlog
34
+ Requires-Dist: numpy
35
+ Requires-Dist: packaging>=20.0
36
+ Requires-Dist: sqlalchemy>=1.4.2
37
+ Requires-Dist: tqdm
38
+ Requires-Dist: PyYAML
39
+ Provides-Extra: checking
40
+ Requires-Dist: mypy; extra == "checking"
41
+ Requires-Dist: mypy_boto3_s3; extra == "checking"
42
+ Requires-Dist: ruff; extra == "checking"
43
+ Requires-Dist: scipy-stubs; python_version >= "3.10" and extra == "checking"
44
+ Requires-Dist: types-PyYAML; extra == "checking"
45
+ Requires-Dist: types-redis; extra == "checking"
46
+ Requires-Dist: types-setuptools; extra == "checking"
47
+ Requires-Dist: types-tqdm; extra == "checking"
48
+ Requires-Dist: typing_extensions>=3.10.0.0; extra == "checking"
49
+ Provides-Extra: document
50
+ Requires-Dist: ase; extra == "document"
51
+ Requires-Dist: cmaes>=0.12.0; extra == "document"
52
+ Requires-Dist: fvcore; extra == "document"
53
+ Requires-Dist: kaleido<0.4; extra == "document"
54
+ Requires-Dist: lightgbm; extra == "document"
55
+ Requires-Dist: matplotlib!=3.6.0; extra == "document"
56
+ Requires-Dist: pandas; extra == "document"
57
+ Requires-Dist: pillow; extra == "document"
58
+ Requires-Dist: plotly>=4.9.0; extra == "document"
59
+ Requires-Dist: scikit-learn; extra == "document"
60
+ Requires-Dist: sphinx; extra == "document"
61
+ Requires-Dist: sphinx-copybutton; extra == "document"
62
+ Requires-Dist: sphinx-gallery; extra == "document"
63
+ Requires-Dist: sphinx-notfound-page; extra == "document"
64
+ Requires-Dist: sphinx_rtd_theme>=1.2.0; extra == "document"
65
+ Requires-Dist: torch; extra == "document"
66
+ Requires-Dist: torchvision; extra == "document"
67
+ Provides-Extra: optional
68
+ Requires-Dist: boto3; extra == "optional"
69
+ Requires-Dist: cmaes>=0.12.0; extra == "optional"
70
+ Requires-Dist: google-cloud-storage; extra == "optional"
71
+ Requires-Dist: matplotlib!=3.6.0; extra == "optional"
72
+ Requires-Dist: pandas; extra == "optional"
73
+ Requires-Dist: plotly>=4.9.0; extra == "optional"
74
+ Requires-Dist: redis; extra == "optional"
75
+ Requires-Dist: scikit-learn>=0.24.2; extra == "optional"
76
+ Requires-Dist: scipy; extra == "optional"
77
+ Requires-Dist: torch; extra == "optional"
78
+ Requires-Dist: greenlet; extra == "optional"
79
+ Requires-Dist: grpcio; extra == "optional"
80
+ Requires-Dist: protobuf>=5.28.1; extra == "optional"
81
+ Provides-Extra: test
82
+ Requires-Dist: fakeredis[lua]; extra == "test"
83
+ Requires-Dist: kaleido<0.4; extra == "test"
84
+ Requires-Dist: moto; extra == "test"
85
+ Requires-Dist: pytest; extra == "test"
86
+ Requires-Dist: pytest-xdist; extra == "test"
87
+ Requires-Dist: scipy>=1.9.2; extra == "test"
88
+ Requires-Dist: torch; extra == "test"
89
+ Requires-Dist: greenlet; extra == "test"
90
+ Requires-Dist: grpcio; extra == "test"
91
+ Requires-Dist: protobuf>=5.28.1; extra == "test"
92
+ Dynamic: license-file
93
+
94
+ <div align="center"><img src="https://raw.githubusercontent.com/optuna/optuna/master/docs/image/optuna-logo.png" width="800"/></div>
95
+
96
+ # Optuna: A hyperparameter optimization framework
97
+
98
+ [![Python](https://img.shields.io/badge/python-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue)](https://www.python.org)
99
+ [![pypi](https://img.shields.io/pypi/v/optuna.svg)](https://pypi.python.org/pypi/optuna)
100
+ [![conda](https://img.shields.io/conda/vn/conda-forge/optuna.svg)](https://anaconda.org/conda-forge/optuna)
101
+ [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/optuna/optuna)
102
+ [![Read the Docs](https://readthedocs.org/projects/optuna/badge/?version=stable)](https://optuna.readthedocs.io/en/stable/)
103
+
104
+ :link: [**Website**](https://optuna.org/)
105
+ | :page_with_curl: [**Docs**](https://optuna.readthedocs.io/en/stable/)
106
+ | :gear: [**Install Guide**](https://optuna.readthedocs.io/en/stable/installation.html)
107
+ | :pencil: [**Tutorial**](https://optuna.readthedocs.io/en/stable/tutorial/index.html)
108
+ | :bulb: [**Examples**](https://github.com/optuna/optuna-examples)
109
+ | [**Twitter**](https://twitter.com/OptunaAutoML)
110
+ | [**LinkedIn**](https://www.linkedin.com/showcase/optuna/)
111
+ | [**Medium**](https://medium.com/optuna)
112
+
113
+ *Optuna* is an automatic hyperparameter optimization software framework, particularly designed
114
+ for machine learning. It features an imperative, *define-by-run* style user API. Thanks to our
115
+ *define-by-run* API, the code written with Optuna enjoys high modularity, and the user of
116
+ Optuna can dynamically construct the search spaces for the hyperparameters.
117
+
118
+ ## :loudspeaker: News
119
+ Help us create the next version of Optuna!
120
+
121
+ Optuna 5.0 Roadmap published for review. Please take a look at [the planned improvements to Optuna](https://medium.com/optuna/optuna-v5-roadmap-ac7d6935a878), and share your feedback in [the github issues](https://github.com/optuna/optuna/labels/v5). PR contributions also welcome!
122
+
123
+ Please take a few minutes to fill in [this survey](https://forms.gle/wVwLCQ9g6st6AXuq9), and let us know how you use Optuna now and what improvements you'd like.🤔
124
+ All questions are optional. 🙇‍♂️
125
+
126
+ <!-- TODO: when you add a new line, please delete the oldest line -->
127
+ * **Jan 19, 2026**: Optuna 4.7.0 is out! Check out [the release note](https://github.com/optuna/optuna/releases/tag/v4.7.0) for details.
128
+ * **Nov 10, 2025**: A new article [Announcing Optuna 4.6](https://medium.com/optuna/announcing-optuna-4-6-a9e82183ab07) has been published.
129
+ * **Oct 28, 2025**: A new article [AutoSampler: Full Support for Multi-Objective & Constrained Optimization](https://medium.com/optuna/autosampler-full-support-for-multi-objective-constrained-optimization-c1c4fc957ba2) has been published.
130
+ * **Sep 22, 2025**: A new article [[Optuna v4.5] Gaussian Process-Based Sampler (GPSampler) Can Now Perform Constrained Multi-Objective Optimization](https://medium.com/optuna/optuna-v4-5-81e78d8e077a) has been published.
131
+ * **Jun 16, 2025**: Optuna 4.4.0 has been released! Check out [the release blog](https://medium.com/optuna/announcing-optuna-4-4-ece661493126).
132
+ * **May 26, 2025**: Optuna 5.0 roadmap has been published! See [the blog](https://medium.com/optuna/optuna-v5-roadmap-ac7d6935a878) for more details.
133
+
134
+ ## :fire: Key Features
135
+
136
+ Optuna has modern functionalities as follows:
137
+
138
+ - [Lightweight, versatile, and platform agnostic architecture](https://optuna.readthedocs.io/en/stable/tutorial/10_key_features/001_first.html)
139
+ - Handle a wide variety of tasks with a simple installation that has few requirements.
140
+ - [Pythonic search spaces](https://optuna.readthedocs.io/en/stable/tutorial/10_key_features/002_configurations.html)
141
+ - Define search spaces using familiar Python syntax including conditionals and loops.
142
+ - [Efficient optimization algorithms](https://optuna.readthedocs.io/en/stable/tutorial/10_key_features/003_efficient_optimization_algorithms.html)
143
+ - Adopt state-of-the-art algorithms for sampling hyperparameters and efficiently pruning unpromising trials.
144
+ - [Easy parallelization](https://optuna.readthedocs.io/en/stable/tutorial/10_key_features/004_distributed.html)
145
+ - Scale studies to tens or hundreds of workers with little or no changes to the code.
146
+ - [Quick visualization](https://optuna.readthedocs.io/en/stable/tutorial/10_key_features/005_visualization.html)
147
+ - Inspect optimization histories from a variety of plotting functions.
148
+
149
+
150
+ ## Basic Concepts
151
+
152
+ We use the terms *study* and *trial* as follows:
153
+
154
+ - Study: optimization based on an objective function
155
+ - Trial: a single execution of the objective function
156
+
157
+ Please refer to the sample code below. The goal of a *study* is to find out the optimal set of
158
+ hyperparameter values (e.g., `regressor` and `svr_c`) through multiple *trials* (e.g.,
159
+ `n_trials=100`). Optuna is a framework designed for automation and acceleration of
160
+ optimization *studies*.
161
+
162
+ <details open>
163
+ <summary>Sample code with scikit-learn</summary>
164
+
165
+ [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/optuna/optuna-examples/blob/main/quickstart.ipynb)
166
+
167
+ ```python
168
+ import optuna
169
+ import sklearn
170
+
171
+
172
+ # Define an objective function to be minimized.
173
+ def objective(trial):
174
+
175
+ # Invoke suggest methods of a Trial object to generate hyperparameters.
176
+ regressor_name = trial.suggest_categorical("regressor", ["SVR", "RandomForest"])
177
+ if regressor_name == "SVR":
178
+ svr_c = trial.suggest_float("svr_c", 1e-10, 1e10, log=True)
179
+ regressor_obj = sklearn.svm.SVR(C=svr_c)
180
+ else:
181
+ rf_max_depth = trial.suggest_int("rf_max_depth", 2, 32)
182
+ regressor_obj = sklearn.ensemble.RandomForestRegressor(max_depth=rf_max_depth)
183
+
184
+ X, y = sklearn.datasets.fetch_california_housing(return_X_y=True)
185
+ X_train, X_val, y_train, y_val = sklearn.model_selection.train_test_split(X, y, random_state=0)
186
+
187
+ regressor_obj.fit(X_train, y_train)
188
+ y_pred = regressor_obj.predict(X_val)
189
+
190
+ error = sklearn.metrics.mean_squared_error(y_val, y_pred)
191
+
192
+ return error # An objective value linked with the Trial object.
193
+
194
+
195
+ study = optuna.create_study() # Create a new study.
196
+ study.optimize(objective, n_trials=100) # Invoke optimization of the objective function.
197
+ ```
198
+ </details>
199
+
200
+ > [!NOTE]
201
+ > More examples can be found in [optuna/optuna-examples](https://github.com/optuna/optuna-examples).
202
+ >
203
+ > The examples cover diverse problem setups such as multi-objective optimization, constrained optimization, pruning, and distributed optimization.
204
+
205
+ ## Installation
206
+
207
+ Optuna is available at [the Python Package Index](https://pypi.org/project/optuna/) and on [Anaconda Cloud](https://anaconda.org/conda-forge/optuna).
208
+
209
+ ```bash
210
+ # PyPI
211
+ $ pip install optuna
212
+ ```
213
+
214
+ ```bash
215
+ # Anaconda Cloud
216
+ $ conda install -c conda-forge optuna
217
+ ```
218
+
219
+ > [!IMPORTANT]
220
+ > Optuna supports Python 3.9 or newer.
221
+ >
222
+ > Also, we provide Optuna docker images on [DockerHub](https://hub.docker.com/r/optuna/optuna).
223
+
224
+ ## Integrations
225
+
226
+ Optuna has integration features with various third-party libraries. Integrations can be found in [optuna/optuna-integration](https://github.com/optuna/optuna-integration) and the document is available [here](https://optuna-integration.readthedocs.io/en/stable/index.html).
227
+
228
+ <details>
229
+ <summary>Supported integration libraries</summary>
230
+
231
+ * [Catboost](https://github.com/optuna/optuna-examples/tree/main/catboost/catboost_pruning.py)
232
+ * [Dask](https://github.com/optuna/optuna-examples/tree/main/dask/dask_simple.py)
233
+ * [fastai](https://github.com/optuna/optuna-examples/tree/main/fastai/fastai_simple.py)
234
+ * [Keras](https://github.com/optuna/optuna-examples/tree/main/keras/keras_integration.py)
235
+ * [LightGBM](https://github.com/optuna/optuna-examples/tree/main/lightgbm/lightgbm_integration.py)
236
+ * [MLflow](https://github.com/optuna/optuna-examples/tree/main/mlflow/keras_mlflow.py)
237
+ * [PyTorch](https://github.com/optuna/optuna-examples/tree/main/pytorch/pytorch_simple.py)
238
+ * [PyTorch Ignite](https://github.com/optuna/optuna-examples/tree/main/pytorch/pytorch_ignite_simple.py)
239
+ * [PyTorch Lightning](https://github.com/optuna/optuna-examples/tree/main/pytorch/pytorch_lightning_simple.py)
240
+ * [TensorBoard](https://github.com/optuna/optuna-examples/tree/main/tensorboard/tensorboard_simple.py)
241
+ * [TensorFlow](https://github.com/optuna/optuna-examples/tree/main/tensorflow/tensorflow_estimator_integration.py)
242
+ * [tf.keras](https://github.com/optuna/optuna-examples/tree/main/tfkeras/tfkeras_integration.py)
243
+ * [Weights & Biases](https://github.com/optuna/optuna-examples/tree/main/wandb/wandb_integration.py)
244
+ * [XGBoost](https://github.com/optuna/optuna-examples/tree/main/xgboost/xgboost_integration.py)
245
+ </details>
246
+
247
+ ## Web Dashboard
248
+
249
+ [Optuna Dashboard](https://github.com/optuna/optuna-dashboard) is a real-time web dashboard for Optuna.
250
+ You can check the optimization history, hyperparameter importance, etc. in graphs and tables.
251
+ You don't need to create a Python script to call [Optuna's visualization](https://optuna.readthedocs.io/en/stable/reference/visualization/index.html) functions.
252
+ Feature requests and bug reports are welcome!
253
+
254
+ ![optuna-dashboard](https://user-images.githubusercontent.com/5564044/204975098-95c2cb8c-0fb5-4388-abc4-da32f56cb4e5.gif)
255
+
256
+ `optuna-dashboard` can be installed via pip:
257
+
258
+ ```shell
259
+ $ pip install optuna-dashboard
260
+ ```
261
+
262
+ > [!TIP]
263
+ > Please check out the convenience of Optuna Dashboard using the sample code below.
264
+
265
+ <details>
266
+ <summary>Sample code to launch Optuna Dashboard</summary>
267
+
268
+ Save the following code as `optimize_toy.py`.
269
+
270
+ ```python
271
+ import optuna
272
+
273
+
274
+ def objective(trial):
275
+ x1 = trial.suggest_float("x1", -100, 100)
276
+ x2 = trial.suggest_float("x2", -100, 100)
277
+ return x1**2 + 0.01 * x2**2
278
+
279
+
280
+ study = optuna.create_study(storage="sqlite:///db.sqlite3") # Create a new study with database.
281
+ study.optimize(objective, n_trials=100)
282
+ ```
283
+
284
+ Then try the commands below:
285
+
286
+ ```shell
287
+ # Run the study specified above
288
+ $ python optimize_toy.py
289
+
290
+ # Launch the dashboard based on the storage `sqlite:///db.sqlite3`
291
+ $ optuna-dashboard sqlite:///db.sqlite3
292
+ ...
293
+ Listening on http://localhost:8080/
294
+ Hit Ctrl-C to quit.
295
+ ```
296
+
297
+ </details>
298
+
299
+
300
+ ## OptunaHub
301
+
302
+ [OptunaHub](https://hub.optuna.org/) is a feature-sharing platform for Optuna.
303
+ You can use the registered features and publish your packages.
304
+
305
+ ### Use registered features
306
+
307
+ `optunahub` can be installed via pip:
308
+
309
+ ```shell
310
+ $ pip install optunahub
311
+ # Install AutoSampler dependencies (CPU only is sufficient for PyTorch)
312
+ $ pip install cmaes scipy torch --extra-index-url https://download.pytorch.org/whl/cpu
313
+ ```
314
+
315
+ You can load registered module with `optunahub.load_module`.
316
+
317
+ ```python
318
+ import optuna
319
+ import optunahub
320
+
321
+
322
+ def objective(trial: optuna.Trial) -> float:
323
+ x = trial.suggest_float("x", -5, 5)
324
+ y = trial.suggest_float("y", -5, 5)
325
+ return x**2 + y**2
326
+
327
+
328
+ module = optunahub.load_module(package="samplers/auto_sampler")
329
+ study = optuna.create_study(sampler=module.AutoSampler())
330
+ study.optimize(objective, n_trials=10)
331
+
332
+ print(study.best_trial.value, study.best_trial.params)
333
+ ```
334
+
335
+ For more details, please refer to [the optunahub documentation](https://optuna.github.io/optunahub/).
336
+
337
+ ### Publish your packages
338
+
339
+ You can publish your package via [optunahub-registry](https://github.com/optuna/optunahub-registry).
340
+ See the [Tutorials for Contributors](https://optuna.github.io/optunahub/tutorials_for_contributors.html) in OptunaHub.
341
+
342
+
343
+ ## Communication
344
+
345
+ - [GitHub Discussions] for questions.
346
+ - [GitHub Issues] for bug reports and feature requests.
347
+
348
+ [GitHub Discussions]: https://github.com/optuna/optuna/discussions
349
+ [GitHub issues]: https://github.com/optuna/optuna/issues
350
+
351
+
352
+ ## Contribution
353
+
354
+ Any contributions to Optuna are more than welcome!
355
+
356
+ If you are new to Optuna, please check the [good first issues](https://github.com/optuna/optuna/labels/good%20first%20issue). They are relatively simple, well-defined, and often good starting points for you to get familiar with the contribution workflow and other developers.
357
+
358
+ If you already have contributed to Optuna, we recommend the other [contribution-welcome issues](https://github.com/optuna/optuna/labels/contribution-welcome).
359
+
360
+ For general guidelines on how to contribute to the project, take a look at [CONTRIBUTING.md](./CONTRIBUTING.md).
361
+
362
+
363
+ ## Reference
364
+
365
+ If you use Optuna in one of your research projects, please cite [our KDD paper](https://doi.org/10.1145/3292500.3330701) "Optuna: A Next-generation Hyperparameter Optimization Framework":
366
+
367
+ <details open>
368
+ <summary>BibTeX</summary>
369
+
370
+ ```bibtex
371
+ @inproceedings{akiba2019optuna,
372
+ title={{O}ptuna: A Next-Generation Hyperparameter Optimization Framework},
373
+ author={Akiba, Takuya and Sano, Shotaro and Yanase, Toshihiko and Ohta, Takeru and Koyama, Masanori},
374
+ booktitle={The 25th ACM SIGKDD International Conference on Knowledge Discovery \& Data Mining},
375
+ pages={2623--2631},
376
+ year={2019}
377
+ }
378
+ ```
379
+ </details>
380
+
381
+
382
+ ## License
383
+
384
+ MIT License (see [LICENSE](./LICENSE)).
385
+
386
+ Optuna uses the codes from SciPy and fdlibm projects (see [LICENSE_THIRD_PARTY](./LICENSE_THIRD_PARTY)).