Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .cache/pip/http-v2/2/3/5/3/9/235392053f2a1040f180b6ba82c549e2c6a0340d4d823ef3a0847ef7 +0 -0
- .cache/pip/http-v2/2/3/5/3/9/235392053f2a1040f180b6ba82c549e2c6a0340d4d823ef3a0847ef7.body +412 -0
- .cache/pip/http-v2/2/b/0/a/4/2b0a4fda1a2c912a5a1c5245a8b34b5da87876e311f607befabc98ee +0 -0
- .cache/pip/http-v2/2/b/0/a/4/2b0a4fda1a2c912a5a1c5245a8b34b5da87876e311f607befabc98ee.body +0 -0
- .cache/pip/http-v2/2/d/2/7/4/2d274909802a294101952666e88fb2e3b7731b90c4e0fa9015d5a2c9 +0 -0
- .cache/pip/http-v2/2/d/2/7/4/2d274909802a294101952666e88fb2e3b7731b90c4e0fa9015d5a2c9.body +145 -0
- .cache/pip/http-v2/2/d/6/8/c/2d68cb8c0f241b29ad33be7542692060ee719dcc402ab1ff4e929f83 +0 -0
- .cache/pip/http-v2/2/d/6/8/c/2d68cb8c0f241b29ad33be7542692060ee719dcc402ab1ff4e929f83.body +111 -0
- .cache/pip/http-v2/9/0/6/7/9/906797ab7b3f56fdd856b186be66ce1ad5fb99862a404c1091a707b6 +0 -0
- .cache/pip/http-v2/9/0/6/7/9/906797ab7b3f56fdd856b186be66ce1ad5fb99862a404c1091a707b6.body +0 -0
- .cache/pip/http-v2/9/0/f/6/e/90f6e704e426d3e4b799bd86b309263491ea7f0afc8f3ceaab5d10eb +0 -0
- .cache/pip/http-v2/9/0/f/6/e/90f6e704e426d3e4b799bd86b309263491ea7f0afc8f3ceaab5d10eb.body +3 -0
- .cache/pip/http-v2/9/6/7/8/5/967857dd3681a1bb83c9632aad9815556f1da84934ad6aa3be0d7700 +0 -0
- .cache/pip/http-v2/9/6/7/8/5/967857dd3681a1bb83c9632aad9815556f1da84934ad6aa3be0d7700.body +0 -0
- .cache/pip/http-v2/9/7/0/f/b/970fb010d96ba12f844b7b6b8685fd55f20ad694da9809705baa4f9b +0 -0
- .cache/pip/http-v2/9/7/0/f/b/970fb010d96ba12f844b7b6b8685fd55f20ad694da9809705baa4f9b.body +133 -0
- .cache/pip/http-v2/9/8/b/e/c/98bec8f6573cfda1d5b6925f60bc00cab60250ad06f2886adaa32c22 +0 -0
- .cache/pip/http-v2/9/8/b/e/c/98bec8f6573cfda1d5b6925f60bc00cab60250ad06f2886adaa32c22.body +3 -0
- .cache/pip/http-v2/9/b/0/a/e/9b0ae3352e0682a4ded5c6f53d9053328ff974179c7dcd6dac96d2a9 +0 -0
- .cache/pip/http-v2/9/b/0/a/e/9b0ae3352e0682a4ded5c6f53d9053328ff974179c7dcd6dac96d2a9.body +0 -0
- .cache/pip/http-v2/9/b/5/1/6/9b51619e20a708f99372afefd7dbe20a1b5e42ae213f02bf27267976 +0 -0
- .cache/pip/http-v2/9/b/5/1/6/9b51619e20a708f99372afefd7dbe20a1b5e42ae213f02bf27267976.body +3 -0
- .cache/pip/http-v2/9/d/5/d/f/9d5dfb0dedf17094821c37079d37c9f4a1256a7dc457c1192cfa1573 +0 -0
- .cache/pip/http-v2/9/d/5/d/f/9d5dfb0dedf17094821c37079d37c9f4a1256a7dc457c1192cfa1573.body +3 -0
- .cache/pip/http-v2/9/e/2/9/3/9e293f5a39d8466e2b362aa21216c5e4bc32898b0a39bfff792d145e +0 -0
- .cache/pip/http-v2/9/e/2/9/3/9e293f5a39d8466e2b362aa21216c5e4bc32898b0a39bfff792d145e.body +0 -0
- .cache/pip/http-v2/a/1/9/5/3/a19537d3cf37c122db841d6fe4cd322bc10d1a558bb00d146b85cb9a +0 -0
- .cache/pip/http-v2/a/1/9/5/3/a19537d3cf37c122db841d6fe4cd322bc10d1a558bb00d146b85cb9a.body +0 -0
- .cache/pip/http-v2/a/3/2/f/7/a32f793a951b4bb55e15bb0126f9c9127aab8cec4ba5607016d8841e +0 -0
- .cache/pip/http-v2/a/3/2/f/7/a32f793a951b4bb55e15bb0126f9c9127aab8cec4ba5607016d8841e.body +3 -0
- .cache/pip/http-v2/a/7/a/1/2/a7a12c025695d568f5d73aa1b3adb9e9b040c3d15606f125747a2f15 +0 -0
- .cache/pip/http-v2/a/7/a/1/2/a7a12c025695d568f5d73aa1b3adb9e9b040c3d15606f125747a2f15.body +3 -0
- .cache/pip/http-v2/a/7/a/a/2/a7aa27d44766b273b983795410c3973ddf07f165d571427f3ac8a4d8 +0 -0
- .cache/pip/http-v2/a/7/a/a/2/a7aa27d44766b273b983795410c3973ddf07f165d571427f3ac8a4d8.body +87 -0
- .cache/pip/http-v2/a/f/5/3/d/af53d10b2a0401eb083b4e24ccf3518cc83ed2a451d87928b17de49a +0 -0
- .cache/pip/http-v2/a/f/5/3/d/af53d10b2a0401eb083b4e24ccf3518cc83ed2a451d87928b17de49a.body +0 -0
- .cache/pip/http-v2/b/5/7/a/9/b57a93fe5f8c75cd00cfe703d012d39466ff7ca30bf44d13df4112f6.body +3 -0
- .cache/pip/http-v2/c/d/5/d/e/cd5de44b899cbe1869765c21b55cffc53c0c0ffa9d3c6f1fd40a42a2 +0 -0
- .cache/pip/http-v2/c/d/5/d/e/cd5de44b899cbe1869765c21b55cffc53c0c0ffa9d3c6f1fd40a42a2.body +3 -0
- .cache/pip/http-v2/c/e/c/1/b/cec1bb6b101929401b32f9eedea53965267cc98d341b695a852cad6f.body +3 -0
- .gitattributes +9 -0
- runs/EfficientNetB0_frozen_new_image_size/repeated_holdout/stratified_holdout_v1/manifests/splits/split_001.json +0 -0
- runs/EfficientNetB0_frozen_new_image_size/repeated_holdout/stratified_holdout_v1/manifests/splits/split_002.json +0 -0
- runs/EfficientNetB0_frozen_new_image_size/repeated_holdout/stratified_holdout_v1/manifests/splits/split_003.json +0 -0
- runs/EfficientNetB0_frozen_new_image_size/repeated_holdout/stratified_holdout_v1/manifests/splits/split_004.json +0 -0
- runs/EfficientNetB0_frozen_new_image_size/repeated_holdout/stratified_holdout_v1/manifests/subsets/split_001_pct_005_repeat_01.json +0 -0
- runs/EfficientNetB0_frozen_new_image_size/repeated_holdout/stratified_holdout_v1/manifests/subsets/split_001_pct_005_repeat_02.json +0 -0
- runs/EfficientNetB0_frozen_new_image_size/repeated_holdout/stratified_holdout_v1/manifests/subsets/split_001_pct_005_repeat_03.json +0 -0
- runs/EfficientNetB0_frozen_new_image_size/repeated_holdout/stratified_holdout_v1/manifests/subsets/split_001_pct_005_repeat_04.json +0 -0
- runs/EfficientNetB0_frozen_new_image_size/repeated_holdout/stratified_holdout_v1/manifests/subsets/split_001_pct_015_repeat_01.json +0 -0
.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/2/d/2/7/4/2d274909802a294101952666e88fb2e3b7731b90c4e0fa9015d5a2c9.body
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.4
|
| 2 |
+
Name: annotated-doc
|
| 3 |
+
Version: 0.0.4
|
| 4 |
+
Summary: Document parameters, class attributes, return types, and variables inline, with Annotated.
|
| 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 :: Internet
|
| 14 |
+
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
| 15 |
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
| 16 |
+
Classifier: Topic :: Software Development :: Libraries
|
| 17 |
+
Classifier: Topic :: Software Development
|
| 18 |
+
Classifier: Typing :: Typed
|
| 19 |
+
Classifier: Development Status :: 4 - Beta
|
| 20 |
+
Classifier: Intended Audience :: Developers
|
| 21 |
+
Classifier: Programming Language :: Python :: 3 :: Only
|
| 22 |
+
Classifier: Programming Language :: Python :: 3.8
|
| 23 |
+
Classifier: Programming Language :: Python :: 3.9
|
| 24 |
+
Classifier: Programming Language :: Python :: 3.10
|
| 25 |
+
Classifier: Programming Language :: Python :: 3.11
|
| 26 |
+
Classifier: Programming Language :: Python :: 3.12
|
| 27 |
+
Classifier: Programming Language :: Python :: 3.13
|
| 28 |
+
Classifier: Programming Language :: Python :: 3.14
|
| 29 |
+
Project-URL: Homepage, https://github.com/fastapi/annotated-doc
|
| 30 |
+
Project-URL: Documentation, https://github.com/fastapi/annotated-doc
|
| 31 |
+
Project-URL: Repository, https://github.com/fastapi/annotated-doc
|
| 32 |
+
Project-URL: Issues, https://github.com/fastapi/annotated-doc/issues
|
| 33 |
+
Project-URL: Changelog, https://github.com/fastapi/annotated-doc/release-notes.md
|
| 34 |
+
Requires-Python: >=3.8
|
| 35 |
+
Description-Content-Type: text/markdown
|
| 36 |
+
|
| 37 |
+
# Annotated Doc
|
| 38 |
+
|
| 39 |
+
Document parameters, class attributes, return types, and variables inline, with `Annotated`.
|
| 40 |
+
|
| 41 |
+
<a href="https://github.com/fastapi/annotated-doc/actions?query=workflow%3ATest+event%3Apush+branch%3Amain" target="_blank">
|
| 42 |
+
<img src="https://github.com/fastapi/annotated-doc/actions/workflows/test.yml/badge.svg?event=push&branch=main" alt="Test">
|
| 43 |
+
</a>
|
| 44 |
+
<a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/annotated-doc" target="_blank">
|
| 45 |
+
<img src="https://coverage-badge.samuelcolvin.workers.dev/fastapi/annotated-doc.svg" alt="Coverage">
|
| 46 |
+
</a>
|
| 47 |
+
<a href="https://pypi.org/project/annotated-doc" target="_blank">
|
| 48 |
+
<img src="https://img.shields.io/pypi/v/annotated-doc?color=%2334D058&label=pypi%20package" alt="Package version">
|
| 49 |
+
</a>
|
| 50 |
+
<a href="https://pypi.org/project/annotated-doc" target="_blank">
|
| 51 |
+
<img src="https://img.shields.io/pypi/pyversions/annotated-doc.svg?color=%2334D058" alt="Supported Python versions">
|
| 52 |
+
</a>
|
| 53 |
+
|
| 54 |
+
## Installation
|
| 55 |
+
|
| 56 |
+
```bash
|
| 57 |
+
pip install annotated-doc
|
| 58 |
+
```
|
| 59 |
+
|
| 60 |
+
Or with `uv`:
|
| 61 |
+
|
| 62 |
+
```Python
|
| 63 |
+
uv add annotated-doc
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
## Usage
|
| 67 |
+
|
| 68 |
+
Import `Doc` and pass a single literal string with the documentation for the specific parameter, class attribute, return type, or variable.
|
| 69 |
+
|
| 70 |
+
For example, to document a parameter `name` in a function `hi` you could do:
|
| 71 |
+
|
| 72 |
+
```Python
|
| 73 |
+
from typing import Annotated
|
| 74 |
+
|
| 75 |
+
from annotated_doc import Doc
|
| 76 |
+
|
| 77 |
+
def hi(name: Annotated[str, Doc("Who to say hi to")]) -> None:
|
| 78 |
+
print(f"Hi, {name}!")
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
You can also use it to document class attributes:
|
| 82 |
+
|
| 83 |
+
```Python
|
| 84 |
+
from typing import Annotated
|
| 85 |
+
|
| 86 |
+
from annotated_doc import Doc
|
| 87 |
+
|
| 88 |
+
class User:
|
| 89 |
+
name: Annotated[str, Doc("The user's name")]
|
| 90 |
+
age: Annotated[int, Doc("The user's age")]
|
| 91 |
+
```
|
| 92 |
+
|
| 93 |
+
The same way, you could document return types and variables, or anything that could have a type annotation with `Annotated`.
|
| 94 |
+
|
| 95 |
+
## Who Uses This
|
| 96 |
+
|
| 97 |
+
`annotated-doc` was made for:
|
| 98 |
+
|
| 99 |
+
* [FastAPI](https://fastapi.tiangolo.com/)
|
| 100 |
+
* [Typer](https://typer.tiangolo.com/)
|
| 101 |
+
* [SQLModel](https://sqlmodel.tiangolo.com/)
|
| 102 |
+
* [Asyncer](https://asyncer.tiangolo.com/)
|
| 103 |
+
|
| 104 |
+
`annotated-doc` is supported by [griffe-typingdoc](https://github.com/mkdocstrings/griffe-typingdoc), which powers reference documentation like the one in the [FastAPI Reference](https://fastapi.tiangolo.com/reference/).
|
| 105 |
+
|
| 106 |
+
## Reasons not to use `annotated-doc`
|
| 107 |
+
|
| 108 |
+
You are already comfortable with one of the existing docstring formats, like:
|
| 109 |
+
|
| 110 |
+
* Sphinx
|
| 111 |
+
* numpydoc
|
| 112 |
+
* Google
|
| 113 |
+
* Keras
|
| 114 |
+
|
| 115 |
+
Your team is already comfortable using them.
|
| 116 |
+
|
| 117 |
+
You prefer having the documentation about parameters all together in a docstring, separated from the code defining them.
|
| 118 |
+
|
| 119 |
+
You care about a specific set of users, using one specific editor, and that editor already has support for the specific docstring format you use.
|
| 120 |
+
|
| 121 |
+
## Reasons to use `annotated-doc`
|
| 122 |
+
|
| 123 |
+
* No micro-syntax to learn for newcomers, it’s **just Python** syntax.
|
| 124 |
+
* **Editing** would be already fully supported by default by any editor (current or future) supporting Python syntax, including syntax errors, syntax highlighting, etc.
|
| 125 |
+
* **Rendering** would be relatively straightforward to implement by static tools (tools that don't need runtime execution), as the information can be extracted from the AST they normally already create.
|
| 126 |
+
* **Deduplication of information**: the name of a parameter would be defined in a single place, not duplicated inside of a docstring.
|
| 127 |
+
* **Elimination** of the possibility of having **inconsistencies** when removing a parameter or class variable and **forgetting to remove** its documentation.
|
| 128 |
+
* **Minimization** of the probability of adding a new parameter or class variable and **forgetting to add its documentation**.
|
| 129 |
+
* **Elimination** of the possibility of having **inconsistencies** between the **name** of a parameter in the **signature** and the name in the docstring when it is renamed.
|
| 130 |
+
* **Access** to the documentation string for each symbol at **runtime**, including existing (older) Python versions.
|
| 131 |
+
* A more formalized way to document other symbols, like type aliases, that could use Annotated.
|
| 132 |
+
* **Support** for apps using FastAPI, Typer and others.
|
| 133 |
+
* **AI Accessibility**: AI tools will have an easier way understanding each parameter as the distance from documentation to parameter is much closer.
|
| 134 |
+
|
| 135 |
+
## History
|
| 136 |
+
|
| 137 |
+
I ([@tiangolo](https://github.com/tiangolo)) originally wanted for this to be part of the Python standard library (in [PEP 727](https://peps.python.org/pep-0727/)), but the proposal was withdrawn as there was a fair amount of negative feedback and opposition.
|
| 138 |
+
|
| 139 |
+
The conclusion was that this was better done as an external effort, in a third-party library.
|
| 140 |
+
|
| 141 |
+
So, here it is, with a simpler approach, as a third-party library, in a way that can be used by others, starting with FastAPI and friends.
|
| 142 |
+
|
| 143 |
+
## License
|
| 144 |
+
|
| 145 |
+
This project is licensed under the terms of the MIT license.
|
.cache/pip/http-v2/2/d/6/8/c/2d68cb8c0f241b29ad33be7542692060ee719dcc402ab1ff4e929f83
ADDED
|
Binary file (1.2 kB). View file
|
|
|
.cache/pip/http-v2/2/d/6/8/c/2d68cb8c0f241b29ad33be7542692060ee719dcc402ab1ff4e929f83.body
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.4
|
| 2 |
+
Name: pip
|
| 3 |
+
Version: 26.0.1
|
| 4 |
+
Summary: The PyPA recommended tool for installing Python packages.
|
| 5 |
+
Author-email: The pip developers <distutils-sig@python.org>
|
| 6 |
+
Requires-Python: >=3.9
|
| 7 |
+
Description-Content-Type: text/x-rst
|
| 8 |
+
License-Expression: MIT
|
| 9 |
+
Classifier: Development Status :: 5 - Production/Stable
|
| 10 |
+
Classifier: Intended Audience :: Developers
|
| 11 |
+
Classifier: Topic :: Software Development :: Build Tools
|
| 12 |
+
Classifier: Programming Language :: Python
|
| 13 |
+
Classifier: Programming Language :: Python :: 3
|
| 14 |
+
Classifier: Programming Language :: Python :: 3 :: Only
|
| 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 :: Implementation :: CPython
|
| 22 |
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
| 23 |
+
License-File: AUTHORS.txt
|
| 24 |
+
License-File: LICENSE.txt
|
| 25 |
+
License-File: src/pip/_vendor/cachecontrol/LICENSE.txt
|
| 26 |
+
License-File: src/pip/_vendor/certifi/LICENSE
|
| 27 |
+
License-File: src/pip/_vendor/dependency_groups/LICENSE.txt
|
| 28 |
+
License-File: src/pip/_vendor/distlib/LICENSE.txt
|
| 29 |
+
License-File: src/pip/_vendor/distro/LICENSE
|
| 30 |
+
License-File: src/pip/_vendor/idna/LICENSE.md
|
| 31 |
+
License-File: src/pip/_vendor/msgpack/COPYING
|
| 32 |
+
License-File: src/pip/_vendor/packaging/LICENSE
|
| 33 |
+
License-File: src/pip/_vendor/packaging/LICENSE.APACHE
|
| 34 |
+
License-File: src/pip/_vendor/packaging/LICENSE.BSD
|
| 35 |
+
License-File: src/pip/_vendor/pkg_resources/LICENSE
|
| 36 |
+
License-File: src/pip/_vendor/platformdirs/LICENSE
|
| 37 |
+
License-File: src/pip/_vendor/pygments/LICENSE
|
| 38 |
+
License-File: src/pip/_vendor/pyproject_hooks/LICENSE
|
| 39 |
+
License-File: src/pip/_vendor/requests/LICENSE
|
| 40 |
+
License-File: src/pip/_vendor/resolvelib/LICENSE
|
| 41 |
+
License-File: src/pip/_vendor/rich/LICENSE
|
| 42 |
+
License-File: src/pip/_vendor/tomli/LICENSE
|
| 43 |
+
License-File: src/pip/_vendor/tomli_w/LICENSE
|
| 44 |
+
License-File: src/pip/_vendor/truststore/LICENSE
|
| 45 |
+
License-File: src/pip/_vendor/urllib3/LICENSE.txt
|
| 46 |
+
Project-URL: Changelog, https://pip.pypa.io/en/stable/news/
|
| 47 |
+
Project-URL: Documentation, https://pip.pypa.io
|
| 48 |
+
Project-URL: Homepage, https://pip.pypa.io/
|
| 49 |
+
Project-URL: Source, https://github.com/pypa/pip
|
| 50 |
+
|
| 51 |
+
pip - The Python Package Installer
|
| 52 |
+
==================================
|
| 53 |
+
|
| 54 |
+
.. |pypi-version| image:: https://img.shields.io/pypi/v/pip.svg
|
| 55 |
+
:target: https://pypi.org/project/pip/
|
| 56 |
+
:alt: PyPI
|
| 57 |
+
|
| 58 |
+
.. |python-versions| image:: https://img.shields.io/pypi/pyversions/pip
|
| 59 |
+
:target: https://pypi.org/project/pip
|
| 60 |
+
:alt: PyPI - Python Version
|
| 61 |
+
|
| 62 |
+
.. |docs-badge| image:: https://readthedocs.org/projects/pip/badge/?version=latest
|
| 63 |
+
:target: https://pip.pypa.io/en/latest
|
| 64 |
+
:alt: Documentation
|
| 65 |
+
|
| 66 |
+
|pypi-version| |python-versions| |docs-badge|
|
| 67 |
+
|
| 68 |
+
pip is the `package installer`_ for Python. You can use pip to install packages from the `Python Package Index`_ and other indexes.
|
| 69 |
+
|
| 70 |
+
Please take a look at our documentation for how to install and use pip:
|
| 71 |
+
|
| 72 |
+
* `Installation`_
|
| 73 |
+
* `Usage`_
|
| 74 |
+
|
| 75 |
+
We release updates regularly, with a new version every 3 months. Find more details in our documentation:
|
| 76 |
+
|
| 77 |
+
* `Release notes`_
|
| 78 |
+
* `Release process`_
|
| 79 |
+
|
| 80 |
+
If you find bugs, need help, or want to talk to the developers, please use our mailing lists or chat rooms:
|
| 81 |
+
|
| 82 |
+
* `Issue tracking`_
|
| 83 |
+
* `Discourse channel`_
|
| 84 |
+
* `User IRC`_
|
| 85 |
+
|
| 86 |
+
If you want to get involved, head over to GitHub to get the source code, look at our development documentation and feel free to jump on the developer mailing lists and chat rooms:
|
| 87 |
+
|
| 88 |
+
* `GitHub page`_
|
| 89 |
+
* `Development documentation`_
|
| 90 |
+
* `Development IRC`_
|
| 91 |
+
|
| 92 |
+
Code of Conduct
|
| 93 |
+
---------------
|
| 94 |
+
|
| 95 |
+
Everyone interacting in the pip project's codebases, issue trackers, chat
|
| 96 |
+
rooms, and mailing lists is expected to follow the `PSF Code of Conduct`_.
|
| 97 |
+
|
| 98 |
+
.. _package installer: https://packaging.python.org/guides/tool-recommendations/
|
| 99 |
+
.. _Python Package Index: https://pypi.org
|
| 100 |
+
.. _Installation: https://pip.pypa.io/en/stable/installation/
|
| 101 |
+
.. _Usage: https://pip.pypa.io/en/stable/
|
| 102 |
+
.. _Release notes: https://pip.pypa.io/en/stable/news.html
|
| 103 |
+
.. _Release process: https://pip.pypa.io/en/latest/development/release-process/
|
| 104 |
+
.. _GitHub page: https://github.com/pypa/pip
|
| 105 |
+
.. _Development documentation: https://pip.pypa.io/en/latest/development
|
| 106 |
+
.. _Issue tracking: https://github.com/pypa/pip/issues
|
| 107 |
+
.. _Discourse channel: https://discuss.python.org/c/packaging
|
| 108 |
+
.. _User IRC: https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa
|
| 109 |
+
.. _Development IRC: https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa-dev
|
| 110 |
+
.. _PSF Code of Conduct: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md
|
| 111 |
+
|
.cache/pip/http-v2/9/0/6/7/9/906797ab7b3f56fdd856b186be66ce1ad5fb99862a404c1091a707b6
ADDED
|
Binary file (1.87 kB). View file
|
|
|
.cache/pip/http-v2/9/0/6/7/9/906797ab7b3f56fdd856b186be66ce1ad5fb99862a404c1091a707b6.body
ADDED
|
Binary file (69.5 kB). View file
|
|
|
.cache/pip/http-v2/9/0/f/6/e/90f6e704e426d3e4b799bd86b309263491ea7f0afc8f3ceaab5d10eb
ADDED
|
Binary file (1.18 kB). View file
|
|
|
.cache/pip/http-v2/9/0/f/6/e/90f6e704e426d3e4b799bd86b309263491ea7f0afc8f3ceaab5d10eb.body
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c34e09047771aa4dd8878b4f899e8125700cd1f8f7db16e58c37204154151a05
|
| 3 |
+
size 154789
|
.cache/pip/http-v2/9/6/7/8/5/967857dd3681a1bb83c9632aad9815556f1da84934ad6aa3be0d7700
ADDED
|
Binary file (1.86 kB). View file
|
|
|
.cache/pip/http-v2/9/6/7/8/5/967857dd3681a1bb83c9632aad9815556f1da84934ad6aa3be0d7700.body
ADDED
|
Binary file (1.1 kB). View file
|
|
|
.cache/pip/http-v2/9/7/0/f/b/970fb010d96ba12f844b7b6b8685fd55f20ad694da9809705baa4f9b
ADDED
|
Binary file (1.2 kB). View file
|
|
|
.cache/pip/http-v2/9/7/0/f/b/970fb010d96ba12f844b7b6b8685fd55f20ad694da9809705baa4f9b.body
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.4
|
| 2 |
+
Name: safetensors
|
| 3 |
+
Version: 0.7.0
|
| 4 |
+
Classifier: Development Status :: 5 - Production/Stable
|
| 5 |
+
Classifier: Intended Audience :: Developers
|
| 6 |
+
Classifier: Intended Audience :: Education
|
| 7 |
+
Classifier: Intended Audience :: Science/Research
|
| 8 |
+
Classifier: License :: OSI Approved :: Apache Software License
|
| 9 |
+
Classifier: Operating System :: OS Independent
|
| 10 |
+
Classifier: Programming Language :: Python :: 3
|
| 11 |
+
Classifier: Programming Language :: Python :: 3.7
|
| 12 |
+
Classifier: Programming Language :: Python :: 3.8
|
| 13 |
+
Classifier: Programming Language :: Python :: 3.9
|
| 14 |
+
Classifier: Programming Language :: Python :: 3.10
|
| 15 |
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
| 16 |
+
Classifier: Typing :: Typed
|
| 17 |
+
Requires-Dist: numpy>=1.21.6 ; extra == 'numpy'
|
| 18 |
+
Requires-Dist: packaging ; extra == 'torch'
|
| 19 |
+
Requires-Dist: safetensors[numpy] ; extra == 'torch'
|
| 20 |
+
Requires-Dist: torch>=1.10 ; extra == 'torch'
|
| 21 |
+
Requires-Dist: safetensors[numpy] ; extra == 'tensorflow'
|
| 22 |
+
Requires-Dist: tensorflow>=2.11.0 ; extra == 'tensorflow'
|
| 23 |
+
Requires-Dist: safetensors[numpy] ; extra == 'pinned-tf'
|
| 24 |
+
Requires-Dist: tensorflow==2.18.0 ; extra == 'pinned-tf'
|
| 25 |
+
Requires-Dist: safetensors[numpy] ; extra == 'jax'
|
| 26 |
+
Requires-Dist: flax>=0.6.3 ; extra == 'jax'
|
| 27 |
+
Requires-Dist: jax>=0.3.25 ; extra == 'jax'
|
| 28 |
+
Requires-Dist: jaxlib>=0.3.25 ; extra == 'jax'
|
| 29 |
+
Requires-Dist: mlx>=0.0.9 ; extra == 'mlx'
|
| 30 |
+
Requires-Dist: safetensors[numpy] ; extra == 'paddlepaddle'
|
| 31 |
+
Requires-Dist: paddlepaddle>=2.4.1 ; extra == 'paddlepaddle'
|
| 32 |
+
Requires-Dist: ruff ; extra == 'quality'
|
| 33 |
+
Requires-Dist: safetensors[numpy] ; extra == 'testing'
|
| 34 |
+
Requires-Dist: h5py>=3.7.0 ; extra == 'testing'
|
| 35 |
+
Requires-Dist: huggingface-hub>=0.12.1 ; extra == 'testing'
|
| 36 |
+
Requires-Dist: setuptools-rust>=1.5.2 ; extra == 'testing'
|
| 37 |
+
Requires-Dist: pytest>=7.2.0 ; extra == 'testing'
|
| 38 |
+
Requires-Dist: pytest-benchmark>=4.0.0 ; extra == 'testing'
|
| 39 |
+
Requires-Dist: hypothesis>=6.70.2 ; extra == 'testing'
|
| 40 |
+
Requires-Dist: safetensors[numpy] ; extra == 'testingfree'
|
| 41 |
+
Requires-Dist: huggingface-hub>=0.12.1 ; extra == 'testingfree'
|
| 42 |
+
Requires-Dist: setuptools-rust>=1.5.2 ; extra == 'testingfree'
|
| 43 |
+
Requires-Dist: pytest>=7.2.0 ; extra == 'testingfree'
|
| 44 |
+
Requires-Dist: pytest-benchmark>=4.0.0 ; extra == 'testingfree'
|
| 45 |
+
Requires-Dist: hypothesis>=6.70.2 ; extra == 'testingfree'
|
| 46 |
+
Requires-Dist: safetensors[torch] ; extra == 'all'
|
| 47 |
+
Requires-Dist: safetensors[numpy] ; extra == 'all'
|
| 48 |
+
Requires-Dist: safetensors[pinned-tf] ; extra == 'all'
|
| 49 |
+
Requires-Dist: safetensors[jax] ; extra == 'all'
|
| 50 |
+
Requires-Dist: safetensors[paddlepaddle] ; extra == 'all'
|
| 51 |
+
Requires-Dist: safetensors[quality] ; extra == 'all'
|
| 52 |
+
Requires-Dist: safetensors[testing] ; extra == 'all'
|
| 53 |
+
Requires-Dist: safetensors[all] ; extra == 'dev'
|
| 54 |
+
Provides-Extra: numpy
|
| 55 |
+
Provides-Extra: torch
|
| 56 |
+
Provides-Extra: tensorflow
|
| 57 |
+
Provides-Extra: pinned-tf
|
| 58 |
+
Provides-Extra: jax
|
| 59 |
+
Provides-Extra: mlx
|
| 60 |
+
Provides-Extra: paddlepaddle
|
| 61 |
+
Provides-Extra: quality
|
| 62 |
+
Provides-Extra: testing
|
| 63 |
+
Provides-Extra: testingfree
|
| 64 |
+
Provides-Extra: all
|
| 65 |
+
Provides-Extra: dev
|
| 66 |
+
License-File: LICENSE
|
| 67 |
+
Author-email: Nicolas Patry <patry.nicolas@protonmail.com>
|
| 68 |
+
Requires-Python: >=3.9
|
| 69 |
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
| 70 |
+
Project-URL: Homepage, https://github.com/huggingface/safetensors
|
| 71 |
+
Project-URL: Source, https://github.com/huggingface/safetensors
|
| 72 |
+
|
| 73 |
+
## Installation
|
| 74 |
+
|
| 75 |
+
```
|
| 76 |
+
pip install safetensors
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
## Usage
|
| 81 |
+
|
| 82 |
+
### Numpy
|
| 83 |
+
|
| 84 |
+
```python
|
| 85 |
+
from safetensors.numpy import save_file, load_file
|
| 86 |
+
import numpy as np
|
| 87 |
+
|
| 88 |
+
tensors = {
|
| 89 |
+
"a": np.zeros((2, 2)),
|
| 90 |
+
"b": np.zeros((2, 3), dtype=np.uint8)
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
save_file(tensors, "./model.safetensors")
|
| 94 |
+
|
| 95 |
+
|
| 96 |
+
# Now loading
|
| 97 |
+
loaded = load_file("./model.safetensors")
|
| 98 |
+
```
|
| 99 |
+
|
| 100 |
+
### Torch
|
| 101 |
+
|
| 102 |
+
```python
|
| 103 |
+
from safetensors.torch import save_file, load_file
|
| 104 |
+
import torch
|
| 105 |
+
|
| 106 |
+
tensors = {
|
| 107 |
+
"a": torch.zeros((2, 2)),
|
| 108 |
+
"b": torch.zeros((2, 3), dtype=torch.uint8)
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
save_file(tensors, "./model.safetensors")
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
# Now loading
|
| 115 |
+
loaded = load_file("./model.safetensors")
|
| 116 |
+
```
|
| 117 |
+
|
| 118 |
+
### Developing
|
| 119 |
+
|
| 120 |
+
```
|
| 121 |
+
# inside ./safetensors/bindings/python
|
| 122 |
+
pip install .[dev]
|
| 123 |
+
```
|
| 124 |
+
Should be enough to install this library locally.
|
| 125 |
+
|
| 126 |
+
### Testing
|
| 127 |
+
|
| 128 |
+
```
|
| 129 |
+
# inside ./safetensors/bindings/python
|
| 130 |
+
pip install .[dev]
|
| 131 |
+
pytest -sv tests/
|
| 132 |
+
```
|
| 133 |
+
|
.cache/pip/http-v2/9/8/b/e/c/98bec8f6573cfda1d5b6925f60bc00cab60250ad06f2886adaa32c22
ADDED
|
Binary file (1.15 kB). View file
|
|
|
.cache/pip/http-v2/9/8/b/e/c/98bec8f6573cfda1d5b6925f60bc00cab60250ad06f2886adaa32c22.body
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bdb1b08f4274833d62c1aa29e20907365a2ceb950410df15fc9521bad440122b
|
| 3 |
+
size 1787723
|
.cache/pip/http-v2/9/b/0/a/e/9b0ae3352e0682a4ded5c6f53d9053328ff974179c7dcd6dac96d2a9
ADDED
|
Binary file (1.87 kB). View file
|
|
|
.cache/pip/http-v2/9/b/0/a/e/9b0ae3352e0682a4ded5c6f53d9053328ff974179c7dcd6dac96d2a9.body
ADDED
|
Binary file (16 kB). View file
|
|
|
.cache/pip/http-v2/9/b/5/1/6/9b51619e20a708f99372afefd7dbe20a1b5e42ae213f02bf27267976
ADDED
|
Binary file (1.86 kB). View file
|
|
|
.cache/pip/http-v2/9/b/5/1/6/9b51619e20a708f99372afefd7dbe20a1b5e42ae213f02bf27267976.body
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:43e85b39ad8e01a41a6d67d7c56412bfdfbf8e7582e98d4d4a338262e385e380
|
| 3 |
+
size 273600
|
.cache/pip/http-v2/9/d/5/d/f/9d5dfb0dedf17094821c37079d37c9f4a1256a7dc457c1192cfa1573
ADDED
|
Binary file (1.17 kB). View file
|
|
|
.cache/pip/http-v2/9/d/5/d/f/9d5dfb0dedf17094821c37079d37c9f4a1256a7dc457c1192cfa1573.body
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:33bd4ef74232fb73fe9279a257718407f169c09b78a87ad3d296f548e27de0bb
|
| 3 |
+
size 310654
|
.cache/pip/http-v2/9/e/2/9/3/9e293f5a39d8466e2b362aa21216c5e4bc32898b0a39bfff792d145e
ADDED
|
Binary file (1.86 kB). View file
|
|
|
.cache/pip/http-v2/9/e/2/9/3/9e293f5a39d8466e2b362aa21216c5e4bc32898b0a39bfff792d145e.body
ADDED
|
Binary file (1.41 kB). View file
|
|
|
.cache/pip/http-v2/a/1/9/5/3/a19537d3cf37c122db841d6fe4cd322bc10d1a558bb00d146b85cb9a
ADDED
|
Binary file (1.86 kB). View file
|
|
|
.cache/pip/http-v2/a/1/9/5/3/a19537d3cf37c122db841d6fe4cd322bc10d1a558bb00d146b85cb9a.body
ADDED
|
Binary file (37 kB). View file
|
|
|
.cache/pip/http-v2/a/3/2/f/7/a32f793a951b4bb55e15bb0126f9c9127aab8cec4ba5607016d8841e
ADDED
|
Binary file (1.16 kB). View file
|
|
|
.cache/pip/http-v2/a/3/2/f/7/a32f793a951b4bb55e15bb0126f9c9127aab8cec4ba5607016d8841e.body
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:149f7d84afca659d1a97e39a4778794a2f83bf344c5ee5134e09995086cc2392
|
| 3 |
+
size 4988768
|
.cache/pip/http-v2/a/7/a/1/2/a7a12c025695d568f5d73aa1b3adb9e9b040c3d15606f125747a2f15
ADDED
|
Binary file (1.14 kB). View file
|
|
|
.cache/pip/http-v2/a/7/a/1/2/a7a12c025695d568f5d73aa1b3adb9e9b040c3d15606f125747a2f15.body
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3ab4aabc72de4ff77b3ec33a6d78a68227bf1123465887f9905ba79184a1cc04
|
| 3 |
+
size 8716944
|
.cache/pip/http-v2/a/7/a/a/2/a7aa27d44766b273b983795410c3973ddf07f165d571427f3ac8a4d8
ADDED
|
Binary file (1.22 kB). View file
|
|
|
.cache/pip/http-v2/a/7/a/a/2/a7aa27d44766b273b983795410c3973ddf07f165d571427f3ac8a4d8.body
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.4
|
| 2 |
+
Name: hf-xet
|
| 3 |
+
Version: 1.4.3
|
| 4 |
+
Classifier: Development Status :: 5 - Production/Stable
|
| 5 |
+
Classifier: License :: OSI Approved :: Apache Software License
|
| 6 |
+
Classifier: Programming Language :: Rust
|
| 7 |
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
| 8 |
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
| 9 |
+
Classifier: Programming Language :: Python :: 3
|
| 10 |
+
Classifier: Programming Language :: Python :: 3 :: Only
|
| 11 |
+
Classifier: Programming Language :: Python :: 3.8
|
| 12 |
+
Classifier: Programming Language :: Python :: 3.9
|
| 13 |
+
Classifier: Programming Language :: Python :: 3.10
|
| 14 |
+
Classifier: Programming Language :: Python :: 3.11
|
| 15 |
+
Classifier: Programming Language :: Python :: 3.12
|
| 16 |
+
Classifier: Programming Language :: Python :: 3.13
|
| 17 |
+
Classifier: Programming Language :: Python :: 3.14
|
| 18 |
+
Classifier: Programming Language :: Python :: Free Threading
|
| 19 |
+
Classifier: Programming Language :: Python :: Free Threading :: 2 - Beta
|
| 20 |
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
| 21 |
+
Requires-Dist: pytest ; extra == 'tests'
|
| 22 |
+
Provides-Extra: tests
|
| 23 |
+
License-File: LICENSE
|
| 24 |
+
Summary: Fast transfer of large files with the Hugging Face Hub.
|
| 25 |
+
Maintainer-email: Rajat Arya <rajat@rajatarya.com>, Jared Sulzdorf <j.sulzdorf@gmail.com>, Di Xiao <di@huggingface.co>, Assaf Vayner <assaf@huggingface.co>, Hoyt Koepke <hoytak@gmail.com>
|
| 26 |
+
License-Expression: Apache-2.0
|
| 27 |
+
Requires-Python: >=3.8
|
| 28 |
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
| 29 |
+
Project-URL: Documentation, https://huggingface.co/docs/hub/xet/index
|
| 30 |
+
Project-URL: Homepage, https://github.com/huggingface/xet-core
|
| 31 |
+
Project-URL: Issues, https://github.com/huggingface/xet-core/issues
|
| 32 |
+
Project-URL: Repository, https://github.com/huggingface/xet-core.git
|
| 33 |
+
|
| 34 |
+
<!---
|
| 35 |
+
Copyright 2024 The HuggingFace Team. All rights reserved.
|
| 36 |
+
|
| 37 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 38 |
+
you may not use this file except in compliance with the License.
|
| 39 |
+
You may obtain a copy of the License at
|
| 40 |
+
|
| 41 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 42 |
+
|
| 43 |
+
Unless required by applicable law or agreed to in writing, software
|
| 44 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 45 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 46 |
+
See the License for the specific language governing permissions and
|
| 47 |
+
limitations under the License.
|
| 48 |
+
-->
|
| 49 |
+
<p align="center">
|
| 50 |
+
<a href="https://github.com/huggingface/xet-core/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/github/license/huggingface/xet-core.svg?color=blue"></a>
|
| 51 |
+
<a href="https://github.com/huggingface/xet-core/releases"><img alt="GitHub release" src="https://img.shields.io/github/release/huggingface/xet-core.svg"></a>
|
| 52 |
+
<a href="https://github.com/huggingface/xet-core/blob/main/CODE_OF_CONDUCT.md"><img alt="Contributor Covenant" src="https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg"></a>
|
| 53 |
+
</p>
|
| 54 |
+
|
| 55 |
+
<h3 align="center">
|
| 56 |
+
<p>🤗 hf-xet - xet client tech, used in <a target="_blank" href="https://github.com/huggingface/huggingface_hub/">huggingface_hub</a></p>
|
| 57 |
+
</h3>
|
| 58 |
+
|
| 59 |
+
## Welcome
|
| 60 |
+
|
| 61 |
+
`hf-xet` enables `huggingface_hub` to utilize xet storage for uploading and downloading to HF Hub. Xet storage provides chunk-based deduplication, efficient storage/retrieval with local disk caching, and backwards compatibility with Git LFS. This library is not meant to be used directly, and is instead intended to be used from [huggingface_hub](https://pypi.org/project/huggingface-hub).
|
| 62 |
+
|
| 63 |
+
## Key features
|
| 64 |
+
|
| 65 |
+
♻ **chunk-based deduplication implementation**: avoid transferring and storing chunks that are shared across binary files (models, datasets, etc).
|
| 66 |
+
|
| 67 |
+
🤗 **Python bindings**: bindings for [huggingface_hub](https://github.com/huggingface/huggingface_hub/) package.
|
| 68 |
+
|
| 69 |
+
↔ **network communications**: concurrent communication to HF Hub Xet backend services (CAS).
|
| 70 |
+
|
| 71 |
+
🔖 **local disk caching**: chunk-based cache that sits alongside the existing [huggingface_hub disk cache](https://huggingface.co/docs/huggingface_hub/guides/manage-cache).
|
| 72 |
+
|
| 73 |
+
## Installation
|
| 74 |
+
|
| 75 |
+
Install the `hf_xet` package with [pip](https://pypi.org/project/hf-xet/):
|
| 76 |
+
|
| 77 |
+
```bash
|
| 78 |
+
pip install hf_xet
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
## Quick Start
|
| 82 |
+
|
| 83 |
+
`hf_xet` is not intended to be run independently as it is expected to be used from `huggingface_hub`, so to get started with `huggingface_hub` check out the documentation [here]("https://hf.co/docs/huggingface_hub").
|
| 84 |
+
|
| 85 |
+
## Contributions (feature requests, bugs, etc.) are encouraged & appreciated 💙💚💛💜🧡❤️
|
| 86 |
+
|
| 87 |
+
Please join us in making hf-xet better. We value everyone's contributions. Code is not the only way to help. Answering questions, helping each other, improving documentation, filing issues all help immensely. If you are interested in contributing (please do!), check out the [contribution guide](https://github.com/huggingface/xet-core/blob/main/CONTRIBUTING.md) for this repository.
|
.cache/pip/http-v2/a/f/5/3/d/af53d10b2a0401eb083b4e24ccf3518cc83ed2a451d87928b17de49a
ADDED
|
Binary file (1.86 kB). View file
|
|
|
.cache/pip/http-v2/a/f/5/3/d/af53d10b2a0401eb083b4e24ccf3518cc83ed2a451d87928b17de49a.body
ADDED
|
Binary file (12.4 kB). View file
|
|
|
.cache/pip/http-v2/b/5/7/a/9/b57a93fe5f8c75cd00cfe703d012d39466ff7ca30bf44d13df4112f6.body
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:02ae3b274fde71c5e92ac4d54bc06c42d80e399fec704383dcd99b301df37458
|
| 3 |
+
size 35235890
|
.cache/pip/http-v2/c/d/5/d/e/cd5de44b899cbe1869765c21b55cffc53c0c0ffa9d3c6f1fd40a42a2
ADDED
|
Binary file (1.87 kB). View file
|
|
|
.cache/pip/http-v2/c/d/5/d/e/cd5de44b899cbe1869765c21b55cffc53c0c0ffa9d3c6f1fd40a42a2.body
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ce8110a1fab9fa20de934002c6cdd93e02af0250708d7d82cd7aeb4afbfb998a
|
| 3 |
+
size 263976
|
.cache/pip/http-v2/c/e/c/1/b/cec1bb6b101929401b32f9eedea53965267cc98d341b695a852cad6f.body
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fc360b70c815bf340ed56c7b8c63aacf11762a4b099b2fe2c9bd6d6068668c08
|
| 3 |
+
size 4212320
|
.gitattributes
CHANGED
|
@@ -59,3 +59,12 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 61 |
__pycache__/Changed_MLR_All_Strategies.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 61 |
__pycache__/Changed_MLR_All_Strategies.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
|
| 62 |
+
.cache/pip/http-v2/a/3/2/f/7/a32f793a951b4bb55e15bb0126f9c9127aab8cec4ba5607016d8841e.body filter=lfs diff=lfs merge=lfs -text
|
| 63 |
+
.cache/pip/http-v2/9/0/f/6/e/90f6e704e426d3e4b799bd86b309263491ea7f0afc8f3ceaab5d10eb.body filter=lfs diff=lfs merge=lfs -text
|
| 64 |
+
.cache/pip/http-v2/9/d/5/d/f/9d5dfb0dedf17094821c37079d37c9f4a1256a7dc457c1192cfa1573.body filter=lfs diff=lfs merge=lfs -text
|
| 65 |
+
.cache/pip/http-v2/9/8/b/e/c/98bec8f6573cfda1d5b6925f60bc00cab60250ad06f2886adaa32c22.body filter=lfs diff=lfs merge=lfs -text
|
| 66 |
+
.cache/pip/http-v2/c/e/c/1/b/cec1bb6b101929401b32f9eedea53965267cc98d341b695a852cad6f.body filter=lfs diff=lfs merge=lfs -text
|
| 67 |
+
.cache/pip/http-v2/9/b/5/1/6/9b51619e20a708f99372afefd7dbe20a1b5e42ae213f02bf27267976.body filter=lfs diff=lfs merge=lfs -text
|
| 68 |
+
.cache/pip/http-v2/c/d/5/d/e/cd5de44b899cbe1869765c21b55cffc53c0c0ffa9d3c6f1fd40a42a2.body filter=lfs diff=lfs merge=lfs -text
|
| 69 |
+
.cache/pip/http-v2/a/7/a/1/2/a7a12c025695d568f5d73aa1b3adb9e9b040c3d15606f125747a2f15.body filter=lfs diff=lfs merge=lfs -text
|
| 70 |
+
.cache/pip/http-v2/b/5/7/a/9/b57a93fe5f8c75cd00cfe703d012d39466ff7ca30bf44d13df4112f6.body filter=lfs diff=lfs merge=lfs -text
|
runs/EfficientNetB0_frozen_new_image_size/repeated_holdout/stratified_holdout_v1/manifests/splits/split_001.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
runs/EfficientNetB0_frozen_new_image_size/repeated_holdout/stratified_holdout_v1/manifests/splits/split_002.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
runs/EfficientNetB0_frozen_new_image_size/repeated_holdout/stratified_holdout_v1/manifests/splits/split_003.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
runs/EfficientNetB0_frozen_new_image_size/repeated_holdout/stratified_holdout_v1/manifests/splits/split_004.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
runs/EfficientNetB0_frozen_new_image_size/repeated_holdout/stratified_holdout_v1/manifests/subsets/split_001_pct_005_repeat_01.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
runs/EfficientNetB0_frozen_new_image_size/repeated_holdout/stratified_holdout_v1/manifests/subsets/split_001_pct_005_repeat_02.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
runs/EfficientNetB0_frozen_new_image_size/repeated_holdout/stratified_holdout_v1/manifests/subsets/split_001_pct_005_repeat_03.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
runs/EfficientNetB0_frozen_new_image_size/repeated_holdout/stratified_holdout_v1/manifests/subsets/split_001_pct_005_repeat_04.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
runs/EfficientNetB0_frozen_new_image_size/repeated_holdout/stratified_holdout_v1/manifests/subsets/split_001_pct_015_repeat_01.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|