aejandro.alvarez5 3 years ago
parent
commit
33f7617917
100 changed files with 8643 additions and 13 deletions
  1. BIN
      .DS_Store
  2. BIN
      platforms/.DS_Store
  3. BIN
      platforms/browser/.DS_Store
  4. BIN
      platforms/browser/www/.DS_Store
  5. 0
    3
      platforms/browser/www/api.py
  6. 0
    0
      platforms/browser/www/api/Pipfile
  7. 0
    0
      platforms/browser/www/api/Pipfile.lock
  8. 0
    0
      platforms/browser/www/api/api.py
  9. 0
    0
      platforms/browser/www/api/secrets
  10. 0
    0
      platforms/browser/www/api/secrets.py
  11. 1
    1
      platforms/browser/www/conectar.php
  12. 13
    9
      platforms/browser/www/index.php
  13. 155
    0
      platforms/browser/www/insert.php
  14. BIN
      www/.DS_Store
  15. BIN
      www/Files-API/.DS_Store
  16. 76
    0
      www/Files-API/.venv/bin/activate
  17. 37
    0
      www/Files-API/.venv/bin/activate.csh
  18. 75
    0
      www/Files-API/.venv/bin/activate.fish
  19. 11
    0
      www/Files-API/.venv/bin/easy_install
  20. 11
    0
      www/Files-API/.venv/bin/easy_install-3.7
  21. 11
    0
      www/Files-API/.venv/bin/flask
  22. 11
    0
      www/Files-API/.venv/bin/pip
  23. 11
    0
      www/Files-API/.venv/bin/pip3
  24. 11
    0
      www/Files-API/.venv/bin/pip3.7
  25. 1
    0
      www/Files-API/.venv/bin/python
  26. 1
    0
      www/Files-API/.venv/bin/python3
  27. 1
    0
      www/Files-API/.venv/lib/python3.7/site-packages/Flask-2.0.2.dist-info/INSTALLER
  28. 28
    0
      www/Files-API/.venv/lib/python3.7/site-packages/Flask-2.0.2.dist-info/LICENSE.rst
  29. 125
    0
      www/Files-API/.venv/lib/python3.7/site-packages/Flask-2.0.2.dist-info/METADATA
  30. 51
    0
      www/Files-API/.venv/lib/python3.7/site-packages/Flask-2.0.2.dist-info/RECORD
  31. 5
    0
      www/Files-API/.venv/lib/python3.7/site-packages/Flask-2.0.2.dist-info/WHEEL
  32. 3
    0
      www/Files-API/.venv/lib/python3.7/site-packages/Flask-2.0.2.dist-info/entry_points.txt
  33. 1
    0
      www/Files-API/.venv/lib/python3.7/site-packages/Flask-2.0.2.dist-info/top_level.txt
  34. 1
    0
      www/Files-API/.venv/lib/python3.7/site-packages/Flask_Cors-3.0.10.dist-info/INSTALLER
  35. 7
    0
      www/Files-API/.venv/lib/python3.7/site-packages/Flask_Cors-3.0.10.dist-info/LICENSE
  36. 149
    0
      www/Files-API/.venv/lib/python3.7/site-packages/Flask_Cors-3.0.10.dist-info/METADATA
  37. 16
    0
      www/Files-API/.venv/lib/python3.7/site-packages/Flask_Cors-3.0.10.dist-info/RECORD
  38. 6
    0
      www/Files-API/.venv/lib/python3.7/site-packages/Flask_Cors-3.0.10.dist-info/WHEEL
  39. 1
    0
      www/Files-API/.venv/lib/python3.7/site-packages/Flask_Cors-3.0.10.dist-info/top_level.txt
  40. 1
    0
      www/Files-API/.venv/lib/python3.7/site-packages/Jinja2-3.0.3.dist-info/INSTALLER
  41. 28
    0
      www/Files-API/.venv/lib/python3.7/site-packages/Jinja2-3.0.3.dist-info/LICENSE.rst
  42. 113
    0
      www/Files-API/.venv/lib/python3.7/site-packages/Jinja2-3.0.3.dist-info/METADATA
  43. 58
    0
      www/Files-API/.venv/lib/python3.7/site-packages/Jinja2-3.0.3.dist-info/RECORD
  44. 5
    0
      www/Files-API/.venv/lib/python3.7/site-packages/Jinja2-3.0.3.dist-info/WHEEL
  45. 3
    0
      www/Files-API/.venv/lib/python3.7/site-packages/Jinja2-3.0.3.dist-info/entry_points.txt
  46. 1
    0
      www/Files-API/.venv/lib/python3.7/site-packages/Jinja2-3.0.3.dist-info/top_level.txt
  47. 1
    0
      www/Files-API/.venv/lib/python3.7/site-packages/MarkupSafe-2.0.1.dist-info/INSTALLER
  48. 28
    0
      www/Files-API/.venv/lib/python3.7/site-packages/MarkupSafe-2.0.1.dist-info/LICENSE.rst
  49. 100
    0
      www/Files-API/.venv/lib/python3.7/site-packages/MarkupSafe-2.0.1.dist-info/METADATA
  50. 14
    0
      www/Files-API/.venv/lib/python3.7/site-packages/MarkupSafe-2.0.1.dist-info/RECORD
  51. 5
    0
      www/Files-API/.venv/lib/python3.7/site-packages/MarkupSafe-2.0.1.dist-info/WHEEL
  52. 1
    0
      www/Files-API/.venv/lib/python3.7/site-packages/MarkupSafe-2.0.1.dist-info/top_level.txt
  53. 1
    0
      www/Files-API/.venv/lib/python3.7/site-packages/Werkzeug-2.0.2.dist-info/INSTALLER
  54. 28
    0
      www/Files-API/.venv/lib/python3.7/site-packages/Werkzeug-2.0.2.dist-info/LICENSE.rst
  55. 129
    0
      www/Files-API/.venv/lib/python3.7/site-packages/Werkzeug-2.0.2.dist-info/METADATA
  56. 111
    0
      www/Files-API/.venv/lib/python3.7/site-packages/Werkzeug-2.0.2.dist-info/RECORD
  57. 5
    0
      www/Files-API/.venv/lib/python3.7/site-packages/Werkzeug-2.0.2.dist-info/WHEEL
  58. 1
    0
      www/Files-API/.venv/lib/python3.7/site-packages/Werkzeug-2.0.2.dist-info/top_level.txt
  59. BIN
      www/Files-API/.venv/lib/python3.7/site-packages/__pycache__/easy_install.cpython-37.pyc
  60. BIN
      www/Files-API/.venv/lib/python3.7/site-packages/__pycache__/six.cpython-37.pyc
  61. BIN
      www/Files-API/.venv/lib/python3.7/site-packages/__pycache__/typing_extensions.cpython-37.pyc
  62. BIN
      www/Files-API/.venv/lib/python3.7/site-packages/__pycache__/zipp.cpython-37.pyc
  63. 1
    0
      www/Files-API/.venv/lib/python3.7/site-packages/click-8.0.3.dist-info/INSTALLER
  64. 28
    0
      www/Files-API/.venv/lib/python3.7/site-packages/click-8.0.3.dist-info/LICENSE.rst
  65. 111
    0
      www/Files-API/.venv/lib/python3.7/site-packages/click-8.0.3.dist-info/METADATA
  66. 41
    0
      www/Files-API/.venv/lib/python3.7/site-packages/click-8.0.3.dist-info/RECORD
  67. 5
    0
      www/Files-API/.venv/lib/python3.7/site-packages/click-8.0.3.dist-info/WHEEL
  68. 1
    0
      www/Files-API/.venv/lib/python3.7/site-packages/click-8.0.3.dist-info/top_level.txt
  69. 75
    0
      www/Files-API/.venv/lib/python3.7/site-packages/click/__init__.py
  70. BIN
      www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/__init__.cpython-37.pyc
  71. BIN
      www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/_compat.cpython-37.pyc
  72. BIN
      www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/_termui_impl.cpython-37.pyc
  73. BIN
      www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/_textwrap.cpython-37.pyc
  74. BIN
      www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/_unicodefun.cpython-37.pyc
  75. BIN
      www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/_winconsole.cpython-37.pyc
  76. BIN
      www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/core.cpython-37.pyc
  77. BIN
      www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/decorators.cpython-37.pyc
  78. BIN
      www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/exceptions.cpython-37.pyc
  79. BIN
      www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/formatting.cpython-37.pyc
  80. BIN
      www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/globals.cpython-37.pyc
  81. BIN
      www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/parser.cpython-37.pyc
  82. BIN
      www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/shell_completion.cpython-37.pyc
  83. BIN
      www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/termui.cpython-37.pyc
  84. BIN
      www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/testing.cpython-37.pyc
  85. BIN
      www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/types.cpython-37.pyc
  86. BIN
      www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/utils.cpython-37.pyc
  87. 627
    0
      www/Files-API/.venv/lib/python3.7/site-packages/click/_compat.py
  88. 718
    0
      www/Files-API/.venv/lib/python3.7/site-packages/click/_termui_impl.py
  89. 49
    0
      www/Files-API/.venv/lib/python3.7/site-packages/click/_textwrap.py
  90. 100
    0
      www/Files-API/.venv/lib/python3.7/site-packages/click/_unicodefun.py
  91. 279
    0
      www/Files-API/.venv/lib/python3.7/site-packages/click/_winconsole.py
  92. 2953
    0
      www/Files-API/.venv/lib/python3.7/site-packages/click/core.py
  93. 436
    0
      www/Files-API/.venv/lib/python3.7/site-packages/click/decorators.py
  94. 287
    0
      www/Files-API/.venv/lib/python3.7/site-packages/click/exceptions.py
  95. 301
    0
      www/Files-API/.venv/lib/python3.7/site-packages/click/formatting.py
  96. 69
    0
      www/Files-API/.venv/lib/python3.7/site-packages/click/globals.py
  97. 529
    0
      www/Files-API/.venv/lib/python3.7/site-packages/click/parser.py
  98. 0
    0
      www/Files-API/.venv/lib/python3.7/site-packages/click/py.typed
  99. 581
    0
      www/Files-API/.venv/lib/python3.7/site-packages/click/shell_completion.py
  100. 0
    0
      www/Files-API/.venv/lib/python3.7/site-packages/click/termui.py

BIN
.DS_Store View File


BIN
platforms/.DS_Store View File


BIN
platforms/browser/.DS_Store View File


BIN
platforms/browser/www/.DS_Store View File


+ 0
- 3
platforms/browser/www/api.py View File

@@ -1,3 +0,0 @@
1
-from mysql.connector import (connection)
2
-cnx = connection.MySQLConnection(user="alejandro.alvarez5", password="QnJ3Uq=i7=", host="136.145.231.32",database="Dato_pr")
3
-cnx.close()

www/api/Pipfile → platforms/browser/www/api/Pipfile View File


www/api/Pipfile.lock → platforms/browser/www/api/Pipfile.lock View File


www/api/api.py → platforms/browser/www/api/api.py View File


www/api/secrets → platforms/browser/www/api/secrets View File


www/api/secrets.py → platforms/browser/www/api/secrets.py View File


+ 1
- 1
platforms/browser/www/conectar.php View File

@@ -1,5 +1,5 @@
1 1
 <?php
2
-    $mysqli = new mysqli("136.145.231.32", "alejandro.alvarez5", "QnJ3Uq=i7=", "Dato_pr");
2
+    $mysqli = new mysqli("localhost", "alejandro.alvarez5", "QnJ3Uq=i7=", "Dato_pr");
3 3
     $result = $mysqli->query("SELECT 'Hello, dear MySQL user!' AS _message FROM DUAL");
4 4
     $row = $result->fetch_assoc();
5 5
     echo htmlentities($row['_message']);

+ 13
- 9
platforms/browser/www/index.php View File

@@ -1,3 +1,6 @@
1
+<?php
2
+	include("conecta.php");
3
+?>
1 4
 <!DOCTYPE html>
2 5
 <!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
3 6
 <!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
@@ -11,11 +14,11 @@
11 14
 	<meta name="description" content="No" />
12 15
 
13 16
   	<!-- Facebook and Twitter integration -->
14
-	<meta property="og:title" content=""/>
15
-	<meta property="og:image" content=""/>
16
-	<meta property="og:url" content=""/>
17
-	<meta property="og:site_name" content=""/>
18
-	<meta property="og:description" content=""/>
17
+	<meta property="og:title" content="" />
18
+	<meta property="og:image" content="" />
19
+	<meta property="og:url" content="" />
20
+	<meta property="og:site_name" content="" />
21
+	<meta property="og:description" content="" />
19 22
 	<meta name="twitter:title" content="" />
20 23
 	<meta name="twitter:image" content="" />
21 24
 	<meta name="twitter:url" content="" />
@@ -99,34 +102,35 @@
99 102
 											<i class="icon-columns to-animate-2"></i>
100 103
 											<div class="fh5co-post to-animate">
101 104
 												<h3>Afghanistan</h3>
102
-												
105
+												<h4> Sep 12 2021, 10:43:15 </h4>
103 106
 											</div>
104 107
 										</div>
105 108
 										<div class="core">
106 109
 											<i class="icon-columns to-animate-2"></i>
107 110
 											<div class="fh5co-post to-animate">
108 111
 												<h3>Rosselló y sus Nominaciones</h3>
109
-												
112
+												<h4>Sep 23 2021, 01:12:13 </h4>
110 113
 											</div>
111 114
 										</div>
112 115
 										<div class="core">
113 116
 											<i class="icon-columns to-animate-2"></i>
114 117
 											<div class="fh5co-post to-animate">
115 118
 												<h3>Billionaire's Paradise</h3>
119
+												<h4>Sep 30 2021, 08:02:47 </h4>
116 120
 											</div>
117 121
 										</div>
118 122
 										<div class="core">
119 123
 											<i class="icon-columns to-animate-2"></i>
120 124
 											<div class="fh5co-post to-animate">
121 125
 												<h3>LUMA cogera cargos de la AEE a pesar del martes 1 de junio</h3>
122
-												
126
+												<h4>Oct 02 2021, 04:30:23 </h4>
123 127
 											</div>
124 128
 										</div>
125 129
 										<div class="core">
126 130
 											<i class="icon-columns to-animate-2"></i>
127 131
 											<div class="fh5co-post to-animate">
128 132
 												<h3>¿Commo va el processo de vacunacion?</h3>
129
-												
133
+												<h4>Oct 18 2021, 22:27:50 </h4>
130 134
 											</div>
131 135
 										</div>
132 136
 									</div>

+ 155
- 0
platforms/browser/www/insert.php View File

@@ -0,0 +1,155 @@
1
+<?php
2
+	include("conecta.php");
3
+?>
4
+<!DOCTYPE html>
5
+<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
6
+<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
7
+<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
8
+<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
9
+	<head>
10
+	<meta charset="utf-8">
11
+	<meta http-equiv="X-UA-Compatible" content="IE=edge">
12
+	<title>dato.pr</title>
13
+	<meta name="viewport" content="width=device-width, initial-scale=1">
14
+	<meta name="description" content="No" />
15
+
16
+  	<!-- Facebook and Twitter integration -->
17
+	<meta property="og:title" content="" />
18
+	<meta property="og:image" content="" />
19
+	<meta property="og:url" content="" />
20
+	<meta property="og:site_name" content="" />
21
+	<meta property="og:description" content="" />
22
+	<meta name="twitter:title" content="" />
23
+	<meta name="twitter:image" content="" />
24
+	<meta name="twitter:url" content="" />
25
+	<meta name="twitter:card" content="" />
26
+
27
+	<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
28
+	<link rel="shortcut icon" href="favicon.ico">
29
+
30
+	<link href="https://fonts.googleapis.com/css?family=Inconsolata:400,700" rel="stylesheet">
31
+
32
+	<!-- Animate.css -->
33
+	<link rel="stylesheet" href="css/animate.css">
34
+	<!-- Icomoon Icon Fonts-->
35
+	<link rel="stylesheet" href="css/icomoon.css">
36
+	<!-- Simple Line Icons -->
37
+	<link rel="stylesheet" href="css/simple-line-icons.css">
38
+	<!-- Bootstrap  -->
39
+	<link rel="stylesheet" href="css/bootstrap.css">
40
+	<!-- Style -->
41
+	<link rel="stylesheet" href="css/style.css">
42
+
43
+
44
+	<!-- Modernizr JS -->
45
+	<script src="js/modernizr-2.6.2.min.js"></script>
46
+	<!-- FOR IE9 below -->
47
+	<!--[if lt IE 9]>
48
+	<script src="js/respond.min.js"></script>
49
+	<![endif]-->
50
+
51
+	</head>
52
+	<body>
53
+	<header role="banner" id="fh5co-header">
54
+		<div class="fluid-container">
55
+			<nav class="navbar navbar-default navbar-fixed-top js-fullheight">
56
+				<div id="navbar" class="navbar-collapse js-fullheight">
57
+					<ul class="nav navbar-nav navbar-left">
58
+						<li class="active"><a href="#" data-nav-section="home"><span>Home</span></a></li>
59
+						<li><a href="#" data-nav-section="services"><span>Services</span></a></li>
60
+					</ul>
61
+				</div>
62
+			</nav>
63
+	  </div>
64
+	</header>
65
+
66
+	<section id="fh5co-home" data-section="home" style="background-image: url(images/project-5.jpg);">
67
+		<div class="gradient"></div>
68
+		<div class="container">
69
+			<div class="text-wrap">
70
+				<div class="text-inner">
71
+					<div class="row">
72
+						<div class="col-md-8 col-md-offset-2 text-center">
73
+							<h1 style="color :white;" class="to-animate">dato.pr</h1>
74
+							<h2 style="color :white;" class="to-animate">"Estudiando lo ambiguo e investigando lo desconocido."</h2>
75
+						</div>
76
+					</div>
77
+				</div>
78
+			</div>
79
+		</div>
80
+	</section>
81
+
82
+	<section id="fh5co-services" data-section="services">
83
+		<div class="fh5co-services">
84
+			<div class="container">
85
+				<div class="row">
86
+					<div class="col-md-12 section-heading text-center">
87
+						<h2 class="to-animate">Articulos</h2>
88
+						<div class="row">
89
+							<div class="col-md-8 col-md-offset-2 subtext">
90
+								<h3 class="to-animate"> Hablando sobre lo que importa. </h3>
91
+							</div>
92
+						</div>
93
+					</div>
94
+				</div>
95
+				<div class="row">
96
+					<div class="core-features">
97
+						<div class="grid2">
98
+							<div class="core-f">
99
+								<div class="row">
100
+									<div class="col-md-12">
101
+										<form action="proc_inserta.php" method="POST">
102
+											<div>
103
+												<label for="nombre">Titulo </label>
104
+												<input type="text" name="nombre" id="in1" values="Nombre">
105
+											</div>
106
+											<br>
107
+
108
+											<div>
109
+												<label for="Fecha">Fecha</label>
110
+												<input type="text" name="apellido" id="in1" values="Apellido">
111
+											</div>
112
+											<br>
113
+		
114
+											<div>
115
+												<label for="Tipo">Tipo</label>
116
+												<input type="text" name="telefono" id="in1" values="Telefono">
117
+											</div>
118
+											<br>
119
+
120
+											<div>
121
+												<label for="text">Text</label>
122
+												<input type="text" name="mail" id="in1" values="E-mail">
123
+											</div>
124
+											<br>
125
+										</form>
126
+									</div>
127
+								</div>
128
+							</div>	
129
+						</div>
130
+					</div>
131
+				</div>
132
+			</div>
133
+		</div>
134
+	</section>
135
+
136
+
137
+
138
+
139
+	<!-- jQuery -->
140
+	<script src="js/jquery.min.js"></script>
141
+	<!-- jQuery Easing -->
142
+	<script src="js/jquery.easing.1.3.js"></script>
143
+	<!-- Bootstrap -->
144
+	<script src="js/bootstrap.min.js"></script>
145
+	<!-- Waypoints -->
146
+	<script src="js/jquery.waypoints.min.js"></script>
147
+	<!-- Stellar Parallax -->
148
+	<script src="js/jquery.stellar.min.js"></script>
149
+	<!-- Counters -->
150
+	<script src="js/jquery.countTo.js"></script>
151
+	<!-- Main JS (Do not remove) -->
152
+	<script src="js/main.js"></script>
153
+
154
+	</body>
155
+</html>

BIN
www/.DS_Store View File


BIN
www/Files-API/.DS_Store View File


+ 76
- 0
www/Files-API/.venv/bin/activate View File

@@ -0,0 +1,76 @@
1
+# This file must be used with "source bin/activate" *from bash*
2
+# you cannot run it directly
3
+
4
+deactivate () {
5
+    # reset old environment variables
6
+    if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then
7
+        PATH="${_OLD_VIRTUAL_PATH:-}"
8
+        export PATH
9
+        unset _OLD_VIRTUAL_PATH
10
+    fi
11
+    if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then
12
+        PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}"
13
+        export PYTHONHOME
14
+        unset _OLD_VIRTUAL_PYTHONHOME
15
+    fi
16
+
17
+    # This should detect bash and zsh, which have a hash command that must
18
+    # be called to get it to forget past commands.  Without forgetting
19
+    # past commands the $PATH changes we made may not be respected
20
+    if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
21
+        hash -r
22
+    fi
23
+
24
+    if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then
25
+        PS1="${_OLD_VIRTUAL_PS1:-}"
26
+        export PS1
27
+        unset _OLD_VIRTUAL_PS1
28
+    fi
29
+
30
+    unset VIRTUAL_ENV
31
+    if [ ! "$1" = "nondestructive" ] ; then
32
+    # Self destruct!
33
+        unset -f deactivate
34
+    fi
35
+}
36
+
37
+# unset irrelevant variables
38
+deactivate nondestructive
39
+
40
+VIRTUAL_ENV="/Users/alexmanuel/MyApp/CarDieAleCa/www/Files-API/.venv"
41
+export VIRTUAL_ENV
42
+
43
+_OLD_VIRTUAL_PATH="$PATH"
44
+PATH="$VIRTUAL_ENV/bin:$PATH"
45
+export PATH
46
+
47
+# unset PYTHONHOME if set
48
+# this will fail if PYTHONHOME is set to the empty string (which is bad anyway)
49
+# could use `if (set -u; : $PYTHONHOME) ;` in bash
50
+if [ -n "${PYTHONHOME:-}" ] ; then
51
+    _OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}"
52
+    unset PYTHONHOME
53
+fi
54
+
55
+if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
56
+    _OLD_VIRTUAL_PS1="${PS1:-}"
57
+    if [ "x(.venv) " != x ] ; then
58
+	PS1="(.venv) ${PS1:-}"
59
+    else
60
+    if [ "`basename \"$VIRTUAL_ENV\"`" = "__" ] ; then
61
+        # special case for Aspen magic directories
62
+        # see http://www.zetadev.com/software/aspen/
63
+        PS1="[`basename \`dirname \"$VIRTUAL_ENV\"\``] $PS1"
64
+    else
65
+        PS1="(`basename \"$VIRTUAL_ENV\"`)$PS1"
66
+    fi
67
+    fi
68
+    export PS1
69
+fi
70
+
71
+# This should detect bash and zsh, which have a hash command that must
72
+# be called to get it to forget past commands.  Without forgetting
73
+# past commands the $PATH changes we made may not be respected
74
+if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
75
+    hash -r
76
+fi

+ 37
- 0
www/Files-API/.venv/bin/activate.csh View File

@@ -0,0 +1,37 @@
1
+# This file must be used with "source bin/activate.csh" *from csh*.
2
+# You cannot run it directly.
3
+# Created by Davide Di Blasi <davidedb@gmail.com>.
4
+# Ported to Python 3.3 venv by Andrew Svetlov <andrew.svetlov@gmail.com>
5
+
6
+alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; test "\!:*" != "nondestructive" && unalias deactivate'
7
+
8
+# Unset irrelevant variables.
9
+deactivate nondestructive
10
+
11
+setenv VIRTUAL_ENV "/Users/alexmanuel/MyApp/CarDieAleCa/www/Files-API/.venv"
12
+
13
+set _OLD_VIRTUAL_PATH="$PATH"
14
+setenv PATH "$VIRTUAL_ENV/bin:$PATH"
15
+
16
+
17
+set _OLD_VIRTUAL_PROMPT="$prompt"
18
+
19
+if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then
20
+    if (".venv" != "") then
21
+        set env_name = ".venv"
22
+    else
23
+        if (`basename "VIRTUAL_ENV"` == "__") then
24
+            # special case for Aspen magic directories
25
+            # see http://www.zetadev.com/software/aspen/
26
+            set env_name = `basename \`dirname "$VIRTUAL_ENV"\``
27
+        else
28
+            set env_name = `basename "$VIRTUAL_ENV"`
29
+        endif
30
+    endif
31
+    set prompt = "[$env_name] $prompt"
32
+    unset env_name
33
+endif
34
+
35
+alias pydoc python -m pydoc
36
+
37
+rehash

+ 75
- 0
www/Files-API/.venv/bin/activate.fish View File

@@ -0,0 +1,75 @@
1
+# This file must be used with ". bin/activate.fish" *from fish* (http://fishshell.org)
2
+# you cannot run it directly
3
+
4
+function deactivate  -d "Exit virtualenv and return to normal shell environment"
5
+    # reset old environment variables
6
+    if test -n "$_OLD_VIRTUAL_PATH"
7
+        set -gx PATH $_OLD_VIRTUAL_PATH
8
+        set -e _OLD_VIRTUAL_PATH
9
+    end
10
+    if test -n "$_OLD_VIRTUAL_PYTHONHOME"
11
+        set -gx PYTHONHOME $_OLD_VIRTUAL_PYTHONHOME
12
+        set -e _OLD_VIRTUAL_PYTHONHOME
13
+    end
14
+
15
+    if test -n "$_OLD_FISH_PROMPT_OVERRIDE"
16
+        functions -e fish_prompt
17
+        set -e _OLD_FISH_PROMPT_OVERRIDE
18
+        functions -c _old_fish_prompt fish_prompt
19
+        functions -e _old_fish_prompt
20
+    end
21
+
22
+    set -e VIRTUAL_ENV
23
+    if test "$argv[1]" != "nondestructive"
24
+        # Self destruct!
25
+        functions -e deactivate
26
+    end
27
+end
28
+
29
+# unset irrelevant variables
30
+deactivate nondestructive
31
+
32
+set -gx VIRTUAL_ENV "/Users/alexmanuel/MyApp/CarDieAleCa/www/Files-API/.venv"
33
+
34
+set -gx _OLD_VIRTUAL_PATH $PATH
35
+set -gx PATH "$VIRTUAL_ENV/bin" $PATH
36
+
37
+# unset PYTHONHOME if set
38
+if set -q PYTHONHOME
39
+    set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME
40
+    set -e PYTHONHOME
41
+end
42
+
43
+if test -z "$VIRTUAL_ENV_DISABLE_PROMPT"
44
+    # fish uses a function instead of an env var to generate the prompt.
45
+
46
+    # save the current fish_prompt function as the function _old_fish_prompt
47
+    functions -c fish_prompt _old_fish_prompt
48
+
49
+    # with the original prompt function renamed, we can override with our own.
50
+    function fish_prompt
51
+        # Save the return status of the last command
52
+        set -l old_status $status
53
+
54
+        # Prompt override?
55
+        if test -n "(.venv) "
56
+            printf "%s%s" "(.venv) " (set_color normal)
57
+        else
58
+            # ...Otherwise, prepend env
59
+            set -l _checkbase (basename "$VIRTUAL_ENV")
60
+            if test $_checkbase = "__"
61
+                # special case for Aspen magic directories
62
+                # see http://www.zetadev.com/software/aspen/
63
+                printf "%s[%s]%s " (set_color -b blue white) (basename (dirname "$VIRTUAL_ENV")) (set_color normal)
64
+            else
65
+                printf "%s(%s)%s" (set_color -b blue white) (basename "$VIRTUAL_ENV") (set_color normal)
66
+            end
67
+        end
68
+
69
+        # Restore the return status of the previous command.
70
+        echo "exit $old_status" | .
71
+        _old_fish_prompt
72
+    end
73
+
74
+    set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV"
75
+end

+ 11
- 0
www/Files-API/.venv/bin/easy_install View File

@@ -0,0 +1,11 @@
1
+#!/Users/alexmanuel/MyApp/CarDieAleCa/www/Files-API/.venv/bin/python3
2
+
3
+# -*- coding: utf-8 -*-
4
+import re
5
+import sys
6
+
7
+from setuptools.command.easy_install import main
8
+
9
+if __name__ == '__main__':
10
+    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
11
+    sys.exit(main())

+ 11
- 0
www/Files-API/.venv/bin/easy_install-3.7 View File

@@ -0,0 +1,11 @@
1
+#!/Users/alexmanuel/MyApp/CarDieAleCa/www/Files-API/.venv/bin/python3
2
+
3
+# -*- coding: utf-8 -*-
4
+import re
5
+import sys
6
+
7
+from setuptools.command.easy_install import main
8
+
9
+if __name__ == '__main__':
10
+    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
11
+    sys.exit(main())

+ 11
- 0
www/Files-API/.venv/bin/flask View File

@@ -0,0 +1,11 @@
1
+#!/Users/alexmanuel/MyApp/CarDieAleCa/www/Files-API/.venv/bin/python3
2
+
3
+# -*- coding: utf-8 -*-
4
+import re
5
+import sys
6
+
7
+from flask.cli import main
8
+
9
+if __name__ == '__main__':
10
+    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
11
+    sys.exit(main())

+ 11
- 0
www/Files-API/.venv/bin/pip View File

@@ -0,0 +1,11 @@
1
+#!/Users/alexmanuel/MyApp/CarDieAleCa/www/Files-API/.venv/bin/python3
2
+
3
+# -*- coding: utf-8 -*-
4
+import re
5
+import sys
6
+
7
+from pip._internal import main
8
+
9
+if __name__ == '__main__':
10
+    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
11
+    sys.exit(main())

+ 11
- 0
www/Files-API/.venv/bin/pip3 View File

@@ -0,0 +1,11 @@
1
+#!/Users/alexmanuel/MyApp/CarDieAleCa/www/Files-API/.venv/bin/python3
2
+
3
+# -*- coding: utf-8 -*-
4
+import re
5
+import sys
6
+
7
+from pip._internal import main
8
+
9
+if __name__ == '__main__':
10
+    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
11
+    sys.exit(main())

+ 11
- 0
www/Files-API/.venv/bin/pip3.7 View File

@@ -0,0 +1,11 @@
1
+#!/Users/alexmanuel/MyApp/CarDieAleCa/www/Files-API/.venv/bin/python3
2
+
3
+# -*- coding: utf-8 -*-
4
+import re
5
+import sys
6
+
7
+from pip._internal import main
8
+
9
+if __name__ == '__main__':
10
+    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
11
+    sys.exit(main())

+ 1
- 0
www/Files-API/.venv/bin/python View File

@@ -0,0 +1 @@
1
+python3

+ 1
- 0
www/Files-API/.venv/bin/python3 View File

@@ -0,0 +1 @@
1
+/usr/local/bin/python3

+ 1
- 0
www/Files-API/.venv/lib/python3.7/site-packages/Flask-2.0.2.dist-info/INSTALLER View File

@@ -0,0 +1 @@
1
+pip

+ 28
- 0
www/Files-API/.venv/lib/python3.7/site-packages/Flask-2.0.2.dist-info/LICENSE.rst View File

@@ -0,0 +1,28 @@
1
+Copyright 2010 Pallets
2
+
3
+Redistribution and use in source and binary forms, with or without
4
+modification, are permitted provided that the following conditions are
5
+met:
6
+
7
+1.  Redistributions of source code must retain the above copyright
8
+    notice, this list of conditions and the following disclaimer.
9
+
10
+2.  Redistributions in binary form must reproduce the above copyright
11
+    notice, this list of conditions and the following disclaimer in the
12
+    documentation and/or other materials provided with the distribution.
13
+
14
+3.  Neither the name of the copyright holder nor the names of its
15
+    contributors may be used to endorse or promote products derived from
16
+    this software without specific prior written permission.
17
+
18
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
21
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
24
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 125
- 0
www/Files-API/.venv/lib/python3.7/site-packages/Flask-2.0.2.dist-info/METADATA View File

@@ -0,0 +1,125 @@
1
+Metadata-Version: 2.1
2
+Name: Flask
3
+Version: 2.0.2
4
+Summary: A simple framework for building complex web applications.
5
+Home-page: https://palletsprojects.com/p/flask
6
+Author: Armin Ronacher
7
+Author-email: armin.ronacher@active-4.com
8
+Maintainer: Pallets
9
+Maintainer-email: contact@palletsprojects.com
10
+License: BSD-3-Clause
11
+Project-URL: Donate, https://palletsprojects.com/donate
12
+Project-URL: Documentation, https://flask.palletsprojects.com/
13
+Project-URL: Changes, https://flask.palletsprojects.com/changes/
14
+Project-URL: Source Code, https://github.com/pallets/flask/
15
+Project-URL: Issue Tracker, https://github.com/pallets/flask/issues/
16
+Project-URL: Twitter, https://twitter.com/PalletsTeam
17
+Project-URL: Chat, https://discord.gg/pallets
18
+Platform: UNKNOWN
19
+Classifier: Development Status :: 5 - Production/Stable
20
+Classifier: Environment :: Web Environment
21
+Classifier: Framework :: Flask
22
+Classifier: Intended Audience :: Developers
23
+Classifier: License :: OSI Approved :: BSD License
24
+Classifier: Operating System :: OS Independent
25
+Classifier: Programming Language :: Python
26
+Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
27
+Classifier: Topic :: Internet :: WWW/HTTP :: WSGI
28
+Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
29
+Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
30
+Requires-Python: >=3.6
31
+Description-Content-Type: text/x-rst
32
+License-File: LICENSE.rst
33
+Requires-Dist: Werkzeug (>=2.0)
34
+Requires-Dist: Jinja2 (>=3.0)
35
+Requires-Dist: itsdangerous (>=2.0)
36
+Requires-Dist: click (>=7.1.2)
37
+Provides-Extra: async
38
+Requires-Dist: asgiref (>=3.2) ; extra == 'async'
39
+Provides-Extra: dotenv
40
+Requires-Dist: python-dotenv ; extra == 'dotenv'
41
+
42
+Flask
43
+=====
44
+
45
+Flask is a lightweight `WSGI`_ web application framework. It is designed
46
+to make getting started quick and easy, with the ability to scale up to
47
+complex applications. It began as a simple wrapper around `Werkzeug`_
48
+and `Jinja`_ and has become one of the most popular Python web
49
+application frameworks.
50
+
51
+Flask offers suggestions, but doesn't enforce any dependencies or
52
+project layout. It is up to the developer to choose the tools and
53
+libraries they want to use. There are many extensions provided by the
54
+community that make adding new functionality easy.
55
+
56
+.. _WSGI: https://wsgi.readthedocs.io/
57
+.. _Werkzeug: https://werkzeug.palletsprojects.com/
58
+.. _Jinja: https://jinja.palletsprojects.com/
59
+
60
+
61
+Installing
62
+----------
63
+
64
+Install and update using `pip`_:
65
+
66
+.. code-block:: text
67
+
68
+    $ pip install -U Flask
69
+
70
+.. _pip: https://pip.pypa.io/en/stable/getting-started/
71
+
72
+
73
+A Simple Example
74
+----------------
75
+
76
+.. code-block:: python
77
+
78
+    # save this as app.py
79
+    from flask import Flask
80
+
81
+    app = Flask(__name__)
82
+
83
+    @app.route("/")
84
+    def hello():
85
+        return "Hello, World!"
86
+
87
+.. code-block:: text
88
+
89
+    $ flask run
90
+      * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
91
+
92
+
93
+Contributing
94
+------------
95
+
96
+For guidance on setting up a development environment and how to make a
97
+contribution to Flask, see the `contributing guidelines`_.
98
+
99
+.. _contributing guidelines: https://github.com/pallets/flask/blob/main/CONTRIBUTING.rst
100
+
101
+
102
+Donate
103
+------
104
+
105
+The Pallets organization develops and supports Flask and the libraries
106
+it uses. In order to grow the community of contributors and users, and
107
+allow the maintainers to devote more time to the projects, `please
108
+donate today`_.
109
+
110
+.. _please donate today: https://palletsprojects.com/donate
111
+
112
+
113
+Links
114
+-----
115
+
116
+-   Documentation: https://flask.palletsprojects.com/
117
+-   Changes: https://flask.palletsprojects.com/changes/
118
+-   PyPI Releases: https://pypi.org/project/Flask/
119
+-   Source Code: https://github.com/pallets/flask/
120
+-   Issue Tracker: https://github.com/pallets/flask/issues/
121
+-   Website: https://palletsprojects.com/p/flask/
122
+-   Twitter: https://twitter.com/PalletsTeam
123
+-   Chat: https://discord.gg/pallets
124
+
125
+

+ 51
- 0
www/Files-API/.venv/lib/python3.7/site-packages/Flask-2.0.2.dist-info/RECORD View File

@@ -0,0 +1,51 @@
1
+../../../bin/flask,sha256=NkgkbzFbGqmh3Ki1ss2p1waxstQcfTEOeOSdYtd7XNA,263
2
+Flask-2.0.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
3
+Flask-2.0.2.dist-info/LICENSE.rst,sha256=SJqOEQhQntmKN7uYPhHg9-HTHwvY-Zp5yESOf_N9B-o,1475
4
+Flask-2.0.2.dist-info/METADATA,sha256=aKsvjFA_ZjZN1jLh1Ac3aQk-ZUZDPrrwo_TGYW1kdAQ,3839
5
+Flask-2.0.2.dist-info/RECORD,,
6
+Flask-2.0.2.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
7
+Flask-2.0.2.dist-info/entry_points.txt,sha256=gBLA1aKg0OYR8AhbAfg8lnburHtKcgJLDU52BBctN0k,42
8
+Flask-2.0.2.dist-info/top_level.txt,sha256=dvi65F6AeGWVU0TBpYiC04yM60-FX1gJFkK31IKQr5c,6
9
+flask/__init__.py,sha256=9ZCelLoNCpr6eSuLmYlzvbp12B3lrLgoN5U2UWk1vdo,2251
10
+flask/__main__.py,sha256=bYt9eEaoRQWdejEHFD8REx9jxVEdZptECFsV7F49Ink,30
11
+flask/__pycache__/__init__.cpython-37.pyc,,
12
+flask/__pycache__/__main__.cpython-37.pyc,,
13
+flask/__pycache__/app.cpython-37.pyc,,
14
+flask/__pycache__/blueprints.cpython-37.pyc,,
15
+flask/__pycache__/cli.cpython-37.pyc,,
16
+flask/__pycache__/config.cpython-37.pyc,,
17
+flask/__pycache__/ctx.cpython-37.pyc,,
18
+flask/__pycache__/debughelpers.cpython-37.pyc,,
19
+flask/__pycache__/globals.cpython-37.pyc,,
20
+flask/__pycache__/helpers.cpython-37.pyc,,
21
+flask/__pycache__/logging.cpython-37.pyc,,
22
+flask/__pycache__/scaffold.cpython-37.pyc,,
23
+flask/__pycache__/sessions.cpython-37.pyc,,
24
+flask/__pycache__/signals.cpython-37.pyc,,
25
+flask/__pycache__/templating.cpython-37.pyc,,
26
+flask/__pycache__/testing.cpython-37.pyc,,
27
+flask/__pycache__/typing.cpython-37.pyc,,
28
+flask/__pycache__/views.cpython-37.pyc,,
29
+flask/__pycache__/wrappers.cpython-37.pyc,,
30
+flask/app.py,sha256=ectBbi9hGmVHAse5TNcFQZIDRkDAxYUAnLgfuKD0Xws,81975
31
+flask/blueprints.py,sha256=AkAVXZ_MMkjwjklzCAMdBNowTiM0wVQPynnUnXjTL2M,23781
32
+flask/cli.py,sha256=wn2Un9RO32ZfRmCMem5KJ5h62-5lnmy1H9uxgyV-eBs,32238
33
+flask/config.py,sha256=70Uyjh1Jzb9MfTCT7NDhuZWAzyIEu-TIyk6-22MP3zQ,11285
34
+flask/ctx.py,sha256=EM3W0v1ctuFQAGk_HWtQdoJEg_r2f5Le4xcmElxFwwk,17428
35
+flask/debughelpers.py,sha256=W82-xrRmodjopBngI9roYH-q08EbQwN2HEGfDAi6SA0,6184
36
+flask/globals.py,sha256=cWd-R2hUH3VqPhnmQNww892tQS6Yjqg_wg8UvW1M7NM,1723
37
+flask/helpers.py,sha256=00WqA3wYeyjMrnAOPZTUyrnUf7H8ik3CVT0kqGl_qjk,30589
38
+flask/json/__init__.py,sha256=unAKdZBlxMI5OMiTU0-Z2Hl4CF1CMJmqTUzpStiExNw,11822
39
+flask/json/__pycache__/__init__.cpython-37.pyc,,
40
+flask/json/__pycache__/tag.cpython-37.pyc,,
41
+flask/json/tag.py,sha256=fys3HBLssWHuMAIJuTcf2K0bCtosePBKXIWASZEEjnU,8857
42
+flask/logging.py,sha256=1o_hirVGqdj7SBdETnhX7IAjklG89RXlrwz_2CjzQQE,2273
43
+flask/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
44
+flask/scaffold.py,sha256=fM9mRy7QBh9fhJ0VTogVx900dDa5oxz8FOw6OK5F-TU,32796
45
+flask/sessions.py,sha256=Kb7zY4qBIOU2cw1xM5mQ_KmgYUBDFbUYWjlkq0EFYis,15189
46
+flask/signals.py,sha256=H7QwDciK-dtBxinjKpexpglP0E6k0MJILiFWTItfmqU,2136
47
+flask/templating.py,sha256=l96VD39JQ0nue4Bcj7wZ4-FWWs-ppLxvgBCpwDQ4KAk,5626
48
+flask/testing.py,sha256=OsHT-2B70abWH3ulY9IbhLchXIeyj3L-cfcDa88wv5E,10281
49
+flask/typing.py,sha256=hXEVcXoH-QEabmy1F11pYaQ2SonlkMAwfjBAnqj2x18,1982
50
+flask/views.py,sha256=nhq31TRB5Z-z2mjFGZACaaB2Et5XPCmWhWxJxOvLWww,5948
51
+flask/wrappers.py,sha256=VndbHPRBSUUOejmd2Y3ydkoCVUtsS2OJIdJEVIkBVD8,5604

+ 5
- 0
www/Files-API/.venv/lib/python3.7/site-packages/Flask-2.0.2.dist-info/WHEEL View File

@@ -0,0 +1,5 @@
1
+Wheel-Version: 1.0
2
+Generator: bdist_wheel (0.37.0)
3
+Root-Is-Purelib: true
4
+Tag: py3-none-any
5
+

+ 3
- 0
www/Files-API/.venv/lib/python3.7/site-packages/Flask-2.0.2.dist-info/entry_points.txt View File

@@ -0,0 +1,3 @@
1
+[console_scripts]
2
+flask = flask.cli:main
3
+

+ 1
- 0
www/Files-API/.venv/lib/python3.7/site-packages/Flask-2.0.2.dist-info/top_level.txt View File

@@ -0,0 +1 @@
1
+flask

+ 1
- 0
www/Files-API/.venv/lib/python3.7/site-packages/Flask_Cors-3.0.10.dist-info/INSTALLER View File

@@ -0,0 +1 @@
1
+pip

+ 7
- 0
www/Files-API/.venv/lib/python3.7/site-packages/Flask_Cors-3.0.10.dist-info/LICENSE View File

@@ -0,0 +1,7 @@
1
+Copyright (C) 2016 Cory Dolphin, Olin College
2
+
3
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 149
- 0
www/Files-API/.venv/lib/python3.7/site-packages/Flask_Cors-3.0.10.dist-info/METADATA View File

@@ -0,0 +1,149 @@
1
+Metadata-Version: 2.1
2
+Name: Flask-Cors
3
+Version: 3.0.10
4
+Summary: A Flask extension adding a decorator for CORS support
5
+Home-page: https://github.com/corydolphin/flask-cors
6
+Author: Cory Dolphin
7
+Author-email: corydolphin@gmail.com
8
+License: MIT
9
+Platform: any
10
+Classifier: Environment :: Web Environment
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 :: 2
16
+Classifier: Programming Language :: Python :: 2.7
17
+Classifier: Programming Language :: Python :: 3
18
+Classifier: Programming Language :: Python :: 3.4
19
+Classifier: Programming Language :: Python :: 3.5
20
+Classifier: Programming Language :: Python :: 3.6
21
+Classifier: Programming Language :: Python :: 3.7
22
+Classifier: Programming Language :: Python :: Implementation :: CPython
23
+Classifier: Programming Language :: Python :: Implementation :: PyPy
24
+Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
25
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
26
+Requires-Dist: Flask (>=0.9)
27
+Requires-Dist: Six
28
+
29
+Flask-CORS
30
+==========
31
+
32
+|Build Status| |Latest Version| |Supported Python versions|
33
+|License|
34
+
35
+A Flask extension for handling Cross Origin Resource Sharing (CORS), making cross-origin AJAX possible.
36
+
37
+This package has a simple philosophy: when you want to enable CORS, you wish to enable it for all use cases on a domain. 
38
+This means no mucking around with different allowed headers, methods, etc. 
39
+
40
+By default, submission of cookies across domains is disabled due to the security implications. 
41
+Please see the documentation for how to enable credential'ed requests, and please make sure you add some sort of `CSRF <http://en.wikipedia.org/wiki/Cross-site_request_forgery>`__ protection before doing so!
42
+
43
+Installation
44
+------------
45
+
46
+Install the extension with using pip, or easy\_install.
47
+
48
+.. code:: bash
49
+
50
+    $ pip install -U flask-cors
51
+
52
+Usage
53
+-----
54
+
55
+This package exposes a Flask extension which by default enables CORS support on all routes, for all origins and methods. 
56
+It allows parameterization of all CORS headers on a per-resource level. 
57
+The package also contains a decorator, for those who prefer this approach.
58
+
59
+Simple Usage
60
+~~~~~~~~~~~~
61
+
62
+In the simplest case, initialize the Flask-Cors extension with default arguments in order to allow CORS for all domains on all routes. 
63
+See the full list of options in the `documentation <https://flask-cors.corydolphin.com/en/latest/api.html#extension>`__.
64
+
65
+.. code:: python
66
+
67
+
68
+    from flask import Flask
69
+    from flask_cors import CORS
70
+
71
+    app = Flask(__name__)
72
+    CORS(app)
73
+
74
+    @app.route("/")
75
+    def helloWorld():
76
+      return "Hello, cross-origin-world!"
77
+
78
+Resource specific CORS
79
+^^^^^^^^^^^^^^^^^^^^^^
80
+
81
+Alternatively, you can specify CORS options on a resource and origin level of granularity by passing a dictionary as the `resources` option, mapping paths to a set of options. 
82
+See the full list of options in the `documentation <https://flask-cors.corydolphin.com/en/latest/api.html#extension>`__.
83
+
84
+.. code:: python
85
+
86
+    app = Flask(__name__)
87
+    cors = CORS(app, resources={r"/api/*": {"origins": "*"}})
88
+
89
+    @app.route("/api/v1/users")
90
+    def list_users():
91
+      return "user example"
92
+
93
+Route specific CORS via decorator
94
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
95
+
96
+This extension also exposes a simple decorator to decorate flask routes with. 
97
+Simply add ``@cross_origin()`` below a call to Flask's ``@app.route(..)`` to allow CORS on a given route. 
98
+See the full list of options in the `decorator documentation <https://flask-cors.corydolphin.com/en/latest/api.html#decorator>`__.
99
+
100
+.. code:: python
101
+
102
+    @app.route("/")
103
+    @cross_origin()
104
+    def helloWorld():
105
+      return "Hello, cross-origin-world!"
106
+
107
+Documentation
108
+-------------
109
+
110
+For a full list of options, please see the full `documentation <https://flask-cors.corydolphin.com/en/latest/api.html>`__
111
+
112
+Troubleshooting
113
+---------------
114
+
115
+If things aren't working as you expect, enable logging to help understand what is going on under the hood, and why.
116
+
117
+.. code:: python
118
+
119
+    logging.getLogger('flask_cors').level = logging.DEBUG
120
+
121
+
122
+Tests
123
+-----
124
+
125
+A simple set of tests is included in ``test/``. 
126
+To run, install nose, and simply invoke ``nosetests`` or ``python setup.py test`` to exercise the tests.
127
+
128
+Contributing
129
+------------
130
+
131
+Questions, comments or improvements? 
132
+Please create an issue on `Github <https://github.com/corydolphin/flask-cors>`__, tweet at `@corydolphin <https://twitter.com/corydolphin>`__ or send me an email. 
133
+I do my best to include every contribution proposed in any way that I can.
134
+
135
+Credits
136
+-------
137
+
138
+This Flask extension is based upon the `Decorator for the HTTP Access Control <http://flask.pocoo.org/snippets/56/>`__ written by Armin Ronacher.
139
+
140
+.. |Build Status| image:: https://api.travis-ci.org/corydolphin/flask-cors.svg?branch=master
141
+   :target: https://travis-ci.org/corydolphin/flask-cors
142
+.. |Latest Version| image:: https://img.shields.io/pypi/v/Flask-Cors.svg
143
+   :target: https://pypi.python.org/pypi/Flask-Cors/
144
+.. |Supported Python versions| image:: https://img.shields.io/pypi/pyversions/Flask-Cors.svg
145
+   :target: https://img.shields.io/pypi/pyversions/Flask-Cors.svg
146
+.. |License| image:: http://img.shields.io/:license-mit-blue.svg
147
+   :target: https://pypi.python.org/pypi/Flask-Cors/
148
+
149
+

+ 16
- 0
www/Files-API/.venv/lib/python3.7/site-packages/Flask_Cors-3.0.10.dist-info/RECORD View File

@@ -0,0 +1,16 @@
1
+Flask_Cors-3.0.10.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
2
+Flask_Cors-3.0.10.dist-info/LICENSE,sha256=bhob3FSDTB4HQMvOXV9vLK4chG_Sp_SCsRZJWU-vvV0,1069
3
+Flask_Cors-3.0.10.dist-info/METADATA,sha256=GGjB2MELGVMzpRA98u66-Y4kjXwJvRuEzuv9JuQaBpc,5382
4
+Flask_Cors-3.0.10.dist-info/RECORD,,
5
+Flask_Cors-3.0.10.dist-info/WHEEL,sha256=Z-nyYpwrcSqxfdux5Mbn_DQ525iP7J2DG3JgGvOYyTQ,110
6
+Flask_Cors-3.0.10.dist-info/top_level.txt,sha256=aWye_0QNZPp_QtPF4ZluLHqnyVLT9CPJsfiGhwqkWuo,11
7
+flask_cors/__init__.py,sha256=oJExwfR7yU3HAsmQ_EfL6KoLK3zq3J9HsET9r-56sfM,791
8
+flask_cors/__pycache__/__init__.cpython-37.pyc,,
9
+flask_cors/__pycache__/core.cpython-37.pyc,,
10
+flask_cors/__pycache__/decorator.cpython-37.pyc,,
11
+flask_cors/__pycache__/extension.cpython-37.pyc,,
12
+flask_cors/__pycache__/version.cpython-37.pyc,,
13
+flask_cors/core.py,sha256=N6dEVe5dffaQTw79Mc8IvEeTzvY_YsKCiOZ1lJ_PyNk,13894
14
+flask_cors/decorator.py,sha256=iiwjUi0lVeCm4OJJHY5Cvuzj2nENbUns3Iq6zqKXuss,4937
15
+flask_cors/extension.py,sha256=HTSAUEDH8mvTLLMVrcpfbtrdh5OXK72VUPk_FAoQhpU,7586
16
+flask_cors/version.py,sha256=8OdYCyhDLC6EsmyL3_m3G4XCKOJMI20UlrLKmiyEoCE,23

+ 6
- 0
www/Files-API/.venv/lib/python3.7/site-packages/Flask_Cors-3.0.10.dist-info/WHEEL View File

@@ -0,0 +1,6 @@
1
+Wheel-Version: 1.0
2
+Generator: bdist_wheel (0.36.2)
3
+Root-Is-Purelib: true
4
+Tag: py2-none-any
5
+Tag: py3-none-any
6
+

+ 1
- 0
www/Files-API/.venv/lib/python3.7/site-packages/Flask_Cors-3.0.10.dist-info/top_level.txt View File

@@ -0,0 +1 @@
1
+flask_cors

+ 1
- 0
www/Files-API/.venv/lib/python3.7/site-packages/Jinja2-3.0.3.dist-info/INSTALLER View File

@@ -0,0 +1 @@
1
+pip

+ 28
- 0
www/Files-API/.venv/lib/python3.7/site-packages/Jinja2-3.0.3.dist-info/LICENSE.rst View File

@@ -0,0 +1,28 @@
1
+Copyright 2007 Pallets
2
+
3
+Redistribution and use in source and binary forms, with or without
4
+modification, are permitted provided that the following conditions are
5
+met:
6
+
7
+1.  Redistributions of source code must retain the above copyright
8
+    notice, this list of conditions and the following disclaimer.
9
+
10
+2.  Redistributions in binary form must reproduce the above copyright
11
+    notice, this list of conditions and the following disclaimer in the
12
+    documentation and/or other materials provided with the distribution.
13
+
14
+3.  Neither the name of the copyright holder nor the names of its
15
+    contributors may be used to endorse or promote products derived from
16
+    this software without specific prior written permission.
17
+
18
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
21
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
24
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 113
- 0
www/Files-API/.venv/lib/python3.7/site-packages/Jinja2-3.0.3.dist-info/METADATA View File

@@ -0,0 +1,113 @@
1
+Metadata-Version: 2.1
2
+Name: Jinja2
3
+Version: 3.0.3
4
+Summary: A very fast and expressive template engine.
5
+Home-page: https://palletsprojects.com/p/jinja/
6
+Author: Armin Ronacher
7
+Author-email: armin.ronacher@active-4.com
8
+Maintainer: Pallets
9
+Maintainer-email: contact@palletsprojects.com
10
+License: BSD-3-Clause
11
+Project-URL: Donate, https://palletsprojects.com/donate
12
+Project-URL: Documentation, https://jinja.palletsprojects.com/
13
+Project-URL: Changes, https://jinja.palletsprojects.com/changes/
14
+Project-URL: Source Code, https://github.com/pallets/jinja/
15
+Project-URL: Issue Tracker, https://github.com/pallets/jinja/issues/
16
+Project-URL: Twitter, https://twitter.com/PalletsTeam
17
+Project-URL: Chat, https://discord.gg/pallets
18
+Platform: UNKNOWN
19
+Classifier: Development Status :: 5 - Production/Stable
20
+Classifier: Environment :: Web Environment
21
+Classifier: Intended Audience :: Developers
22
+Classifier: License :: OSI Approved :: BSD License
23
+Classifier: Operating System :: OS Independent
24
+Classifier: Programming Language :: Python
25
+Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
26
+Classifier: Topic :: Text Processing :: Markup :: HTML
27
+Requires-Python: >=3.6
28
+Description-Content-Type: text/x-rst
29
+License-File: LICENSE.rst
30
+Requires-Dist: MarkupSafe (>=2.0)
31
+Provides-Extra: i18n
32
+Requires-Dist: Babel (>=2.7) ; extra == 'i18n'
33
+
34
+Jinja
35
+=====
36
+
37
+Jinja is a fast, expressive, extensible templating engine. Special
38
+placeholders in the template allow writing code similar to Python
39
+syntax. Then the template is passed data to render the final document.
40
+
41
+It includes:
42
+
43
+-   Template inheritance and inclusion.
44
+-   Define and import macros within templates.
45
+-   HTML templates can use autoescaping to prevent XSS from untrusted
46
+    user input.
47
+-   A sandboxed environment can safely render untrusted templates.
48
+-   AsyncIO support for generating templates and calling async
49
+    functions.
50
+-   I18N support with Babel.
51
+-   Templates are compiled to optimized Python code just-in-time and
52
+    cached, or can be compiled ahead-of-time.
53
+-   Exceptions point to the correct line in templates to make debugging
54
+    easier.
55
+-   Extensible filters, tests, functions, and even syntax.
56
+
57
+Jinja's philosophy is that while application logic belongs in Python if
58
+possible, it shouldn't make the template designer's job difficult by
59
+restricting functionality too much.
60
+
61
+
62
+Installing
63
+----------
64
+
65
+Install and update using `pip`_:
66
+
67
+.. code-block:: text
68
+
69
+    $ pip install -U Jinja2
70
+
71
+.. _pip: https://pip.pypa.io/en/stable/getting-started/
72
+
73
+
74
+In A Nutshell
75
+-------------
76
+
77
+.. code-block:: jinja
78
+
79
+    {% extends "base.html" %}
80
+    {% block title %}Members{% endblock %}
81
+    {% block content %}
82
+      <ul>
83
+      {% for user in users %}
84
+        <li><a href="{{ user.url }}">{{ user.username }}</a></li>
85
+      {% endfor %}
86
+      </ul>
87
+    {% endblock %}
88
+
89
+
90
+Donate
91
+------
92
+
93
+The Pallets organization develops and supports Jinja and other popular
94
+packages. In order to grow the community of contributors and users, and
95
+allow the maintainers to devote more time to the projects, `please
96
+donate today`_.
97
+
98
+.. _please donate today: https://palletsprojects.com/donate
99
+
100
+
101
+Links
102
+-----
103
+
104
+-   Documentation: https://jinja.palletsprojects.com/
105
+-   Changes: https://jinja.palletsprojects.com/changes/
106
+-   PyPI Releases: https://pypi.org/project/Jinja2/
107
+-   Source Code: https://github.com/pallets/jinja/
108
+-   Issue Tracker: https://github.com/pallets/jinja/issues/
109
+-   Website: https://palletsprojects.com/p/jinja/
110
+-   Twitter: https://twitter.com/PalletsTeam
111
+-   Chat: https://discord.gg/pallets
112
+
113
+

+ 58
- 0
www/Files-API/.venv/lib/python3.7/site-packages/Jinja2-3.0.3.dist-info/RECORD View File

@@ -0,0 +1,58 @@
1
+Jinja2-3.0.3.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
2
+Jinja2-3.0.3.dist-info/LICENSE.rst,sha256=O0nc7kEF6ze6wQ-vG-JgQI_oXSUrjp3y4JefweCUQ3s,1475
3
+Jinja2-3.0.3.dist-info/METADATA,sha256=uvKoBSMLvh0qHK-6khEqSe1yOV4jxFzbPSREOp-3BXk,3539
4
+Jinja2-3.0.3.dist-info/RECORD,,
5
+Jinja2-3.0.3.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
6
+Jinja2-3.0.3.dist-info/entry_points.txt,sha256=Qy_DkVo6Xj_zzOtmErrATe8lHZhOqdjpt3e4JJAGyi8,61
7
+Jinja2-3.0.3.dist-info/top_level.txt,sha256=PkeVWtLb3-CqjWi1fO29OCbj55EhX_chhKrCdrVe_zs,7
8
+jinja2/__init__.py,sha256=V3JjnTV-nyIHN6rwj03N1M11fegjGvv-weiHMQwH1pk,2205
9
+jinja2/__pycache__/__init__.cpython-37.pyc,,
10
+jinja2/__pycache__/_identifier.cpython-37.pyc,,
11
+jinja2/__pycache__/async_utils.cpython-37.pyc,,
12
+jinja2/__pycache__/bccache.cpython-37.pyc,,
13
+jinja2/__pycache__/compiler.cpython-37.pyc,,
14
+jinja2/__pycache__/constants.cpython-37.pyc,,
15
+jinja2/__pycache__/debug.cpython-37.pyc,,
16
+jinja2/__pycache__/defaults.cpython-37.pyc,,
17
+jinja2/__pycache__/environment.cpython-37.pyc,,
18
+jinja2/__pycache__/exceptions.cpython-37.pyc,,
19
+jinja2/__pycache__/ext.cpython-37.pyc,,
20
+jinja2/__pycache__/filters.cpython-37.pyc,,
21
+jinja2/__pycache__/idtracking.cpython-37.pyc,,
22
+jinja2/__pycache__/lexer.cpython-37.pyc,,
23
+jinja2/__pycache__/loaders.cpython-37.pyc,,
24
+jinja2/__pycache__/meta.cpython-37.pyc,,
25
+jinja2/__pycache__/nativetypes.cpython-37.pyc,,
26
+jinja2/__pycache__/nodes.cpython-37.pyc,,
27
+jinja2/__pycache__/optimizer.cpython-37.pyc,,
28
+jinja2/__pycache__/parser.cpython-37.pyc,,
29
+jinja2/__pycache__/runtime.cpython-37.pyc,,
30
+jinja2/__pycache__/sandbox.cpython-37.pyc,,
31
+jinja2/__pycache__/tests.cpython-37.pyc,,
32
+jinja2/__pycache__/utils.cpython-37.pyc,,
33
+jinja2/__pycache__/visitor.cpython-37.pyc,,
34
+jinja2/_identifier.py,sha256=EdgGJKi7O1yvr4yFlvqPNEqV6M1qHyQr8Gt8GmVTKVM,1775
35
+jinja2/async_utils.py,sha256=jBcJSmLoQa2PjJdNcOpwaUmBxFNE9rZNwMF7Ob3dP9I,1947
36
+jinja2/bccache.py,sha256=v5rKAlYxIvfJEa0uGzAC6yCYSS3KuXT5Eqi-n9qvNi8,12670
37
+jinja2/compiler.py,sha256=v7zKz-mgSYXmfXD9mRmi2BU0B6Z-1RGZmOXCrsPKzc0,72209
38
+jinja2/constants.py,sha256=GMoFydBF_kdpaRKPoM5cl5MviquVRLVyZtfp5-16jg0,1433
39
+jinja2/debug.py,sha256=r0JL0vfO7HPlyKZEdr6eVlg7HoIg2OQGmJ7SeUEyAeI,8494
40
+jinja2/defaults.py,sha256=boBcSw78h-lp20YbaXSJsqkAI2uN_mD_TtCydpeq5wU,1267
41
+jinja2/environment.py,sha256=Vz20npBX5-SUH_eguQuxrSQDEsLFjho0qcHLdMhY3hA,60983
42
+jinja2/exceptions.py,sha256=ioHeHrWwCWNaXX1inHmHVblvc4haO7AXsjCp3GfWvx0,5071
43
+jinja2/ext.py,sha256=44SjDjeYkkxQTpmC2BetOTxEFMgQ42p2dfSwXmPFcSo,32122
44
+jinja2/filters.py,sha256=jusKTZbd0ddZMaibZkxMUVKNsOsaYtOq_Il8Imtx4BE,52609
45
+jinja2/idtracking.py,sha256=WekexMql3u5n3vDxFsQ_i8HW0j24AtjWTjrPBLWrHww,10721
46
+jinja2/lexer.py,sha256=qNEQqDQw_zO5EaH6rFQsER7Qwn2du0o22prB-TR11HE,29930
47
+jinja2/loaders.py,sha256=1MjXJOU6p4VywFqtpDZhtvtT_vIlmHnZKMKHHw4SZzA,22754
48
+jinja2/meta.py,sha256=GNPEvifmSaU3CMxlbheBOZjeZ277HThOPUTf1RkppKQ,4396
49
+jinja2/nativetypes.py,sha256=KCJl71MogrDih_BHBu6xV5p7Cr_jggAgu-shKTg6L28,3969
50
+jinja2/nodes.py,sha256=i34GPRAZexXMT6bwuf5SEyvdmS-bRCy9KMjwN5O6pjk,34550
51
+jinja2/optimizer.py,sha256=tHkMwXxfZkbfA1KmLcqmBMSaz7RLIvvItrJcPoXTyD8,1650
52
+jinja2/parser.py,sha256=kHnU8v92GwMYkfr0MVakWv8UlSf_kJPx8LUsgQMof70,39767
53
+jinja2/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
+jinja2/runtime.py,sha256=wVRlkEmAgNU67AIQDqLvI6UkNLkzDqpLA-z4Mi3vl3g,35054
55
+jinja2/sandbox.py,sha256=-8zxR6TO9kUkciAVFsIKu8Oq-C7PTeYEdZ5TtA55-gw,14600
56
+jinja2/tests.py,sha256=Am5Z6Lmfr2XaH_npIfJJ8MdXtWsbLjMULZJulTAj30E,5905
57
+jinja2/utils.py,sha256=udQxWIKaq4QDCZiXN31ngKOaGGdaMA5fl0JMaM-F6fg,26971
58
+jinja2/visitor.py,sha256=ZmeLuTj66ic35-uFH-1m0EKXiw4ObDDb_WuE6h5vPFg,3572

+ 5
- 0
www/Files-API/.venv/lib/python3.7/site-packages/Jinja2-3.0.3.dist-info/WHEEL View File

@@ -0,0 +1,5 @@
1
+Wheel-Version: 1.0
2
+Generator: bdist_wheel (0.37.0)
3
+Root-Is-Purelib: true
4
+Tag: py3-none-any
5
+

+ 3
- 0
www/Files-API/.venv/lib/python3.7/site-packages/Jinja2-3.0.3.dist-info/entry_points.txt View File

@@ -0,0 +1,3 @@
1
+[babel.extractors]
2
+jinja2 = jinja2.ext:babel_extract [i18n]
3
+

+ 1
- 0
www/Files-API/.venv/lib/python3.7/site-packages/Jinja2-3.0.3.dist-info/top_level.txt View File

@@ -0,0 +1 @@
1
+jinja2

+ 1
- 0
www/Files-API/.venv/lib/python3.7/site-packages/MarkupSafe-2.0.1.dist-info/INSTALLER View File

@@ -0,0 +1 @@
1
+pip

+ 28
- 0
www/Files-API/.venv/lib/python3.7/site-packages/MarkupSafe-2.0.1.dist-info/LICENSE.rst View File

@@ -0,0 +1,28 @@
1
+Copyright 2010 Pallets
2
+
3
+Redistribution and use in source and binary forms, with or without
4
+modification, are permitted provided that the following conditions are
5
+met:
6
+
7
+1.  Redistributions of source code must retain the above copyright
8
+    notice, this list of conditions and the following disclaimer.
9
+
10
+2.  Redistributions in binary form must reproduce the above copyright
11
+    notice, this list of conditions and the following disclaimer in the
12
+    documentation and/or other materials provided with the distribution.
13
+
14
+3.  Neither the name of the copyright holder nor the names of its
15
+    contributors may be used to endorse or promote products derived from
16
+    this software without specific prior written permission.
17
+
18
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
21
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
24
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 100
- 0
www/Files-API/.venv/lib/python3.7/site-packages/MarkupSafe-2.0.1.dist-info/METADATA View File

@@ -0,0 +1,100 @@
1
+Metadata-Version: 2.1
2
+Name: MarkupSafe
3
+Version: 2.0.1
4
+Summary: Safely add untrusted strings to HTML/XML markup.
5
+Home-page: https://palletsprojects.com/p/markupsafe/
6
+Author: Armin Ronacher
7
+Author-email: armin.ronacher@active-4.com
8
+Maintainer: Pallets
9
+Maintainer-email: contact@palletsprojects.com
10
+License: BSD-3-Clause
11
+Project-URL: Donate, https://palletsprojects.com/donate
12
+Project-URL: Documentation, https://markupsafe.palletsprojects.com/
13
+Project-URL: Changes, https://markupsafe.palletsprojects.com/changes/
14
+Project-URL: Source Code, https://github.com/pallets/markupsafe/
15
+Project-URL: Issue Tracker, https://github.com/pallets/markupsafe/issues/
16
+Project-URL: Twitter, https://twitter.com/PalletsTeam
17
+Project-URL: Chat, https://discord.gg/pallets
18
+Platform: UNKNOWN
19
+Classifier: Development Status :: 5 - Production/Stable
20
+Classifier: Environment :: Web Environment
21
+Classifier: Intended Audience :: Developers
22
+Classifier: License :: OSI Approved :: BSD License
23
+Classifier: Operating System :: OS Independent
24
+Classifier: Programming Language :: Python
25
+Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
26
+Classifier: Topic :: Text Processing :: Markup :: HTML
27
+Requires-Python: >=3.6
28
+Description-Content-Type: text/x-rst
29
+
30
+MarkupSafe
31
+==========
32
+
33
+MarkupSafe implements a text object that escapes characters so it is
34
+safe to use in HTML and XML. Characters that have special meanings are
35
+replaced so that they display as the actual characters. This mitigates
36
+injection attacks, meaning untrusted user input can safely be displayed
37
+on a page.
38
+
39
+
40
+Installing
41
+----------
42
+
43
+Install and update using `pip`_:
44
+
45
+.. code-block:: text
46
+
47
+    pip install -U MarkupSafe
48
+
49
+.. _pip: https://pip.pypa.io/en/stable/quickstart/
50
+
51
+
52
+Examples
53
+--------
54
+
55
+.. code-block:: pycon
56
+
57
+    >>> from markupsafe import Markup, escape
58
+
59
+    >>> # escape replaces special characters and wraps in Markup
60
+    >>> escape("<script>alert(document.cookie);</script>")
61
+    Markup('&lt;script&gt;alert(document.cookie);&lt;/script&gt;')
62
+
63
+    >>> # wrap in Markup to mark text "safe" and prevent escaping
64
+    >>> Markup("<strong>Hello</strong>")
65
+    Markup('<strong>hello</strong>')
66
+
67
+    >>> escape(Markup("<strong>Hello</strong>"))
68
+    Markup('<strong>hello</strong>')
69
+
70
+    >>> # Markup is a str subclass
71
+    >>> # methods and operators escape their arguments
72
+    >>> template = Markup("Hello <em>{name}</em>")
73
+    >>> template.format(name='"World"')
74
+    Markup('Hello <em>&#34;World&#34;</em>')
75
+
76
+
77
+Donate
78
+------
79
+
80
+The Pallets organization develops and supports MarkupSafe and other
81
+popular packages. In order to grow the community of contributors and
82
+users, and allow the maintainers to devote more time to the projects,
83
+`please donate today`_.
84
+
85
+.. _please donate today: https://palletsprojects.com/donate
86
+
87
+
88
+Links
89
+-----
90
+
91
+-   Documentation: https://markupsafe.palletsprojects.com/
92
+-   Changes: https://markupsafe.palletsprojects.com/changes/
93
+-   PyPI Releases: https://pypi.org/project/MarkupSafe/
94
+-   Source Code: https://github.com/pallets/markupsafe/
95
+-   Issue Tracker: https://github.com/pallets/markupsafe/issues/
96
+-   Website: https://palletsprojects.com/p/markupsafe/
97
+-   Twitter: https://twitter.com/PalletsTeam
98
+-   Chat: https://discord.gg/pallets
99
+
100
+

+ 14
- 0
www/Files-API/.venv/lib/python3.7/site-packages/MarkupSafe-2.0.1.dist-info/RECORD View File

@@ -0,0 +1,14 @@
1
+MarkupSafe-2.0.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
2
+MarkupSafe-2.0.1.dist-info/LICENSE.rst,sha256=SJqOEQhQntmKN7uYPhHg9-HTHwvY-Zp5yESOf_N9B-o,1475
3
+MarkupSafe-2.0.1.dist-info/METADATA,sha256=FmPpxBdaqCCjF-XKqoxeEzqAzhetQnrkkSsd3V3X-Jc,3211
4
+MarkupSafe-2.0.1.dist-info/RECORD,,
5
+MarkupSafe-2.0.1.dist-info/WHEEL,sha256=WVG6A_oY5zUoNXUyvfLMOSXC-hqC5VZacUL1MeSOz70,110
6
+MarkupSafe-2.0.1.dist-info/top_level.txt,sha256=qy0Plje5IJuvsCBjejJyhDCjEAdcDLK_2agVcex8Z6U,11
7
+markupsafe/__init__.py,sha256=9Tez4UIlI7J6_sQcUFK1dKniT_b_8YefpGIyYJ3Sr2Q,8923
8
+markupsafe/__pycache__/__init__.cpython-37.pyc,,
9
+markupsafe/__pycache__/_native.cpython-37.pyc,,
10
+markupsafe/_native.py,sha256=GTKEV-bWgZuSjklhMHOYRHU9k0DMewTf5mVEZfkbuns,1986
11
+markupsafe/_speedups.c,sha256=CDDtwaV21D2nYtypnMQzxvvpZpcTvIs8OZ6KDa1g4t0,7400
12
+markupsafe/_speedups.cpython-37m-darwin.so,sha256=-lOmkchIobdEI6p9oNy2-R92WjJMnNps8l7Ataoljcs,35328
13
+markupsafe/_speedups.pyi,sha256=vfMCsOgbAXRNLUXkyuyonG8uEWKYU4PDqNuMaDELAYw,229
14
+markupsafe/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0

+ 5
- 0
www/Files-API/.venv/lib/python3.7/site-packages/MarkupSafe-2.0.1.dist-info/WHEEL View File

@@ -0,0 +1,5 @@
1
+Wheel-Version: 1.0
2
+Generator: bdist_wheel (0.36.2)
3
+Root-Is-Purelib: false
4
+Tag: cp37-cp37m-macosx_10_9_x86_64
5
+

+ 1
- 0
www/Files-API/.venv/lib/python3.7/site-packages/MarkupSafe-2.0.1.dist-info/top_level.txt View File

@@ -0,0 +1 @@
1
+markupsafe

+ 1
- 0
www/Files-API/.venv/lib/python3.7/site-packages/Werkzeug-2.0.2.dist-info/INSTALLER View File

@@ -0,0 +1 @@
1
+pip

+ 28
- 0
www/Files-API/.venv/lib/python3.7/site-packages/Werkzeug-2.0.2.dist-info/LICENSE.rst View File

@@ -0,0 +1,28 @@
1
+Copyright 2007 Pallets
2
+
3
+Redistribution and use in source and binary forms, with or without
4
+modification, are permitted provided that the following conditions are
5
+met:
6
+
7
+1.  Redistributions of source code must retain the above copyright
8
+    notice, this list of conditions and the following disclaimer.
9
+
10
+2.  Redistributions in binary form must reproduce the above copyright
11
+    notice, this list of conditions and the following disclaimer in the
12
+    documentation and/or other materials provided with the distribution.
13
+
14
+3.  Neither the name of the copyright holder nor the names of its
15
+    contributors may be used to endorse or promote products derived from
16
+    this software without specific prior written permission.
17
+
18
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
21
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
24
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 129
- 0
www/Files-API/.venv/lib/python3.7/site-packages/Werkzeug-2.0.2.dist-info/METADATA View File

@@ -0,0 +1,129 @@
1
+Metadata-Version: 2.1
2
+Name: Werkzeug
3
+Version: 2.0.2
4
+Summary: The comprehensive WSGI web application library.
5
+Home-page: https://palletsprojects.com/p/werkzeug/
6
+Author: Armin Ronacher
7
+Author-email: armin.ronacher@active-4.com
8
+Maintainer: Pallets
9
+Maintainer-email: contact@palletsprojects.com
10
+License: BSD-3-Clause
11
+Project-URL: Donate, https://palletsprojects.com/donate
12
+Project-URL: Documentation, https://werkzeug.palletsprojects.com/
13
+Project-URL: Changes, https://werkzeug.palletsprojects.com/changes/
14
+Project-URL: Source Code, https://github.com/pallets/werkzeug/
15
+Project-URL: Issue Tracker, https://github.com/pallets/werkzeug/issues/
16
+Project-URL: Twitter, https://twitter.com/PalletsTeam
17
+Project-URL: Chat, https://discord.gg/pallets
18
+Platform: UNKNOWN
19
+Classifier: Development Status :: 5 - Production/Stable
20
+Classifier: Environment :: Web Environment
21
+Classifier: Intended Audience :: Developers
22
+Classifier: License :: OSI Approved :: BSD License
23
+Classifier: Operating System :: OS Independent
24
+Classifier: Programming Language :: Python
25
+Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
26
+Classifier: Topic :: Internet :: WWW/HTTP :: WSGI
27
+Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
28
+Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware
29
+Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
30
+Requires-Python: >=3.6
31
+Description-Content-Type: text/x-rst
32
+License-File: LICENSE.rst
33
+Requires-Dist: dataclasses ; python_version < "3.7"
34
+Provides-Extra: watchdog
35
+Requires-Dist: watchdog ; extra == 'watchdog'
36
+
37
+Werkzeug
38
+========
39
+
40
+*werkzeug* German noun: "tool". Etymology: *werk* ("work"), *zeug* ("stuff")
41
+
42
+Werkzeug is a comprehensive `WSGI`_ web application library. It began as
43
+a simple collection of various utilities for WSGI applications and has
44
+become one of the most advanced WSGI utility libraries.
45
+
46
+It includes:
47
+
48
+-   An interactive debugger that allows inspecting stack traces and
49
+    source code in the browser with an interactive interpreter for any
50
+    frame in the stack.
51
+-   A full-featured request object with objects to interact with
52
+    headers, query args, form data, files, and cookies.
53
+-   A response object that can wrap other WSGI applications and handle
54
+    streaming data.
55
+-   A routing system for matching URLs to endpoints and generating URLs
56
+    for endpoints, with an extensible system for capturing variables
57
+    from URLs.
58
+-   HTTP utilities to handle entity tags, cache control, dates, user
59
+    agents, cookies, files, and more.
60
+-   A threaded WSGI server for use while developing applications
61
+    locally.
62
+-   A test client for simulating HTTP requests during testing without
63
+    requiring running a server.
64
+
65
+Werkzeug doesn't enforce any dependencies. It is up to the developer to
66
+choose a template engine, database adapter, and even how to handle
67
+requests. It can be used to build all sorts of end user applications
68
+such as blogs, wikis, or bulletin boards.
69
+
70
+`Flask`_ wraps Werkzeug, using it to handle the details of WSGI while
71
+providing more structure and patterns for defining powerful
72
+applications.
73
+
74
+.. _WSGI: https://wsgi.readthedocs.io/en/latest/
75
+.. _Flask: https://www.palletsprojects.com/p/flask/
76
+
77
+
78
+Installing
79
+----------
80
+
81
+Install and update using `pip`_:
82
+
83
+.. code-block:: text
84
+
85
+    pip install -U Werkzeug
86
+
87
+.. _pip: https://pip.pypa.io/en/stable/getting-started/
88
+
89
+
90
+A Simple Example
91
+----------------
92
+
93
+.. code-block:: python
94
+
95
+    from werkzeug.wrappers import Request, Response
96
+
97
+    @Request.application
98
+    def application(request):
99
+        return Response('Hello, World!')
100
+
101
+    if __name__ == '__main__':
102
+        from werkzeug.serving import run_simple
103
+        run_simple('localhost', 4000, application)
104
+
105
+
106
+Donate
107
+------
108
+
109
+The Pallets organization develops and supports Werkzeug and other
110
+popular packages. In order to grow the community of contributors and
111
+users, and allow the maintainers to devote more time to the projects,
112
+`please donate today`_.
113
+
114
+.. _please donate today: https://palletsprojects.com/donate
115
+
116
+
117
+Links
118
+-----
119
+
120
+-   Documentation: https://werkzeug.palletsprojects.com/
121
+-   Changes: https://werkzeug.palletsprojects.com/changes/
122
+-   PyPI Releases: https://pypi.org/project/Werkzeug/
123
+-   Source Code: https://github.com/pallets/werkzeug/
124
+-   Issue Tracker: https://github.com/pallets/werkzeug/issues/
125
+-   Website: https://palletsprojects.com/p/werkzeug/
126
+-   Twitter: https://twitter.com/PalletsTeam
127
+-   Chat: https://discord.gg/pallets
128
+
129
+

+ 111
- 0
www/Files-API/.venv/lib/python3.7/site-packages/Werkzeug-2.0.2.dist-info/RECORD View File

@@ -0,0 +1,111 @@
1
+Werkzeug-2.0.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
2
+Werkzeug-2.0.2.dist-info/LICENSE.rst,sha256=O0nc7kEF6ze6wQ-vG-JgQI_oXSUrjp3y4JefweCUQ3s,1475
3
+Werkzeug-2.0.2.dist-info/METADATA,sha256=vh_xrARtpmkFYnWRAgfSiHgl66LH143rMfAfPZo-R_E,4452
4
+Werkzeug-2.0.2.dist-info/RECORD,,
5
+Werkzeug-2.0.2.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
6
+Werkzeug-2.0.2.dist-info/top_level.txt,sha256=QRyj2VjwJoQkrwjwFIOlB8Xg3r9un0NtqVHQF-15xaw,9
7
+werkzeug/__init__.py,sha256=Wx1PLCftJ7UAS0fBXEO4Prdr6kvEQ124Stwg-XwyhW4,188
8
+werkzeug/__pycache__/__init__.cpython-37.pyc,,
9
+werkzeug/__pycache__/_internal.cpython-37.pyc,,
10
+werkzeug/__pycache__/_reloader.cpython-37.pyc,,
11
+werkzeug/__pycache__/datastructures.cpython-37.pyc,,
12
+werkzeug/__pycache__/exceptions.cpython-37.pyc,,
13
+werkzeug/__pycache__/filesystem.cpython-37.pyc,,
14
+werkzeug/__pycache__/formparser.cpython-37.pyc,,
15
+werkzeug/__pycache__/http.cpython-37.pyc,,
16
+werkzeug/__pycache__/local.cpython-37.pyc,,
17
+werkzeug/__pycache__/routing.cpython-37.pyc,,
18
+werkzeug/__pycache__/security.cpython-37.pyc,,
19
+werkzeug/__pycache__/serving.cpython-37.pyc,,
20
+werkzeug/__pycache__/test.cpython-37.pyc,,
21
+werkzeug/__pycache__/testapp.cpython-37.pyc,,
22
+werkzeug/__pycache__/urls.cpython-37.pyc,,
23
+werkzeug/__pycache__/user_agent.cpython-37.pyc,,
24
+werkzeug/__pycache__/useragents.cpython-37.pyc,,
25
+werkzeug/__pycache__/utils.cpython-37.pyc,,
26
+werkzeug/__pycache__/wsgi.cpython-37.pyc,,
27
+werkzeug/_internal.py,sha256=_QKkvdaG4pDFwK68c0EpPzYJGe9Y7toRAT1cBbC-CxU,18572
28
+werkzeug/_reloader.py,sha256=B1hEfgsUOz2IginBQM5Zak_eaIF7gr3GS5-0x2OHvAE,13950
29
+werkzeug/datastructures.py,sha256=m79A8rHQEt5B7qVqyrjARXzHL66Katn8S92urGscTw4,97929
30
+werkzeug/datastructures.pyi,sha256=CoVwrQ2Vr9JnbprNL9aE3vOz8mOejT9qysQ-BT53C8Y,34089
31
+werkzeug/debug/__init__.py,sha256=jYA1e1Gw_8EPOytr-BoMdmm0rzP-Z1H0Ih7wIObnKwQ,17968
32
+werkzeug/debug/__pycache__/__init__.cpython-37.pyc,,
33
+werkzeug/debug/__pycache__/console.cpython-37.pyc,,
34
+werkzeug/debug/__pycache__/repr.cpython-37.pyc,,
35
+werkzeug/debug/__pycache__/tbtools.cpython-37.pyc,,
36
+werkzeug/debug/console.py,sha256=E1nBMEvFkX673ShQjPtVY-byYatfX9MN-dBMjRI8a8E,5897
37
+werkzeug/debug/repr.py,sha256=QCSHENKsChEZDCIApkVi_UNjhJ77v8BMXK1OfxO189M,9483
38
+werkzeug/debug/shared/FONT_LICENSE,sha256=LwAVEI1oYnvXiNMT9SnCH_TaLCxCpeHziDrMg0gPkAI,4673
39
+werkzeug/debug/shared/ICON_LICENSE.md,sha256=DhA6Y1gUl5Jwfg0NFN9Rj4VWITt8tUx0IvdGf0ux9-s,222
40
+werkzeug/debug/shared/console.png,sha256=bxax6RXXlvOij_KeqvSNX0ojJf83YbnZ7my-3Gx9w2A,507
41
+werkzeug/debug/shared/debugger.js,sha256=tg42SZs1SVmYWZ-_Fj5ELK5-FLHnGNQrei0K2By8Bw8,10521
42
+werkzeug/debug/shared/less.png,sha256=-4-kNRaXJSONVLahrQKUxMwXGm9R4OnZ9SxDGpHlIR4,191
43
+werkzeug/debug/shared/more.png,sha256=GngN7CioHQoV58rH6ojnkYi8c_qED2Aka5FO5UXrReY,200
44
+werkzeug/debug/shared/source.png,sha256=RoGcBTE4CyCB85GBuDGTFlAnUqxwTBiIfDqW15EpnUQ,818
45
+werkzeug/debug/shared/style.css,sha256=h1ZSUVaKNpfbfcYzRb513WAhPySGDQom1uih3uEDxPw,6704
46
+werkzeug/debug/shared/ubuntu.ttf,sha256=1eaHFyepmy4FyDvjLVzpITrGEBu_CZYY94jE0nED1c0,70220
47
+werkzeug/debug/tbtools.py,sha256=AFRrjLDCAps7G5K2-RxNZpXXaEoeFHm68T00f4vlDYA,19362
48
+werkzeug/exceptions.py,sha256=CUwx0pBiNbk4f9cON17ekgKnmLi6HIVFjUmYZc2x0wM,28681
49
+werkzeug/filesystem.py,sha256=JS2Dv2QF98WILxY4_thHl-WMcUcwluF_4igkDPaP1l4,1956
50
+werkzeug/formparser.py,sha256=X-p3Ek4ji8XrKrbmaWxr8StLSc6iuksbpIeweaabs4s,17400
51
+werkzeug/http.py,sha256=oUCXFFMnkOQ-cHbUY_aiqitshcrSzNDq3fEMf1VI_yk,45141
52
+werkzeug/local.py,sha256=bwL-y3-qOZAspJ66W1P36SUApLXJy3UY8nLYbM9kfmY,23183
53
+werkzeug/middleware/__init__.py,sha256=qfqgdT5npwG9ses3-FXQJf3aB95JYP1zchetH_T3PUw,500
54
+werkzeug/middleware/__pycache__/__init__.cpython-37.pyc,,
55
+werkzeug/middleware/__pycache__/dispatcher.cpython-37.pyc,,
56
+werkzeug/middleware/__pycache__/http_proxy.cpython-37.pyc,,
57
+werkzeug/middleware/__pycache__/lint.cpython-37.pyc,,
58
+werkzeug/middleware/__pycache__/profiler.cpython-37.pyc,,
59
+werkzeug/middleware/__pycache__/proxy_fix.cpython-37.pyc,,
60
+werkzeug/middleware/__pycache__/shared_data.cpython-37.pyc,,
61
+werkzeug/middleware/dispatcher.py,sha256=Fh_w-KyWnTSYF-Lfv5dimQ7THSS7afPAZMmvc4zF1gg,2580
62
+werkzeug/middleware/http_proxy.py,sha256=HE8VyhS7CR-E1O6_9b68huv8FLgGGR1DLYqkS3Xcp3Q,7558
63
+werkzeug/middleware/lint.py,sha256=sAg3GcOhICIkwYX5bJGG8n8iebX0Yipq_UH0HvrBvoU,13964
64
+werkzeug/middleware/profiler.py,sha256=QkXk7cqnaPnF8wQu-5SyPCIOT3_kdABUBorQOghVNOA,4899
65
+werkzeug/middleware/proxy_fix.py,sha256=uRgQ3dEvFV8JxUqajHYYYOPEeA_BFqaa51Yp8VW0uzA,6849
66
+werkzeug/middleware/shared_data.py,sha256=xydEqOhAGg0aQJEllPDVfz2-8jHwWvJpAxfPsfPCu7k,10960
67
+werkzeug/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
68
+werkzeug/routing.py,sha256=oqJ32sWIZtIF6zbqfrnwB1Pbv2ShNwPDJd6FYqxdYVo,84527
69
+werkzeug/sansio/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
70
+werkzeug/sansio/__pycache__/__init__.cpython-37.pyc,,
71
+werkzeug/sansio/__pycache__/multipart.cpython-37.pyc,,
72
+werkzeug/sansio/__pycache__/request.cpython-37.pyc,,
73
+werkzeug/sansio/__pycache__/response.cpython-37.pyc,,
74
+werkzeug/sansio/__pycache__/utils.cpython-37.pyc,,
75
+werkzeug/sansio/multipart.py,sha256=bJMCNC2f5xyAaylahNViJ0JqmV4ThLRbDVGVzKwcqrQ,8751
76
+werkzeug/sansio/request.py,sha256=aA9rABkWiG4MhYMByanst2NXkEclsq8SIxhb0LQf0e0,20228
77
+werkzeug/sansio/response.py,sha256=zvCq9HSBBZGBd5Gg412BY9RZIwnKsJl5Kzfd3Kl9sSo,26098
78
+werkzeug/sansio/utils.py,sha256=V5v-UUnX8pm4RehP9Tt_NiUSOJGJGUvKjlW0eOIQldM,4164
79
+werkzeug/security.py,sha256=gPDRuCjkjWrcqj99tBMq8_nHFZLFQjgoW5Ga5XIw9jo,8158
80
+werkzeug/serving.py,sha256=AfgLn0yKr9qXknmwO-0KXJ055oloS4h5DIFDHEu8iHA,38088
81
+werkzeug/test.py,sha256=8gE1l-Y9yAh2i3SI0kgpxIaI4oYZuehIkxxyDFcz6J0,48123
82
+werkzeug/testapp.py,sha256=f48prWSGJhbSrvYb8e1fnAah4BkrLb0enHSdChgsjBY,9471
83
+werkzeug/urls.py,sha256=Du2lreBHvgBh5c2_bcx72g3hzV2ZabXYZsp-picUIJs,41023
84
+werkzeug/user_agent.py,sha256=WclZhpvgLurMF45hsioSbS75H1Zb4iMQGKN3_yZ2oKo,1420
85
+werkzeug/useragents.py,sha256=G8tmv_6vxJaPrLQH3eODNgIYe0_V6KETROQlJI-WxDE,7264
86
+werkzeug/utils.py,sha256=D_dnCLUfodQ4k0GRSpnI6qDoVoaX7-Dza57bx7sabG0,37101
87
+werkzeug/wrappers/__init__.py,sha256=-s75nPbyXHzU_rwmLPDhoMuGbEUk0jZT_n0ZQAOFGf8,654
88
+werkzeug/wrappers/__pycache__/__init__.cpython-37.pyc,,
89
+werkzeug/wrappers/__pycache__/accept.cpython-37.pyc,,
90
+werkzeug/wrappers/__pycache__/auth.cpython-37.pyc,,
91
+werkzeug/wrappers/__pycache__/base_request.cpython-37.pyc,,
92
+werkzeug/wrappers/__pycache__/base_response.cpython-37.pyc,,
93
+werkzeug/wrappers/__pycache__/common_descriptors.cpython-37.pyc,,
94
+werkzeug/wrappers/__pycache__/cors.cpython-37.pyc,,
95
+werkzeug/wrappers/__pycache__/etag.cpython-37.pyc,,
96
+werkzeug/wrappers/__pycache__/json.cpython-37.pyc,,
97
+werkzeug/wrappers/__pycache__/request.cpython-37.pyc,,
98
+werkzeug/wrappers/__pycache__/response.cpython-37.pyc,,
99
+werkzeug/wrappers/__pycache__/user_agent.cpython-37.pyc,,
100
+werkzeug/wrappers/accept.py,sha256=_oZtAQkahvsrPRkNj2fieg7_St9P0NFC3SgZbJKS6xU,429
101
+werkzeug/wrappers/auth.py,sha256=rZPCzGxHk9R55PRkmS90kRywUVjjuMWzCGtH68qCq8U,856
102
+werkzeug/wrappers/base_request.py,sha256=saz9RyNQkvI_XLPYVm29KijNHmD1YzgxDqa0qHTbgss,1174
103
+werkzeug/wrappers/base_response.py,sha256=q_-TaYywT5G4zA-DWDRDJhJSat2_4O7gOPob6ye4_9A,1186
104
+werkzeug/wrappers/common_descriptors.py,sha256=v_kWLH3mvCiSRVJ1FNw7nO3w2UJfzY57UKKB5J4zCvE,898
105
+werkzeug/wrappers/cors.py,sha256=c5UndlZsZvYkbPrp6Gj5iSXxw_VOJDJHskO6-jRmNyQ,846
106
+werkzeug/wrappers/etag.py,sha256=XHWQQs7Mdd1oWezgBIsl-bYe8ydKkRZVil2Qd01D0Mo,846
107
+werkzeug/wrappers/json.py,sha256=HM1btPseGeXca0vnwQN_MvZl6h-qNsFY5YBKXKXFwus,410
108
+werkzeug/wrappers/request.py,sha256=yZGplfC3UqNuykwLJmgywiMhmnoKEGHJOZn_A_ublcQ,24822
109
+werkzeug/wrappers/response.py,sha256=0n8OcQptiM2e550SALLeg7vC1uWsUbCeE1rPZFfXR78,35177
110
+werkzeug/wrappers/user_agent.py,sha256=Wl1-A0-1r8o7cHIZQTB55O4Ged6LpCKENaQDlOY5pXA,435
111
+werkzeug/wsgi.py,sha256=L7s5-Rlt7BRVEZ1m81MaenGfMDP7yL3p1Kxt9Yssqzg,33727

+ 5
- 0
www/Files-API/.venv/lib/python3.7/site-packages/Werkzeug-2.0.2.dist-info/WHEEL View File

@@ -0,0 +1,5 @@
1
+Wheel-Version: 1.0
2
+Generator: bdist_wheel (0.37.0)
3
+Root-Is-Purelib: true
4
+Tag: py3-none-any
5
+

+ 1
- 0
www/Files-API/.venv/lib/python3.7/site-packages/Werkzeug-2.0.2.dist-info/top_level.txt View File

@@ -0,0 +1 @@
1
+werkzeug

BIN
www/Files-API/.venv/lib/python3.7/site-packages/__pycache__/easy_install.cpython-37.pyc View File


BIN
www/Files-API/.venv/lib/python3.7/site-packages/__pycache__/six.cpython-37.pyc View File


BIN
www/Files-API/.venv/lib/python3.7/site-packages/__pycache__/typing_extensions.cpython-37.pyc View File


BIN
www/Files-API/.venv/lib/python3.7/site-packages/__pycache__/zipp.cpython-37.pyc View File


+ 1
- 0
www/Files-API/.venv/lib/python3.7/site-packages/click-8.0.3.dist-info/INSTALLER View File

@@ -0,0 +1 @@
1
+pip

+ 28
- 0
www/Files-API/.venv/lib/python3.7/site-packages/click-8.0.3.dist-info/LICENSE.rst View File

@@ -0,0 +1,28 @@
1
+Copyright 2014 Pallets
2
+
3
+Redistribution and use in source and binary forms, with or without
4
+modification, are permitted provided that the following conditions are
5
+met:
6
+
7
+1.  Redistributions of source code must retain the above copyright
8
+    notice, this list of conditions and the following disclaimer.
9
+
10
+2.  Redistributions in binary form must reproduce the above copyright
11
+    notice, this list of conditions and the following disclaimer in the
12
+    documentation and/or other materials provided with the distribution.
13
+
14
+3.  Neither the name of the copyright holder nor the names of its
15
+    contributors may be used to endorse or promote products derived from
16
+    this software without specific prior written permission.
17
+
18
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
21
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
24
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 111
- 0
www/Files-API/.venv/lib/python3.7/site-packages/click-8.0.3.dist-info/METADATA View File

@@ -0,0 +1,111 @@
1
+Metadata-Version: 2.1
2
+Name: click
3
+Version: 8.0.3
4
+Summary: Composable command line interface toolkit
5
+Home-page: https://palletsprojects.com/p/click/
6
+Author: Armin Ronacher
7
+Author-email: armin.ronacher@active-4.com
8
+Maintainer: Pallets
9
+Maintainer-email: contact@palletsprojects.com
10
+License: BSD-3-Clause
11
+Project-URL: Donate, https://palletsprojects.com/donate
12
+Project-URL: Documentation, https://click.palletsprojects.com/
13
+Project-URL: Changes, https://click.palletsprojects.com/changes/
14
+Project-URL: Source Code, https://github.com/pallets/click/
15
+Project-URL: Issue Tracker, https://github.com/pallets/click/issues/
16
+Project-URL: Twitter, https://twitter.com/PalletsTeam
17
+Project-URL: Chat, https://discord.gg/pallets
18
+Platform: UNKNOWN
19
+Classifier: Development Status :: 5 - Production/Stable
20
+Classifier: Intended Audience :: Developers
21
+Classifier: License :: OSI Approved :: BSD License
22
+Classifier: Operating System :: OS Independent
23
+Classifier: Programming Language :: Python
24
+Requires-Python: >=3.6
25
+Description-Content-Type: text/x-rst
26
+License-File: LICENSE.rst
27
+Requires-Dist: colorama ; platform_system == "Windows"
28
+Requires-Dist: importlib-metadata ; python_version < "3.8"
29
+
30
+\$ click\_
31
+==========
32
+
33
+Click is a Python package for creating beautiful command line interfaces
34
+in a composable way with as little code as necessary. It's the "Command
35
+Line Interface Creation Kit". It's highly configurable but comes with
36
+sensible defaults out of the box.
37
+
38
+It aims to make the process of writing command line tools quick and fun
39
+while also preventing any frustration caused by the inability to
40
+implement an intended CLI API.
41
+
42
+Click in three points:
43
+
44
+-   Arbitrary nesting of commands
45
+-   Automatic help page generation
46
+-   Supports lazy loading of subcommands at runtime
47
+
48
+
49
+Installing
50
+----------
51
+
52
+Install and update using `pip`_:
53
+
54
+.. code-block:: text
55
+
56
+    $ pip install -U click
57
+
58
+.. _pip: https://pip.pypa.io/en/stable/getting-started/
59
+
60
+
61
+A Simple Example
62
+----------------
63
+
64
+.. code-block:: python
65
+
66
+    import click
67
+
68
+    @click.command()
69
+    @click.option("--count", default=1, help="Number of greetings.")
70
+    @click.option("--name", prompt="Your name", help="The person to greet.")
71
+    def hello(count, name):
72
+        """Simple program that greets NAME for a total of COUNT times."""
73
+        for _ in range(count):
74
+            click.echo(f"Hello, {name}!")
75
+
76
+    if __name__ == '__main__':
77
+        hello()
78
+
79
+.. code-block:: text
80
+
81
+    $ python hello.py --count=3
82
+    Your name: Click
83
+    Hello, Click!
84
+    Hello, Click!
85
+    Hello, Click!
86
+
87
+
88
+Donate
89
+------
90
+
91
+The Pallets organization develops and supports Click and other popular
92
+packages. In order to grow the community of contributors and users, and
93
+allow the maintainers to devote more time to the projects, `please
94
+donate today`_.
95
+
96
+.. _please donate today: https://palletsprojects.com/donate
97
+
98
+
99
+Links
100
+-----
101
+
102
+-   Documentation: https://click.palletsprojects.com/
103
+-   Changes: https://click.palletsprojects.com/changes/
104
+-   PyPI Releases: https://pypi.org/project/click/
105
+-   Source Code: https://github.com/pallets/click
106
+-   Issue Tracker: https://github.com/pallets/click/issues
107
+-   Website: https://palletsprojects.com/p/click
108
+-   Twitter: https://twitter.com/PalletsTeam
109
+-   Chat: https://discord.gg/pallets
110
+
111
+

+ 41
- 0
www/Files-API/.venv/lib/python3.7/site-packages/click-8.0.3.dist-info/RECORD View File

@@ -0,0 +1,41 @@
1
+click-8.0.3.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
2
+click-8.0.3.dist-info/LICENSE.rst,sha256=morRBqOU6FO_4h9C9OctWSgZoigF2ZG18ydQKSkrZY0,1475
3
+click-8.0.3.dist-info/METADATA,sha256=_0jCOf3DdGPvKUZUlBukeb1t6Pnxmm_OMGpaBoDthfc,3247
4
+click-8.0.3.dist-info/RECORD,,
5
+click-8.0.3.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
6
+click-8.0.3.dist-info/top_level.txt,sha256=J1ZQogalYS4pphY_lPECoNMfw0HzTSrZglC4Yfwo4xA,6
7
+click/__init__.py,sha256=YkIrDg7-0g5aBS6D2pDe58j3MOaFylHED2_8OXh2fnM,3243
8
+click/__pycache__/__init__.cpython-37.pyc,,
9
+click/__pycache__/_compat.cpython-37.pyc,,
10
+click/__pycache__/_termui_impl.cpython-37.pyc,,
11
+click/__pycache__/_textwrap.cpython-37.pyc,,
12
+click/__pycache__/_unicodefun.cpython-37.pyc,,
13
+click/__pycache__/_winconsole.cpython-37.pyc,,
14
+click/__pycache__/core.cpython-37.pyc,,
15
+click/__pycache__/decorators.cpython-37.pyc,,
16
+click/__pycache__/exceptions.cpython-37.pyc,,
17
+click/__pycache__/formatting.cpython-37.pyc,,
18
+click/__pycache__/globals.cpython-37.pyc,,
19
+click/__pycache__/parser.cpython-37.pyc,,
20
+click/__pycache__/shell_completion.cpython-37.pyc,,
21
+click/__pycache__/termui.cpython-37.pyc,,
22
+click/__pycache__/testing.cpython-37.pyc,,
23
+click/__pycache__/types.cpython-37.pyc,,
24
+click/__pycache__/utils.cpython-37.pyc,,
25
+click/_compat.py,sha256=P15KQumAZC2F2MFe_JSRbvVOJcNosQfMDrdZq0ReCLM,18814
26
+click/_termui_impl.py,sha256=z78J5HF_RTsOBhjNLjoigaqRap3P2pWwEDDAjoZzgUg,23452
27
+click/_textwrap.py,sha256=10fQ64OcBUMuK7mFvh8363_uoOxPlRItZBmKzRJDgoY,1353
28
+click/_unicodefun.py,sha256=JKSh1oSwG_zbjAu4TBCa9tQde2P9FiYcf4MBfy5NdT8,3201
29
+click/_winconsole.py,sha256=5ju3jQkcZD0W27WEMGqmEP4y_crUVzPCqsX_FYb7BO0,7860
30
+click/core.py,sha256=k4PA2z0BT_dmed9I52Q2VLi8r6ekTMCtCQzw2y915Xs,111478
31
+click/decorators.py,sha256=sGkXJGmP7eLtjtmPl_Un2uBTlrhK8s2L22n-yBiDwTw,14864
32
+click/exceptions.py,sha256=7gDaLGuFZBeCNwY9ERMsF2-Z3R9Fvq09Zc6IZSKjseo,9167
33
+click/formatting.py,sha256=Frf0-5W33-loyY_i9qrwXR8-STnW3m5gvyxLVUdyxyk,9706
34
+click/globals.py,sha256=kGPzxq55Ug4dFUrgRV-5oHVPOPdLCUhmYolbrrVBo8g,1985
35
+click/parser.py,sha256=cAEt1uQR8gq3-S9ysqbVU-fdAZNvilxw4ReJ_T1OQMk,19044
36
+click/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
+click/shell_completion.py,sha256=_hPI12T9Ex-y5a3WunWnlH0Gca2_urzXFXkDnt7G6Ow,18001
38
+click/termui.py,sha256=Rp2gFE8x7j8sEIoFMOcPmuqxJQVWWTrwEzyC14-sPAw,29006
39
+click/testing.py,sha256=kLR5Qcny1OlgxaGB3gweTr0gQe1yVlmgQRn2esA2Fz4,16020
40
+click/types.py,sha256=VoNZnIlRBAtRRgzavdqVnyfzY5y4U4qzVGI1UvvX1ls,35391
41
+click/utils.py,sha256=avYwX-3l2KkdJNUo8NmncZSoAdEmniQ_M5sdsSYloJ4,18759

+ 5
- 0
www/Files-API/.venv/lib/python3.7/site-packages/click-8.0.3.dist-info/WHEEL View File

@@ -0,0 +1,5 @@
1
+Wheel-Version: 1.0
2
+Generator: bdist_wheel (0.37.0)
3
+Root-Is-Purelib: true
4
+Tag: py3-none-any
5
+

+ 1
- 0
www/Files-API/.venv/lib/python3.7/site-packages/click-8.0.3.dist-info/top_level.txt View File

@@ -0,0 +1 @@
1
+click

+ 75
- 0
www/Files-API/.venv/lib/python3.7/site-packages/click/__init__.py View File

@@ -0,0 +1,75 @@
1
+"""
2
+Click is a simple Python module inspired by the stdlib optparse to make
3
+writing command line scripts fun. Unlike other modules, it's based
4
+around a simple API that does not come with too much magic and is
5
+composable.
6
+"""
7
+from .core import Argument as Argument
8
+from .core import BaseCommand as BaseCommand
9
+from .core import Command as Command
10
+from .core import CommandCollection as CommandCollection
11
+from .core import Context as Context
12
+from .core import Group as Group
13
+from .core import MultiCommand as MultiCommand
14
+from .core import Option as Option
15
+from .core import Parameter as Parameter
16
+from .decorators import argument as argument
17
+from .decorators import command as command
18
+from .decorators import confirmation_option as confirmation_option
19
+from .decorators import group as group
20
+from .decorators import help_option as help_option
21
+from .decorators import make_pass_decorator as make_pass_decorator
22
+from .decorators import option as option
23
+from .decorators import pass_context as pass_context
24
+from .decorators import pass_obj as pass_obj
25
+from .decorators import password_option as password_option
26
+from .decorators import version_option as version_option
27
+from .exceptions import Abort as Abort
28
+from .exceptions import BadArgumentUsage as BadArgumentUsage
29
+from .exceptions import BadOptionUsage as BadOptionUsage
30
+from .exceptions import BadParameter as BadParameter
31
+from .exceptions import ClickException as ClickException
32
+from .exceptions import FileError as FileError
33
+from .exceptions import MissingParameter as MissingParameter
34
+from .exceptions import NoSuchOption as NoSuchOption
35
+from .exceptions import UsageError as UsageError
36
+from .formatting import HelpFormatter as HelpFormatter
37
+from .formatting import wrap_text as wrap_text
38
+from .globals import get_current_context as get_current_context
39
+from .parser import OptionParser as OptionParser
40
+from .termui import clear as clear
41
+from .termui import confirm as confirm
42
+from .termui import echo_via_pager as echo_via_pager
43
+from .termui import edit as edit
44
+from .termui import get_terminal_size as get_terminal_size
45
+from .termui import getchar as getchar
46
+from .termui import launch as launch
47
+from .termui import pause as pause
48
+from .termui import progressbar as progressbar
49
+from .termui import prompt as prompt
50
+from .termui import secho as secho
51
+from .termui import style as style
52
+from .termui import unstyle as unstyle
53
+from .types import BOOL as BOOL
54
+from .types import Choice as Choice
55
+from .types import DateTime as DateTime
56
+from .types import File as File
57
+from .types import FLOAT as FLOAT
58
+from .types import FloatRange as FloatRange
59
+from .types import INT as INT
60
+from .types import IntRange as IntRange
61
+from .types import ParamType as ParamType
62
+from .types import Path as Path
63
+from .types import STRING as STRING
64
+from .types import Tuple as Tuple
65
+from .types import UNPROCESSED as UNPROCESSED
66
+from .types import UUID as UUID
67
+from .utils import echo as echo
68
+from .utils import format_filename as format_filename
69
+from .utils import get_app_dir as get_app_dir
70
+from .utils import get_binary_stream as get_binary_stream
71
+from .utils import get_os_args as get_os_args
72
+from .utils import get_text_stream as get_text_stream
73
+from .utils import open_file as open_file
74
+
75
+__version__ = "8.0.3"

BIN
www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/__init__.cpython-37.pyc View File


BIN
www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/_compat.cpython-37.pyc View File


BIN
www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/_termui_impl.cpython-37.pyc View File


BIN
www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/_textwrap.cpython-37.pyc View File


BIN
www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/_unicodefun.cpython-37.pyc View File


BIN
www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/_winconsole.cpython-37.pyc View File


BIN
www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/core.cpython-37.pyc View File


BIN
www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/decorators.cpython-37.pyc View File


BIN
www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/exceptions.cpython-37.pyc View File


BIN
www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/formatting.cpython-37.pyc View File


BIN
www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/globals.cpython-37.pyc View File


BIN
www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/parser.cpython-37.pyc View File


BIN
www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/shell_completion.cpython-37.pyc View File


BIN
www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/termui.cpython-37.pyc View File


BIN
www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/testing.cpython-37.pyc View File


BIN
www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/types.cpython-37.pyc View File


BIN
www/Files-API/.venv/lib/python3.7/site-packages/click/__pycache__/utils.cpython-37.pyc View File


+ 627
- 0
www/Files-API/.venv/lib/python3.7/site-packages/click/_compat.py View File

@@ -0,0 +1,627 @@
1
+import codecs
2
+import io
3
+import os
4
+import re
5
+import sys
6
+import typing as t
7
+from weakref import WeakKeyDictionary
8
+
9
+CYGWIN = sys.platform.startswith("cygwin")
10
+MSYS2 = sys.platform.startswith("win") and ("GCC" in sys.version)
11
+# Determine local App Engine environment, per Google's own suggestion
12
+APP_ENGINE = "APPENGINE_RUNTIME" in os.environ and "Development/" in os.environ.get(
13
+    "SERVER_SOFTWARE", ""
14
+)
15
+WIN = sys.platform.startswith("win") and not APP_ENGINE and not MSYS2
16
+auto_wrap_for_ansi: t.Optional[t.Callable[[t.TextIO], t.TextIO]] = None
17
+_ansi_re = re.compile(r"\033\[[;?0-9]*[a-zA-Z]")
18
+
19
+
20
+def get_filesystem_encoding() -> str:
21
+    return sys.getfilesystemencoding() or sys.getdefaultencoding()
22
+
23
+
24
+def _make_text_stream(
25
+    stream: t.BinaryIO,
26
+    encoding: t.Optional[str],
27
+    errors: t.Optional[str],
28
+    force_readable: bool = False,
29
+    force_writable: bool = False,
30
+) -> t.TextIO:
31
+    if encoding is None:
32
+        encoding = get_best_encoding(stream)
33
+    if errors is None:
34
+        errors = "replace"
35
+    return _NonClosingTextIOWrapper(
36
+        stream,
37
+        encoding,
38
+        errors,
39
+        line_buffering=True,
40
+        force_readable=force_readable,
41
+        force_writable=force_writable,
42
+    )
43
+
44
+
45
+def is_ascii_encoding(encoding: str) -> bool:
46
+    """Checks if a given encoding is ascii."""
47
+    try:
48
+        return codecs.lookup(encoding).name == "ascii"
49
+    except LookupError:
50
+        return False
51
+
52
+
53
+def get_best_encoding(stream: t.IO) -> str:
54
+    """Returns the default stream encoding if not found."""
55
+    rv = getattr(stream, "encoding", None) or sys.getdefaultencoding()
56
+    if is_ascii_encoding(rv):
57
+        return "utf-8"
58
+    return rv
59
+
60
+
61
+class _NonClosingTextIOWrapper(io.TextIOWrapper):
62
+    def __init__(
63
+        self,
64
+        stream: t.BinaryIO,
65
+        encoding: t.Optional[str],
66
+        errors: t.Optional[str],
67
+        force_readable: bool = False,
68
+        force_writable: bool = False,
69
+        **extra: t.Any,
70
+    ) -> None:
71
+        self._stream = stream = t.cast(
72
+            t.BinaryIO, _FixupStream(stream, force_readable, force_writable)
73
+        )
74
+        super().__init__(stream, encoding, errors, **extra)
75
+
76
+    def __del__(self) -> None:
77
+        try:
78
+            self.detach()
79
+        except Exception:
80
+            pass
81
+
82
+    def isatty(self) -> bool:
83
+        # https://bitbucket.org/pypy/pypy/issue/1803
84
+        return self._stream.isatty()
85
+
86
+
87
+class _FixupStream:
88
+    """The new io interface needs more from streams than streams
89
+    traditionally implement.  As such, this fix-up code is necessary in
90
+    some circumstances.
91
+
92
+    The forcing of readable and writable flags are there because some tools
93
+    put badly patched objects on sys (one such offender are certain version
94
+    of jupyter notebook).
95
+    """
96
+
97
+    def __init__(
98
+        self,
99
+        stream: t.BinaryIO,
100
+        force_readable: bool = False,
101
+        force_writable: bool = False,
102
+    ):
103
+        self._stream = stream
104
+        self._force_readable = force_readable
105
+        self._force_writable = force_writable
106
+
107
+    def __getattr__(self, name: str) -> t.Any:
108
+        return getattr(self._stream, name)
109
+
110
+    def read1(self, size: int) -> bytes:
111
+        f = getattr(self._stream, "read1", None)
112
+
113
+        if f is not None:
114
+            return t.cast(bytes, f(size))
115
+
116
+        return self._stream.read(size)
117
+
118
+    def readable(self) -> bool:
119
+        if self._force_readable:
120
+            return True
121
+        x = getattr(self._stream, "readable", None)
122
+        if x is not None:
123
+            return t.cast(bool, x())
124
+        try:
125
+            self._stream.read(0)
126
+        except Exception:
127
+            return False
128
+        return True
129
+
130
+    def writable(self) -> bool:
131
+        if self._force_writable:
132
+            return True
133
+        x = getattr(self._stream, "writable", None)
134
+        if x is not None:
135
+            return t.cast(bool, x())
136
+        try:
137
+            self._stream.write("")  # type: ignore
138
+        except Exception:
139
+            try:
140
+                self._stream.write(b"")
141
+            except Exception:
142
+                return False
143
+        return True
144
+
145
+    def seekable(self) -> bool:
146
+        x = getattr(self._stream, "seekable", None)
147
+        if x is not None:
148
+            return t.cast(bool, x())
149
+        try:
150
+            self._stream.seek(self._stream.tell())
151
+        except Exception:
152
+            return False
153
+        return True
154
+
155
+
156
+def _is_binary_reader(stream: t.IO, default: bool = False) -> bool:
157
+    try:
158
+        return isinstance(stream.read(0), bytes)
159
+    except Exception:
160
+        return default
161
+        # This happens in some cases where the stream was already
162
+        # closed.  In this case, we assume the default.
163
+
164
+
165
+def _is_binary_writer(stream: t.IO, default: bool = False) -> bool:
166
+    try:
167
+        stream.write(b"")
168
+    except Exception:
169
+        try:
170
+            stream.write("")
171
+            return False
172
+        except Exception:
173
+            pass
174
+        return default
175
+    return True
176
+
177
+
178
+def _find_binary_reader(stream: t.IO) -> t.Optional[t.BinaryIO]:
179
+    # We need to figure out if the given stream is already binary.
180
+    # This can happen because the official docs recommend detaching
181
+    # the streams to get binary streams.  Some code might do this, so
182
+    # we need to deal with this case explicitly.
183
+    if _is_binary_reader(stream, False):
184
+        return t.cast(t.BinaryIO, stream)
185
+
186
+    buf = getattr(stream, "buffer", None)
187
+
188
+    # Same situation here; this time we assume that the buffer is
189
+    # actually binary in case it's closed.
190
+    if buf is not None and _is_binary_reader(buf, True):
191
+        return t.cast(t.BinaryIO, buf)
192
+
193
+    return None
194
+
195
+
196
+def _find_binary_writer(stream: t.IO) -> t.Optional[t.BinaryIO]:
197
+    # We need to figure out if the given stream is already binary.
198
+    # This can happen because the official docs recommend detaching
199
+    # the streams to get binary streams.  Some code might do this, so
200
+    # we need to deal with this case explicitly.
201
+    if _is_binary_writer(stream, False):
202
+        return t.cast(t.BinaryIO, stream)
203
+
204
+    buf = getattr(stream, "buffer", None)
205
+
206
+    # Same situation here; this time we assume that the buffer is
207
+    # actually binary in case it's closed.
208
+    if buf is not None and _is_binary_writer(buf, True):
209
+        return t.cast(t.BinaryIO, buf)
210
+
211
+    return None
212
+
213
+
214
+def _stream_is_misconfigured(stream: t.TextIO) -> bool:
215
+    """A stream is misconfigured if its encoding is ASCII."""
216
+    # If the stream does not have an encoding set, we assume it's set
217
+    # to ASCII.  This appears to happen in certain unittest
218
+    # environments.  It's not quite clear what the correct behavior is
219
+    # but this at least will force Click to recover somehow.
220
+    return is_ascii_encoding(getattr(stream, "encoding", None) or "ascii")
221
+
222
+
223
+def _is_compat_stream_attr(stream: t.TextIO, attr: str, value: t.Optional[str]) -> bool:
224
+    """A stream attribute is compatible if it is equal to the
225
+    desired value or the desired value is unset and the attribute
226
+    has a value.
227
+    """
228
+    stream_value = getattr(stream, attr, None)
229
+    return stream_value == value or (value is None and stream_value is not None)
230
+
231
+
232
+def _is_compatible_text_stream(
233
+    stream: t.TextIO, encoding: t.Optional[str], errors: t.Optional[str]
234
+) -> bool:
235
+    """Check if a stream's encoding and errors attributes are
236
+    compatible with the desired values.
237
+    """
238
+    return _is_compat_stream_attr(
239
+        stream, "encoding", encoding
240
+    ) and _is_compat_stream_attr(stream, "errors", errors)
241
+
242
+
243
+def _force_correct_text_stream(
244
+    text_stream: t.IO,
245
+    encoding: t.Optional[str],
246
+    errors: t.Optional[str],
247
+    is_binary: t.Callable[[t.IO, bool], bool],
248
+    find_binary: t.Callable[[t.IO], t.Optional[t.BinaryIO]],
249
+    force_readable: bool = False,
250
+    force_writable: bool = False,
251
+) -> t.TextIO:
252
+    if is_binary(text_stream, False):
253
+        binary_reader = t.cast(t.BinaryIO, text_stream)
254
+    else:
255
+        text_stream = t.cast(t.TextIO, text_stream)
256
+        # If the stream looks compatible, and won't default to a
257
+        # misconfigured ascii encoding, return it as-is.
258
+        if _is_compatible_text_stream(text_stream, encoding, errors) and not (
259
+            encoding is None and _stream_is_misconfigured(text_stream)
260
+        ):
261
+            return text_stream
262
+
263
+        # Otherwise, get the underlying binary reader.
264
+        possible_binary_reader = find_binary(text_stream)
265
+
266
+        # If that's not possible, silently use the original reader
267
+        # and get mojibake instead of exceptions.
268
+        if possible_binary_reader is None:
269
+            return text_stream
270
+
271
+        binary_reader = possible_binary_reader
272
+
273
+    # Default errors to replace instead of strict in order to get
274
+    # something that works.
275
+    if errors is None:
276
+        errors = "replace"
277
+
278
+    # Wrap the binary stream in a text stream with the correct
279
+    # encoding parameters.
280
+    return _make_text_stream(
281
+        binary_reader,
282
+        encoding,
283
+        errors,
284
+        force_readable=force_readable,
285
+        force_writable=force_writable,
286
+    )
287
+
288
+
289
+def _force_correct_text_reader(
290
+    text_reader: t.IO,
291
+    encoding: t.Optional[str],
292
+    errors: t.Optional[str],
293
+    force_readable: bool = False,
294
+) -> t.TextIO:
295
+    return _force_correct_text_stream(
296
+        text_reader,
297
+        encoding,
298
+        errors,
299
+        _is_binary_reader,
300
+        _find_binary_reader,
301
+        force_readable=force_readable,
302
+    )
303
+
304
+
305
+def _force_correct_text_writer(
306
+    text_writer: t.IO,
307
+    encoding: t.Optional[str],
308
+    errors: t.Optional[str],
309
+    force_writable: bool = False,
310
+) -> t.TextIO:
311
+    return _force_correct_text_stream(
312
+        text_writer,
313
+        encoding,
314
+        errors,
315
+        _is_binary_writer,
316
+        _find_binary_writer,
317
+        force_writable=force_writable,
318
+    )
319
+
320
+
321
+def get_binary_stdin() -> t.BinaryIO:
322
+    reader = _find_binary_reader(sys.stdin)
323
+    if reader is None:
324
+        raise RuntimeError("Was not able to determine binary stream for sys.stdin.")
325
+    return reader
326
+
327
+
328
+def get_binary_stdout() -> t.BinaryIO:
329
+    writer = _find_binary_writer(sys.stdout)
330
+    if writer is None:
331
+        raise RuntimeError("Was not able to determine binary stream for sys.stdout.")
332
+    return writer
333
+
334
+
335
+def get_binary_stderr() -> t.BinaryIO:
336
+    writer = _find_binary_writer(sys.stderr)
337
+    if writer is None:
338
+        raise RuntimeError("Was not able to determine binary stream for sys.stderr.")
339
+    return writer
340
+
341
+
342
+def get_text_stdin(
343
+    encoding: t.Optional[str] = None, errors: t.Optional[str] = None
344
+) -> t.TextIO:
345
+    rv = _get_windows_console_stream(sys.stdin, encoding, errors)
346
+    if rv is not None:
347
+        return rv
348
+    return _force_correct_text_reader(sys.stdin, encoding, errors, force_readable=True)
349
+
350
+
351
+def get_text_stdout(
352
+    encoding: t.Optional[str] = None, errors: t.Optional[str] = None
353
+) -> t.TextIO:
354
+    rv = _get_windows_console_stream(sys.stdout, encoding, errors)
355
+    if rv is not None:
356
+        return rv
357
+    return _force_correct_text_writer(sys.stdout, encoding, errors, force_writable=True)
358
+
359
+
360
+def get_text_stderr(
361
+    encoding: t.Optional[str] = None, errors: t.Optional[str] = None
362
+) -> t.TextIO:
363
+    rv = _get_windows_console_stream(sys.stderr, encoding, errors)
364
+    if rv is not None:
365
+        return rv
366
+    return _force_correct_text_writer(sys.stderr, encoding, errors, force_writable=True)
367
+
368
+
369
+def _wrap_io_open(
370
+    file: t.Union[str, os.PathLike, int],
371
+    mode: str,
372
+    encoding: t.Optional[str],
373
+    errors: t.Optional[str],
374
+) -> t.IO:
375
+    """Handles not passing ``encoding`` and ``errors`` in binary mode."""
376
+    if "b" in mode:
377
+        return open(file, mode)
378
+
379
+    return open(file, mode, encoding=encoding, errors=errors)
380
+
381
+
382
+def open_stream(
383
+    filename: str,
384
+    mode: str = "r",
385
+    encoding: t.Optional[str] = None,
386
+    errors: t.Optional[str] = "strict",
387
+    atomic: bool = False,
388
+) -> t.Tuple[t.IO, bool]:
389
+    binary = "b" in mode
390
+
391
+    # Standard streams first.  These are simple because they don't need
392
+    # special handling for the atomic flag.  It's entirely ignored.
393
+    if filename == "-":
394
+        if any(m in mode for m in ["w", "a", "x"]):
395
+            if binary:
396
+                return get_binary_stdout(), False
397
+            return get_text_stdout(encoding=encoding, errors=errors), False
398
+        if binary:
399
+            return get_binary_stdin(), False
400
+        return get_text_stdin(encoding=encoding, errors=errors), False
401
+
402
+    # Non-atomic writes directly go out through the regular open functions.
403
+    if not atomic:
404
+        return _wrap_io_open(filename, mode, encoding, errors), True
405
+
406
+    # Some usability stuff for atomic writes
407
+    if "a" in mode:
408
+        raise ValueError(
409
+            "Appending to an existing file is not supported, because that"
410
+            " would involve an expensive `copy`-operation to a temporary"
411
+            " file. Open the file in normal `w`-mode and copy explicitly"
412
+            " if that's what you're after."
413
+        )
414
+    if "x" in mode:
415
+        raise ValueError("Use the `overwrite`-parameter instead.")
416
+    if "w" not in mode:
417
+        raise ValueError("Atomic writes only make sense with `w`-mode.")
418
+
419
+    # Atomic writes are more complicated.  They work by opening a file
420
+    # as a proxy in the same folder and then using the fdopen
421
+    # functionality to wrap it in a Python file.  Then we wrap it in an
422
+    # atomic file that moves the file over on close.
423
+    import errno
424
+    import random
425
+
426
+    try:
427
+        perm: t.Optional[int] = os.stat(filename).st_mode
428
+    except OSError:
429
+        perm = None
430
+
431
+    flags = os.O_RDWR | os.O_CREAT | os.O_EXCL
432
+
433
+    if binary:
434
+        flags |= getattr(os, "O_BINARY", 0)
435
+
436
+    while True:
437
+        tmp_filename = os.path.join(
438
+            os.path.dirname(filename),
439
+            f".__atomic-write{random.randrange(1 << 32):08x}",
440
+        )
441
+        try:
442
+            fd = os.open(tmp_filename, flags, 0o666 if perm is None else perm)
443
+            break
444
+        except OSError as e:
445
+            if e.errno == errno.EEXIST or (
446
+                os.name == "nt"
447
+                and e.errno == errno.EACCES
448
+                and os.path.isdir(e.filename)
449
+                and os.access(e.filename, os.W_OK)
450
+            ):
451
+                continue
452
+            raise
453
+
454
+    if perm is not None:
455
+        os.chmod(tmp_filename, perm)  # in case perm includes bits in umask
456
+
457
+    f = _wrap_io_open(fd, mode, encoding, errors)
458
+    af = _AtomicFile(f, tmp_filename, os.path.realpath(filename))
459
+    return t.cast(t.IO, af), True
460
+
461
+
462
+class _AtomicFile:
463
+    def __init__(self, f: t.IO, tmp_filename: str, real_filename: str) -> None:
464
+        self._f = f
465
+        self._tmp_filename = tmp_filename
466
+        self._real_filename = real_filename
467
+        self.closed = False
468
+
469
+    @property
470
+    def name(self) -> str:
471
+        return self._real_filename
472
+
473
+    def close(self, delete: bool = False) -> None:
474
+        if self.closed:
475
+            return
476
+        self._f.close()
477
+        os.replace(self._tmp_filename, self._real_filename)
478
+        self.closed = True
479
+
480
+    def __getattr__(self, name: str) -> t.Any:
481
+        return getattr(self._f, name)
482
+
483
+    def __enter__(self) -> "_AtomicFile":
484
+        return self
485
+
486
+    def __exit__(self, exc_type, exc_value, tb):  # type: ignore
487
+        self.close(delete=exc_type is not None)
488
+
489
+    def __repr__(self) -> str:
490
+        return repr(self._f)
491
+
492
+
493
+def strip_ansi(value: str) -> str:
494
+    return _ansi_re.sub("", value)
495
+
496
+
497
+def _is_jupyter_kernel_output(stream: t.IO) -> bool:
498
+    while isinstance(stream, (_FixupStream, _NonClosingTextIOWrapper)):
499
+        stream = stream._stream
500
+
501
+    return stream.__class__.__module__.startswith("ipykernel.")
502
+
503
+
504
+def should_strip_ansi(
505
+    stream: t.Optional[t.IO] = None, color: t.Optional[bool] = None
506
+) -> bool:
507
+    if color is None:
508
+        if stream is None:
509
+            stream = sys.stdin
510
+        return not isatty(stream) and not _is_jupyter_kernel_output(stream)
511
+    return not color
512
+
513
+
514
+# On Windows, wrap the output streams with colorama to support ANSI
515
+# color codes.
516
+# NOTE: double check is needed so mypy does not analyze this on Linux
517
+if sys.platform.startswith("win") and WIN:
518
+    from ._winconsole import _get_windows_console_stream
519
+
520
+    def _get_argv_encoding() -> str:
521
+        import locale
522
+
523
+        return locale.getpreferredencoding()
524
+
525
+    _ansi_stream_wrappers: t.MutableMapping[t.TextIO, t.TextIO] = WeakKeyDictionary()
526
+
527
+    def auto_wrap_for_ansi(
528
+        stream: t.TextIO, color: t.Optional[bool] = None
529
+    ) -> t.TextIO:
530
+        """Support ANSI color and style codes on Windows by wrapping a
531
+        stream with colorama.
532
+        """
533
+        try:
534
+            cached = _ansi_stream_wrappers.get(stream)
535
+        except Exception:
536
+            cached = None
537
+
538
+        if cached is not None:
539
+            return cached
540
+
541
+        import colorama
542
+
543
+        strip = should_strip_ansi(stream, color)
544
+        ansi_wrapper = colorama.AnsiToWin32(stream, strip=strip)
545
+        rv = t.cast(t.TextIO, ansi_wrapper.stream)
546
+        _write = rv.write
547
+
548
+        def _safe_write(s):
549
+            try:
550
+                return _write(s)
551
+            except BaseException:
552
+                ansi_wrapper.reset_all()
553
+                raise
554
+
555
+        rv.write = _safe_write
556
+
557
+        try:
558
+            _ansi_stream_wrappers[stream] = rv
559
+        except Exception:
560
+            pass
561
+
562
+        return rv
563
+
564
+
565
+else:
566
+
567
+    def _get_argv_encoding() -> str:
568
+        return getattr(sys.stdin, "encoding", None) or get_filesystem_encoding()
569
+
570
+    def _get_windows_console_stream(
571
+        f: t.TextIO, encoding: t.Optional[str], errors: t.Optional[str]
572
+    ) -> t.Optional[t.TextIO]:
573
+        return None
574
+
575
+
576
+def term_len(x: str) -> int:
577
+    return len(strip_ansi(x))
578
+
579
+
580
+def isatty(stream: t.IO) -> bool:
581
+    try:
582
+        return stream.isatty()
583
+    except Exception:
584
+        return False
585
+
586
+
587
+def _make_cached_stream_func(
588
+    src_func: t.Callable[[], t.TextIO], wrapper_func: t.Callable[[], t.TextIO]
589
+) -> t.Callable[[], t.TextIO]:
590
+    cache: t.MutableMapping[t.TextIO, t.TextIO] = WeakKeyDictionary()
591
+
592
+    def func() -> t.TextIO:
593
+        stream = src_func()
594
+        try:
595
+            rv = cache.get(stream)
596
+        except Exception:
597
+            rv = None
598
+        if rv is not None:
599
+            return rv
600
+        rv = wrapper_func()
601
+        try:
602
+            cache[stream] = rv
603
+        except Exception:
604
+            pass
605
+        return rv
606
+
607
+    return func
608
+
609
+
610
+_default_text_stdin = _make_cached_stream_func(lambda: sys.stdin, get_text_stdin)
611
+_default_text_stdout = _make_cached_stream_func(lambda: sys.stdout, get_text_stdout)
612
+_default_text_stderr = _make_cached_stream_func(lambda: sys.stderr, get_text_stderr)
613
+
614
+
615
+binary_streams: t.Mapping[str, t.Callable[[], t.BinaryIO]] = {
616
+    "stdin": get_binary_stdin,
617
+    "stdout": get_binary_stdout,
618
+    "stderr": get_binary_stderr,
619
+}
620
+
621
+text_streams: t.Mapping[
622
+    str, t.Callable[[t.Optional[str], t.Optional[str]], t.TextIO]
623
+] = {
624
+    "stdin": get_text_stdin,
625
+    "stdout": get_text_stdout,
626
+    "stderr": get_text_stderr,
627
+}

+ 718
- 0
www/Files-API/.venv/lib/python3.7/site-packages/click/_termui_impl.py View File

@@ -0,0 +1,718 @@
1
+"""
2
+This module contains implementations for the termui module. To keep the
3
+import time of Click down, some infrequently used functionality is
4
+placed in this module and only imported as needed.
5
+"""
6
+import contextlib
7
+import math
8
+import os
9
+import sys
10
+import time
11
+import typing as t
12
+from gettext import gettext as _
13
+
14
+from ._compat import _default_text_stdout
15
+from ._compat import CYGWIN
16
+from ._compat import get_best_encoding
17
+from ._compat import isatty
18
+from ._compat import open_stream
19
+from ._compat import strip_ansi
20
+from ._compat import term_len
21
+from ._compat import WIN
22
+from .exceptions import ClickException
23
+from .utils import echo
24
+
25
+V = t.TypeVar("V")
26
+
27
+if os.name == "nt":
28
+    BEFORE_BAR = "\r"
29
+    AFTER_BAR = "\n"
30
+else:
31
+    BEFORE_BAR = "\r\033[?25l"
32
+    AFTER_BAR = "\033[?25h\n"
33
+
34
+
35
+class ProgressBar(t.Generic[V]):
36
+    def __init__(
37
+        self,
38
+        iterable: t.Optional[t.Iterable[V]],
39
+        length: t.Optional[int] = None,
40
+        fill_char: str = "#",
41
+        empty_char: str = " ",
42
+        bar_template: str = "%(bar)s",
43
+        info_sep: str = "  ",
44
+        show_eta: bool = True,
45
+        show_percent: t.Optional[bool] = None,
46
+        show_pos: bool = False,
47
+        item_show_func: t.Optional[t.Callable[[t.Optional[V]], t.Optional[str]]] = None,
48
+        label: t.Optional[str] = None,
49
+        file: t.Optional[t.TextIO] = None,
50
+        color: t.Optional[bool] = None,
51
+        update_min_steps: int = 1,
52
+        width: int = 30,
53
+    ) -> None:
54
+        self.fill_char = fill_char
55
+        self.empty_char = empty_char
56
+        self.bar_template = bar_template
57
+        self.info_sep = info_sep
58
+        self.show_eta = show_eta
59
+        self.show_percent = show_percent
60
+        self.show_pos = show_pos
61
+        self.item_show_func = item_show_func
62
+        self.label = label or ""
63
+        if file is None:
64
+            file = _default_text_stdout()
65
+        self.file = file
66
+        self.color = color
67
+        self.update_min_steps = update_min_steps
68
+        self._completed_intervals = 0
69
+        self.width = width
70
+        self.autowidth = width == 0
71
+
72
+        if length is None:
73
+            from operator import length_hint
74
+
75
+            length = length_hint(iterable, -1)
76
+
77
+            if length == -1:
78
+                length = None
79
+        if iterable is None:
80
+            if length is None:
81
+                raise TypeError("iterable or length is required")
82
+            iterable = t.cast(t.Iterable[V], range(length))
83
+        self.iter = iter(iterable)
84
+        self.length = length
85
+        self.pos = 0
86
+        self.avg: t.List[float] = []
87
+        self.start = self.last_eta = time.time()
88
+        self.eta_known = False
89
+        self.finished = False
90
+        self.max_width: t.Optional[int] = None
91
+        self.entered = False
92
+        self.current_item: t.Optional[V] = None
93
+        self.is_hidden = not isatty(self.file)
94
+        self._last_line: t.Optional[str] = None
95
+
96
+    def __enter__(self) -> "ProgressBar":
97
+        self.entered = True
98
+        self.render_progress()
99
+        return self
100
+
101
+    def __exit__(self, exc_type, exc_value, tb):  # type: ignore
102
+        self.render_finish()
103
+
104
+    def __iter__(self) -> t.Iterator[V]:
105
+        if not self.entered:
106
+            raise RuntimeError("You need to use progress bars in a with block.")
107
+        self.render_progress()
108
+        return self.generator()
109
+
110
+    def __next__(self) -> V:
111
+        # Iteration is defined in terms of a generator function,
112
+        # returned by iter(self); use that to define next(). This works
113
+        # because `self.iter` is an iterable consumed by that generator,
114
+        # so it is re-entry safe. Calling `next(self.generator())`
115
+        # twice works and does "what you want".
116
+        return next(iter(self))
117
+
118
+    def render_finish(self) -> None:
119
+        if self.is_hidden:
120
+            return
121
+        self.file.write(AFTER_BAR)
122
+        self.file.flush()
123
+
124
+    @property
125
+    def pct(self) -> float:
126
+        if self.finished:
127
+            return 1.0
128
+        return min(self.pos / (float(self.length or 1) or 1), 1.0)
129
+
130
+    @property
131
+    def time_per_iteration(self) -> float:
132
+        if not self.avg:
133
+            return 0.0
134
+        return sum(self.avg) / float(len(self.avg))
135
+
136
+    @property
137
+    def eta(self) -> float:
138
+        if self.length is not None and not self.finished:
139
+            return self.time_per_iteration * (self.length - self.pos)
140
+        return 0.0
141
+
142
+    def format_eta(self) -> str:
143
+        if self.eta_known:
144
+            t = int(self.eta)
145
+            seconds = t % 60
146
+            t //= 60
147
+            minutes = t % 60
148
+            t //= 60
149
+            hours = t % 24
150
+            t //= 24
151
+            if t > 0:
152
+                return f"{t}d {hours:02}:{minutes:02}:{seconds:02}"
153
+            else:
154
+                return f"{hours:02}:{minutes:02}:{seconds:02}"
155
+        return ""
156
+
157
+    def format_pos(self) -> str:
158
+        pos = str(self.pos)
159
+        if self.length is not None:
160
+            pos += f"/{self.length}"
161
+        return pos
162
+
163
+    def format_pct(self) -> str:
164
+        return f"{int(self.pct * 100): 4}%"[1:]
165
+
166
+    def format_bar(self) -> str:
167
+        if self.length is not None:
168
+            bar_length = int(self.pct * self.width)
169
+            bar = self.fill_char * bar_length
170
+            bar += self.empty_char * (self.width - bar_length)
171
+        elif self.finished:
172
+            bar = self.fill_char * self.width
173
+        else:
174
+            chars = list(self.empty_char * (self.width or 1))
175
+            if self.time_per_iteration != 0:
176
+                chars[
177
+                    int(
178
+                        (math.cos(self.pos * self.time_per_iteration) / 2.0 + 0.5)
179
+                        * self.width
180
+                    )
181
+                ] = self.fill_char
182
+            bar = "".join(chars)
183
+        return bar
184
+
185
+    def format_progress_line(self) -> str:
186
+        show_percent = self.show_percent
187
+
188
+        info_bits = []
189
+        if self.length is not None and show_percent is None:
190
+            show_percent = not self.show_pos
191
+
192
+        if self.show_pos:
193
+            info_bits.append(self.format_pos())
194
+        if show_percent:
195
+            info_bits.append(self.format_pct())
196
+        if self.show_eta and self.eta_known and not self.finished:
197
+            info_bits.append(self.format_eta())
198
+        if self.item_show_func is not None:
199
+            item_info = self.item_show_func(self.current_item)
200
+            if item_info is not None:
201
+                info_bits.append(item_info)
202
+
203
+        return (
204
+            self.bar_template
205
+            % {
206
+                "label": self.label,
207
+                "bar": self.format_bar(),
208
+                "info": self.info_sep.join(info_bits),
209
+            }
210
+        ).rstrip()
211
+
212
+    def render_progress(self) -> None:
213
+        import shutil
214
+
215
+        if self.is_hidden:
216
+            # Only output the label as it changes if the output is not a
217
+            # TTY. Use file=stderr if you expect to be piping stdout.
218
+            if self._last_line != self.label:
219
+                self._last_line = self.label
220
+                echo(self.label, file=self.file, color=self.color)
221
+
222
+            return
223
+
224
+        buf = []
225
+        # Update width in case the terminal has been resized
226
+        if self.autowidth:
227
+            old_width = self.width
228
+            self.width = 0
229
+            clutter_length = term_len(self.format_progress_line())
230
+            new_width = max(0, shutil.get_terminal_size().columns - clutter_length)
231
+            if new_width < old_width:
232
+                buf.append(BEFORE_BAR)
233
+                buf.append(" " * self.max_width)  # type: ignore
234
+                self.max_width = new_width
235
+            self.width = new_width
236
+
237
+        clear_width = self.width
238
+        if self.max_width is not None:
239
+            clear_width = self.max_width
240
+
241
+        buf.append(BEFORE_BAR)
242
+        line = self.format_progress_line()
243
+        line_len = term_len(line)
244
+        if self.max_width is None or self.max_width < line_len:
245
+            self.max_width = line_len
246
+
247
+        buf.append(line)
248
+        buf.append(" " * (clear_width - line_len))
249
+        line = "".join(buf)
250
+        # Render the line only if it changed.
251
+
252
+        if line != self._last_line:
253
+            self._last_line = line
254
+            echo(line, file=self.file, color=self.color, nl=False)
255
+            self.file.flush()
256
+
257
+    def make_step(self, n_steps: int) -> None:
258
+        self.pos += n_steps
259
+        if self.length is not None and self.pos >= self.length:
260
+            self.finished = True
261
+
262
+        if (time.time() - self.last_eta) < 1.0:
263
+            return
264
+
265
+        self.last_eta = time.time()
266
+
267
+        # self.avg is a rolling list of length <= 7 of steps where steps are
268
+        # defined as time elapsed divided by the total progress through
269
+        # self.length.
270
+        if self.pos:
271
+            step = (time.time() - self.start) / self.pos
272
+        else:
273
+            step = time.time() - self.start
274
+
275
+        self.avg = self.avg[-6:] + [step]
276
+
277
+        self.eta_known = self.length is not None
278
+
279
+    def update(self, n_steps: int, current_item: t.Optional[V] = None) -> None:
280
+        """Update the progress bar by advancing a specified number of
281
+        steps, and optionally set the ``current_item`` for this new
282
+        position.
283
+
284
+        :param n_steps: Number of steps to advance.
285
+        :param current_item: Optional item to set as ``current_item``
286
+            for the updated position.
287
+
288
+        .. versionchanged:: 8.0
289
+            Added the ``current_item`` optional parameter.
290
+
291
+        .. versionchanged:: 8.0
292
+            Only render when the number of steps meets the
293
+            ``update_min_steps`` threshold.
294
+        """
295
+        if current_item is not None:
296
+            self.current_item = current_item
297
+
298
+        self._completed_intervals += n_steps
299
+
300
+        if self._completed_intervals >= self.update_min_steps:
301
+            self.make_step(self._completed_intervals)
302
+            self.render_progress()
303
+            self._completed_intervals = 0
304
+
305
+    def finish(self) -> None:
306
+        self.eta_known = False
307
+        self.current_item = None
308
+        self.finished = True
309
+
310
+    def generator(self) -> t.Iterator[V]:
311
+        """Return a generator which yields the items added to the bar
312
+        during construction, and updates the progress bar *after* the
313
+        yielded block returns.
314
+        """
315
+        # WARNING: the iterator interface for `ProgressBar` relies on
316
+        # this and only works because this is a simple generator which
317
+        # doesn't create or manage additional state. If this function
318
+        # changes, the impact should be evaluated both against
319
+        # `iter(bar)` and `next(bar)`. `next()` in particular may call
320
+        # `self.generator()` repeatedly, and this must remain safe in
321
+        # order for that interface to work.
322
+        if not self.entered:
323
+            raise RuntimeError("You need to use progress bars in a with block.")
324
+
325
+        if self.is_hidden:
326
+            yield from self.iter
327
+        else:
328
+            for rv in self.iter:
329
+                self.current_item = rv
330
+
331
+                # This allows show_item_func to be updated before the
332
+                # item is processed. Only trigger at the beginning of
333
+                # the update interval.
334
+                if self._completed_intervals == 0:
335
+                    self.render_progress()
336
+
337
+                yield rv
338
+                self.update(1)
339
+
340
+            self.finish()
341
+            self.render_progress()
342
+
343
+
344
+def pager(generator: t.Iterable[str], color: t.Optional[bool] = None) -> None:
345
+    """Decide what method to use for paging through text."""
346
+    stdout = _default_text_stdout()
347
+    if not isatty(sys.stdin) or not isatty(stdout):
348
+        return _nullpager(stdout, generator, color)
349
+    pager_cmd = (os.environ.get("PAGER", None) or "").strip()
350
+    if pager_cmd:
351
+        if WIN:
352
+            return _tempfilepager(generator, pager_cmd, color)
353
+        return _pipepager(generator, pager_cmd, color)
354
+    if os.environ.get("TERM") in ("dumb", "emacs"):
355
+        return _nullpager(stdout, generator, color)
356
+    if WIN or sys.platform.startswith("os2"):
357
+        return _tempfilepager(generator, "more <", color)
358
+    if hasattr(os, "system") and os.system("(less) 2>/dev/null") == 0:
359
+        return _pipepager(generator, "less", color)
360
+
361
+    import tempfile
362
+
363
+    fd, filename = tempfile.mkstemp()
364
+    os.close(fd)
365
+    try:
366
+        if hasattr(os, "system") and os.system(f'more "{filename}"') == 0:
367
+            return _pipepager(generator, "more", color)
368
+        return _nullpager(stdout, generator, color)
369
+    finally:
370
+        os.unlink(filename)
371
+
372
+
373
+def _pipepager(generator: t.Iterable[str], cmd: str, color: t.Optional[bool]) -> None:
374
+    """Page through text by feeding it to another program.  Invoking a
375
+    pager through this might support colors.
376
+    """
377
+    import subprocess
378
+
379
+    env = dict(os.environ)
380
+
381
+    # If we're piping to less we might support colors under the
382
+    # condition that
383
+    cmd_detail = cmd.rsplit("/", 1)[-1].split()
384
+    if color is None and cmd_detail[0] == "less":
385
+        less_flags = f"{os.environ.get('LESS', '')}{' '.join(cmd_detail[1:])}"
386
+        if not less_flags:
387
+            env["LESS"] = "-R"
388
+            color = True
389
+        elif "r" in less_flags or "R" in less_flags:
390
+            color = True
391
+
392
+    c = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE, env=env)
393
+    stdin = t.cast(t.BinaryIO, c.stdin)
394
+    encoding = get_best_encoding(stdin)
395
+    try:
396
+        for text in generator:
397
+            if not color:
398
+                text = strip_ansi(text)
399
+
400
+            stdin.write(text.encode(encoding, "replace"))
401
+    except (OSError, KeyboardInterrupt):
402
+        pass
403
+    else:
404
+        stdin.close()
405
+
406
+    # Less doesn't respect ^C, but catches it for its own UI purposes (aborting
407
+    # search or other commands inside less).
408
+    #
409
+    # That means when the user hits ^C, the parent process (click) terminates,
410
+    # but less is still alive, paging the output and messing up the terminal.
411
+    #
412
+    # If the user wants to make the pager exit on ^C, they should set
413
+    # `LESS='-K'`. It's not our decision to make.
414
+    while True:
415
+        try:
416
+            c.wait()
417
+        except KeyboardInterrupt:
418
+            pass
419
+        else:
420
+            break
421
+
422
+
423
+def _tempfilepager(
424
+    generator: t.Iterable[str], cmd: str, color: t.Optional[bool]
425
+) -> None:
426
+    """Page through text by invoking a program on a temporary file."""
427
+    import tempfile
428
+
429
+    fd, filename = tempfile.mkstemp()
430
+    # TODO: This never terminates if the passed generator never terminates.
431
+    text = "".join(generator)
432
+    if not color:
433
+        text = strip_ansi(text)
434
+    encoding = get_best_encoding(sys.stdout)
435
+    with open_stream(filename, "wb")[0] as f:
436
+        f.write(text.encode(encoding))
437
+    try:
438
+        os.system(f'{cmd} "{filename}"')
439
+    finally:
440
+        os.close(fd)
441
+        os.unlink(filename)
442
+
443
+
444
+def _nullpager(
445
+    stream: t.TextIO, generator: t.Iterable[str], color: t.Optional[bool]
446
+) -> None:
447
+    """Simply print unformatted text.  This is the ultimate fallback."""
448
+    for text in generator:
449
+        if not color:
450
+            text = strip_ansi(text)
451
+        stream.write(text)
452
+
453
+
454
+class Editor:
455
+    def __init__(
456
+        self,
457
+        editor: t.Optional[str] = None,
458
+        env: t.Optional[t.Mapping[str, str]] = None,
459
+        require_save: bool = True,
460
+        extension: str = ".txt",
461
+    ) -> None:
462
+        self.editor = editor
463
+        self.env = env
464
+        self.require_save = require_save
465
+        self.extension = extension
466
+
467
+    def get_editor(self) -> str:
468
+        if self.editor is not None:
469
+            return self.editor
470
+        for key in "VISUAL", "EDITOR":
471
+            rv = os.environ.get(key)
472
+            if rv:
473
+                return rv
474
+        if WIN:
475
+            return "notepad"
476
+        for editor in "sensible-editor", "vim", "nano":
477
+            if os.system(f"which {editor} >/dev/null 2>&1") == 0:
478
+                return editor
479
+        return "vi"
480
+
481
+    def edit_file(self, filename: str) -> None:
482
+        import subprocess
483
+
484
+        editor = self.get_editor()
485
+        environ: t.Optional[t.Dict[str, str]] = None
486
+
487
+        if self.env:
488
+            environ = os.environ.copy()
489
+            environ.update(self.env)
490
+
491
+        try:
492
+            c = subprocess.Popen(f'{editor} "{filename}"', env=environ, shell=True)
493
+            exit_code = c.wait()
494
+            if exit_code != 0:
495
+                raise ClickException(
496
+                    _("{editor}: Editing failed").format(editor=editor)
497
+                )
498
+        except OSError as e:
499
+            raise ClickException(
500
+                _("{editor}: Editing failed: {e}").format(editor=editor, e=e)
501
+            ) from e
502
+
503
+    def edit(self, text: t.Optional[t.AnyStr]) -> t.Optional[t.AnyStr]:
504
+        import tempfile
505
+
506
+        if not text:
507
+            data = b""
508
+        elif isinstance(text, (bytes, bytearray)):
509
+            data = text
510
+        else:
511
+            if text and not text.endswith("\n"):
512
+                text += "\n"
513
+
514
+            if WIN:
515
+                data = text.replace("\n", "\r\n").encode("utf-8-sig")
516
+            else:
517
+                data = text.encode("utf-8")
518
+
519
+        fd, name = tempfile.mkstemp(prefix="editor-", suffix=self.extension)
520
+        f: t.BinaryIO
521
+
522
+        try:
523
+            with os.fdopen(fd, "wb") as f:
524
+                f.write(data)
525
+
526
+            # If the filesystem resolution is 1 second, like Mac OS
527
+            # 10.12 Extended, or 2 seconds, like FAT32, and the editor
528
+            # closes very fast, require_save can fail. Set the modified
529
+            # time to be 2 seconds in the past to work around this.
530
+            os.utime(name, (os.path.getatime(name), os.path.getmtime(name) - 2))
531
+            # Depending on the resolution, the exact value might not be
532
+            # recorded, so get the new recorded value.
533
+            timestamp = os.path.getmtime(name)
534
+
535
+            self.edit_file(name)
536
+
537
+            if self.require_save and os.path.getmtime(name) == timestamp:
538
+                return None
539
+
540
+            with open(name, "rb") as f:
541
+                rv = f.read()
542
+
543
+            if isinstance(text, (bytes, bytearray)):
544
+                return rv
545
+
546
+            return rv.decode("utf-8-sig").replace("\r\n", "\n")  # type: ignore
547
+        finally:
548
+            os.unlink(name)
549
+
550
+
551
+def open_url(url: str, wait: bool = False, locate: bool = False) -> int:
552
+    import subprocess
553
+
554
+    def _unquote_file(url: str) -> str:
555
+        from urllib.parse import unquote
556
+
557
+        if url.startswith("file://"):
558
+            url = unquote(url[7:])
559
+
560
+        return url
561
+
562
+    if sys.platform == "darwin":
563
+        args = ["open"]
564
+        if wait:
565
+            args.append("-W")
566
+        if locate:
567
+            args.append("-R")
568
+        args.append(_unquote_file(url))
569
+        null = open("/dev/null", "w")
570
+        try:
571
+            return subprocess.Popen(args, stderr=null).wait()
572
+        finally:
573
+            null.close()
574
+    elif WIN:
575
+        if locate:
576
+            url = _unquote_file(url.replace('"', ""))
577
+            args = f'explorer /select,"{url}"'
578
+        else:
579
+            url = url.replace('"', "")
580
+            wait_str = "/WAIT" if wait else ""
581
+            args = f'start {wait_str} "" "{url}"'
582
+        return os.system(args)
583
+    elif CYGWIN:
584
+        if locate:
585
+            url = os.path.dirname(_unquote_file(url).replace('"', ""))
586
+            args = f'cygstart "{url}"'
587
+        else:
588
+            url = url.replace('"', "")
589
+            wait_str = "-w" if wait else ""
590
+            args = f'cygstart {wait_str} "{url}"'
591
+        return os.system(args)
592
+
593
+    try:
594
+        if locate:
595
+            url = os.path.dirname(_unquote_file(url)) or "."
596
+        else:
597
+            url = _unquote_file(url)
598
+        c = subprocess.Popen(["xdg-open", url])
599
+        if wait:
600
+            return c.wait()
601
+        return 0
602
+    except OSError:
603
+        if url.startswith(("http://", "https://")) and not locate and not wait:
604
+            import webbrowser
605
+
606
+            webbrowser.open(url)
607
+            return 0
608
+        return 1
609
+
610
+
611
+def _translate_ch_to_exc(ch: str) -> t.Optional[BaseException]:
612
+    if ch == "\x03":
613
+        raise KeyboardInterrupt()
614
+
615
+    if ch == "\x04" and not WIN:  # Unix-like, Ctrl+D
616
+        raise EOFError()
617
+
618
+    if ch == "\x1a" and WIN:  # Windows, Ctrl+Z
619
+        raise EOFError()
620
+
621
+    return None
622
+
623
+
624
+if WIN:
625
+    import msvcrt
626
+
627
+    @contextlib.contextmanager
628
+    def raw_terminal() -> t.Iterator[int]:
629
+        yield -1
630
+
631
+    def getchar(echo: bool) -> str:
632
+        # The function `getch` will return a bytes object corresponding to
633
+        # the pressed character. Since Windows 10 build 1803, it will also
634
+        # return \x00 when called a second time after pressing a regular key.
635
+        #
636
+        # `getwch` does not share this probably-bugged behavior. Moreover, it
637
+        # returns a Unicode object by default, which is what we want.
638
+        #
639
+        # Either of these functions will return \x00 or \xe0 to indicate
640
+        # a special key, and you need to call the same function again to get
641
+        # the "rest" of the code. The fun part is that \u00e0 is
642
+        # "latin small letter a with grave", so if you type that on a French
643
+        # keyboard, you _also_ get a \xe0.
644
+        # E.g., consider the Up arrow. This returns \xe0 and then \x48. The
645
+        # resulting Unicode string reads as "a with grave" + "capital H".
646
+        # This is indistinguishable from when the user actually types
647
+        # "a with grave" and then "capital H".
648
+        #
649
+        # When \xe0 is returned, we assume it's part of a special-key sequence
650
+        # and call `getwch` again, but that means that when the user types
651
+        # the \u00e0 character, `getchar` doesn't return until a second
652
+        # character is typed.
653
+        # The alternative is returning immediately, but that would mess up
654
+        # cross-platform handling of arrow keys and others that start with
655
+        # \xe0. Another option is using `getch`, but then we can't reliably
656
+        # read non-ASCII characters, because return values of `getch` are
657
+        # limited to the current 8-bit codepage.
658
+        #
659
+        # Anyway, Click doesn't claim to do this Right(tm), and using `getwch`
660
+        # is doing the right thing in more situations than with `getch`.
661
+        func: t.Callable[[], str]
662
+
663
+        if echo:
664
+            func = msvcrt.getwche  # type: ignore
665
+        else:
666
+            func = msvcrt.getwch  # type: ignore
667
+
668
+        rv = func()
669
+
670
+        if rv in ("\x00", "\xe0"):
671
+            # \x00 and \xe0 are control characters that indicate special key,
672
+            # see above.
673
+            rv += func()
674
+
675
+        _translate_ch_to_exc(rv)
676
+        return rv
677
+
678
+
679
+else:
680
+    import tty
681
+    import termios
682
+
683
+    @contextlib.contextmanager
684
+    def raw_terminal() -> t.Iterator[int]:
685
+        f: t.Optional[t.TextIO]
686
+        fd: int
687
+
688
+        if not isatty(sys.stdin):
689
+            f = open("/dev/tty")
690
+            fd = f.fileno()
691
+        else:
692
+            fd = sys.stdin.fileno()
693
+            f = None
694
+
695
+        try:
696
+            old_settings = termios.tcgetattr(fd)
697
+
698
+            try:
699
+                tty.setraw(fd)
700
+                yield fd
701
+            finally:
702
+                termios.tcsetattr(fd, termios.TCSADRAIN, old_settings)
703
+                sys.stdout.flush()
704
+
705
+                if f is not None:
706
+                    f.close()
707
+        except termios.error:
708
+            pass
709
+
710
+    def getchar(echo: bool) -> str:
711
+        with raw_terminal() as fd:
712
+            ch = os.read(fd, 32).decode(get_best_encoding(sys.stdin), "replace")
713
+
714
+            if echo and isatty(sys.stdout):
715
+                sys.stdout.write(ch)
716
+
717
+            _translate_ch_to_exc(ch)
718
+            return ch

+ 49
- 0
www/Files-API/.venv/lib/python3.7/site-packages/click/_textwrap.py View File

@@ -0,0 +1,49 @@
1
+import textwrap
2
+import typing as t
3
+from contextlib import contextmanager
4
+
5
+
6
+class TextWrapper(textwrap.TextWrapper):
7
+    def _handle_long_word(
8
+        self,
9
+        reversed_chunks: t.List[str],
10
+        cur_line: t.List[str],
11
+        cur_len: int,
12
+        width: int,
13
+    ) -> None:
14
+        space_left = max(width - cur_len, 1)
15
+
16
+        if self.break_long_words:
17
+            last = reversed_chunks[-1]
18
+            cut = last[:space_left]
19
+            res = last[space_left:]
20
+            cur_line.append(cut)
21
+            reversed_chunks[-1] = res
22
+        elif not cur_line:
23
+            cur_line.append(reversed_chunks.pop())
24
+
25
+    @contextmanager
26
+    def extra_indent(self, indent: str) -> t.Iterator[None]:
27
+        old_initial_indent = self.initial_indent
28
+        old_subsequent_indent = self.subsequent_indent
29
+        self.initial_indent += indent
30
+        self.subsequent_indent += indent
31
+
32
+        try:
33
+            yield
34
+        finally:
35
+            self.initial_indent = old_initial_indent
36
+            self.subsequent_indent = old_subsequent_indent
37
+
38
+    def indent_only(self, text: str) -> str:
39
+        rv = []
40
+
41
+        for idx, line in enumerate(text.splitlines()):
42
+            indent = self.initial_indent
43
+
44
+            if idx > 0:
45
+                indent = self.subsequent_indent
46
+
47
+            rv.append(f"{indent}{line}")
48
+
49
+        return "\n".join(rv)

+ 100
- 0
www/Files-API/.venv/lib/python3.7/site-packages/click/_unicodefun.py View File

@@ -0,0 +1,100 @@
1
+import codecs
2
+import os
3
+from gettext import gettext as _
4
+
5
+
6
+def _verify_python_env() -> None:
7
+    """Ensures that the environment is good for Unicode."""
8
+    try:
9
+        from locale import getpreferredencoding
10
+
11
+        fs_enc = codecs.lookup(getpreferredencoding()).name
12
+    except Exception:
13
+        fs_enc = "ascii"
14
+
15
+    if fs_enc != "ascii":
16
+        return
17
+
18
+    extra = [
19
+        _(
20
+            "Click will abort further execution because Python was"
21
+            " configured to use ASCII as encoding for the environment."
22
+            " Consult https://click.palletsprojects.com/unicode-support/"
23
+            " for mitigation steps."
24
+        )
25
+    ]
26
+
27
+    if os.name == "posix":
28
+        import subprocess
29
+
30
+        try:
31
+            rv = subprocess.Popen(
32
+                ["locale", "-a"],
33
+                stdout=subprocess.PIPE,
34
+                stderr=subprocess.PIPE,
35
+                encoding="ascii",
36
+                errors="replace",
37
+            ).communicate()[0]
38
+        except OSError:
39
+            rv = ""
40
+
41
+        good_locales = set()
42
+        has_c_utf8 = False
43
+
44
+        for line in rv.splitlines():
45
+            locale = line.strip()
46
+
47
+            if locale.lower().endswith((".utf-8", ".utf8")):
48
+                good_locales.add(locale)
49
+
50
+                if locale.lower() in ("c.utf8", "c.utf-8"):
51
+                    has_c_utf8 = True
52
+
53
+        if not good_locales:
54
+            extra.append(
55
+                _(
56
+                    "Additional information: on this system no suitable"
57
+                    " UTF-8 locales were discovered. This most likely"
58
+                    " requires resolving by reconfiguring the locale"
59
+                    " system."
60
+                )
61
+            )
62
+        elif has_c_utf8:
63
+            extra.append(
64
+                _(
65
+                    "This system supports the C.UTF-8 locale which is"
66
+                    " recommended. You might be able to resolve your"
67
+                    " issue by exporting the following environment"
68
+                    " variables:"
69
+                )
70
+            )
71
+            extra.append("    export LC_ALL=C.UTF-8\n    export LANG=C.UTF-8")
72
+        else:
73
+            extra.append(
74
+                _(
75
+                    "This system lists some UTF-8 supporting locales"
76
+                    " that you can pick from. The following suitable"
77
+                    " locales were discovered: {locales}"
78
+                ).format(locales=", ".join(sorted(good_locales)))
79
+            )
80
+
81
+        bad_locale = None
82
+
83
+        for env_locale in os.environ.get("LC_ALL"), os.environ.get("LANG"):
84
+            if env_locale and env_locale.lower().endswith((".utf-8", ".utf8")):
85
+                bad_locale = env_locale
86
+
87
+            if env_locale is not None:
88
+                break
89
+
90
+        if bad_locale is not None:
91
+            extra.append(
92
+                _(
93
+                    "Click discovered that you exported a UTF-8 locale"
94
+                    " but the locale system could not pick up from it"
95
+                    " because it does not exist. The exported locale is"
96
+                    " {locale!r} but it is not supported."
97
+                ).format(locale=bad_locale)
98
+            )
99
+
100
+    raise RuntimeError("\n\n".join(extra))

+ 279
- 0
www/Files-API/.venv/lib/python3.7/site-packages/click/_winconsole.py View File

@@ -0,0 +1,279 @@
1
+# This module is based on the excellent work by Adam Bartoš who
2
+# provided a lot of what went into the implementation here in
3
+# the discussion to issue1602 in the Python bug tracker.
4
+#
5
+# There are some general differences in regards to how this works
6
+# compared to the original patches as we do not need to patch
7
+# the entire interpreter but just work in our little world of
8
+# echo and prompt.
9
+import io
10
+import sys
11
+import time
12
+import typing as t
13
+from ctypes import byref
14
+from ctypes import c_char
15
+from ctypes import c_char_p
16
+from ctypes import c_int
17
+from ctypes import c_ssize_t
18
+from ctypes import c_ulong
19
+from ctypes import c_void_p
20
+from ctypes import POINTER
21
+from ctypes import py_object
22
+from ctypes import Structure
23
+from ctypes.wintypes import DWORD
24
+from ctypes.wintypes import HANDLE
25
+from ctypes.wintypes import LPCWSTR
26
+from ctypes.wintypes import LPWSTR
27
+
28
+from ._compat import _NonClosingTextIOWrapper
29
+
30
+assert sys.platform == "win32"
31
+import msvcrt  # noqa: E402
32
+from ctypes import windll  # noqa: E402
33
+from ctypes import WINFUNCTYPE  # noqa: E402
34
+
35
+c_ssize_p = POINTER(c_ssize_t)
36
+
37
+kernel32 = windll.kernel32
38
+GetStdHandle = kernel32.GetStdHandle
39
+ReadConsoleW = kernel32.ReadConsoleW
40
+WriteConsoleW = kernel32.WriteConsoleW
41
+GetConsoleMode = kernel32.GetConsoleMode
42
+GetLastError = kernel32.GetLastError
43
+GetCommandLineW = WINFUNCTYPE(LPWSTR)(("GetCommandLineW", windll.kernel32))
44
+CommandLineToArgvW = WINFUNCTYPE(POINTER(LPWSTR), LPCWSTR, POINTER(c_int))(
45
+    ("CommandLineToArgvW", windll.shell32)
46
+)
47
+LocalFree = WINFUNCTYPE(c_void_p, c_void_p)(("LocalFree", windll.kernel32))
48
+
49
+STDIN_HANDLE = GetStdHandle(-10)
50
+STDOUT_HANDLE = GetStdHandle(-11)
51
+STDERR_HANDLE = GetStdHandle(-12)
52
+
53
+PyBUF_SIMPLE = 0
54
+PyBUF_WRITABLE = 1
55
+
56
+ERROR_SUCCESS = 0
57
+ERROR_NOT_ENOUGH_MEMORY = 8
58
+ERROR_OPERATION_ABORTED = 995
59
+
60
+STDIN_FILENO = 0
61
+STDOUT_FILENO = 1
62
+STDERR_FILENO = 2
63
+
64
+EOF = b"\x1a"
65
+MAX_BYTES_WRITTEN = 32767
66
+
67
+try:
68
+    from ctypes import pythonapi
69
+except ImportError:
70
+    # On PyPy we cannot get buffers so our ability to operate here is
71
+    # severely limited.
72
+    get_buffer = None
73
+else:
74
+
75
+    class Py_buffer(Structure):
76
+        _fields_ = [
77
+            ("buf", c_void_p),
78
+            ("obj", py_object),
79
+            ("len", c_ssize_t),
80
+            ("itemsize", c_ssize_t),
81
+            ("readonly", c_int),
82
+            ("ndim", c_int),
83
+            ("format", c_char_p),
84
+            ("shape", c_ssize_p),
85
+            ("strides", c_ssize_p),
86
+            ("suboffsets", c_ssize_p),
87
+            ("internal", c_void_p),
88
+        ]
89
+
90
+    PyObject_GetBuffer = pythonapi.PyObject_GetBuffer
91
+    PyBuffer_Release = pythonapi.PyBuffer_Release
92
+
93
+    def get_buffer(obj, writable=False):
94
+        buf = Py_buffer()
95
+        flags = PyBUF_WRITABLE if writable else PyBUF_SIMPLE
96
+        PyObject_GetBuffer(py_object(obj), byref(buf), flags)
97
+
98
+        try:
99
+            buffer_type = c_char * buf.len
100
+            return buffer_type.from_address(buf.buf)
101
+        finally:
102
+            PyBuffer_Release(byref(buf))
103
+
104
+
105
+class _WindowsConsoleRawIOBase(io.RawIOBase):
106
+    def __init__(self, handle):
107
+        self.handle = handle
108
+
109
+    def isatty(self):
110
+        super().isatty()
111
+        return True
112
+
113
+
114
+class _WindowsConsoleReader(_WindowsConsoleRawIOBase):
115
+    def readable(self):
116
+        return True
117
+
118
+    def readinto(self, b):
119
+        bytes_to_be_read = len(b)
120
+        if not bytes_to_be_read:
121
+            return 0
122
+        elif bytes_to_be_read % 2:
123
+            raise ValueError(
124
+                "cannot read odd number of bytes from UTF-16-LE encoded console"
125
+            )
126
+
127
+        buffer = get_buffer(b, writable=True)
128
+        code_units_to_be_read = bytes_to_be_read // 2
129
+        code_units_read = c_ulong()
130
+
131
+        rv = ReadConsoleW(
132
+            HANDLE(self.handle),
133
+            buffer,
134
+            code_units_to_be_read,
135
+            byref(code_units_read),
136
+            None,
137
+        )
138
+        if GetLastError() == ERROR_OPERATION_ABORTED:
139
+            # wait for KeyboardInterrupt
140
+            time.sleep(0.1)
141
+        if not rv:
142
+            raise OSError(f"Windows error: {GetLastError()}")
143
+
144
+        if buffer[0] == EOF:
145
+            return 0
146
+        return 2 * code_units_read.value
147
+
148
+
149
+class _WindowsConsoleWriter(_WindowsConsoleRawIOBase):
150
+    def writable(self):
151
+        return True
152
+
153
+    @staticmethod
154
+    def _get_error_message(errno):
155
+        if errno == ERROR_SUCCESS:
156
+            return "ERROR_SUCCESS"
157
+        elif errno == ERROR_NOT_ENOUGH_MEMORY:
158
+            return "ERROR_NOT_ENOUGH_MEMORY"
159
+        return f"Windows error {errno}"
160
+
161
+    def write(self, b):
162
+        bytes_to_be_written = len(b)
163
+        buf = get_buffer(b)
164
+        code_units_to_be_written = min(bytes_to_be_written, MAX_BYTES_WRITTEN) // 2
165
+        code_units_written = c_ulong()
166
+
167
+        WriteConsoleW(
168
+            HANDLE(self.handle),
169
+            buf,
170
+            code_units_to_be_written,
171
+            byref(code_units_written),
172
+            None,
173
+        )
174
+        bytes_written = 2 * code_units_written.value
175
+
176
+        if bytes_written == 0 and bytes_to_be_written > 0:
177
+            raise OSError(self._get_error_message(GetLastError()))
178
+        return bytes_written
179
+
180
+
181
+class ConsoleStream:
182
+    def __init__(self, text_stream: t.TextIO, byte_stream: t.BinaryIO) -> None:
183
+        self._text_stream = text_stream
184
+        self.buffer = byte_stream
185
+
186
+    @property
187
+    def name(self) -> str:
188
+        return self.buffer.name
189
+
190
+    def write(self, x: t.AnyStr) -> int:
191
+        if isinstance(x, str):
192
+            return self._text_stream.write(x)
193
+        try:
194
+            self.flush()
195
+        except Exception:
196
+            pass
197
+        return self.buffer.write(x)
198
+
199
+    def writelines(self, lines: t.Iterable[t.AnyStr]) -> None:
200
+        for line in lines:
201
+            self.write(line)
202
+
203
+    def __getattr__(self, name: str) -> t.Any:
204
+        return getattr(self._text_stream, name)
205
+
206
+    def isatty(self) -> bool:
207
+        return self.buffer.isatty()
208
+
209
+    def __repr__(self):
210
+        return f"<ConsoleStream name={self.name!r} encoding={self.encoding!r}>"
211
+
212
+
213
+def _get_text_stdin(buffer_stream: t.BinaryIO) -> t.TextIO:
214
+    text_stream = _NonClosingTextIOWrapper(
215
+        io.BufferedReader(_WindowsConsoleReader(STDIN_HANDLE)),
216
+        "utf-16-le",
217
+        "strict",
218
+        line_buffering=True,
219
+    )
220
+    return t.cast(t.TextIO, ConsoleStream(text_stream, buffer_stream))
221
+
222
+
223
+def _get_text_stdout(buffer_stream: t.BinaryIO) -> t.TextIO:
224
+    text_stream = _NonClosingTextIOWrapper(
225
+        io.BufferedWriter(_WindowsConsoleWriter(STDOUT_HANDLE)),
226
+        "utf-16-le",
227
+        "strict",
228
+        line_buffering=True,
229
+    )
230
+    return t.cast(t.TextIO, ConsoleStream(text_stream, buffer_stream))
231
+
232
+
233
+def _get_text_stderr(buffer_stream: t.BinaryIO) -> t.TextIO:
234
+    text_stream = _NonClosingTextIOWrapper(
235
+        io.BufferedWriter(_WindowsConsoleWriter(STDERR_HANDLE)),
236
+        "utf-16-le",
237
+        "strict",
238
+        line_buffering=True,
239
+    )
240
+    return t.cast(t.TextIO, ConsoleStream(text_stream, buffer_stream))
241
+
242
+
243
+_stream_factories: t.Mapping[int, t.Callable[[t.BinaryIO], t.TextIO]] = {
244
+    0: _get_text_stdin,
245
+    1: _get_text_stdout,
246
+    2: _get_text_stderr,
247
+}
248
+
249
+
250
+def _is_console(f: t.TextIO) -> bool:
251
+    if not hasattr(f, "fileno"):
252
+        return False
253
+
254
+    try:
255
+        fileno = f.fileno()
256
+    except (OSError, io.UnsupportedOperation):
257
+        return False
258
+
259
+    handle = msvcrt.get_osfhandle(fileno)
260
+    return bool(GetConsoleMode(handle, byref(DWORD())))
261
+
262
+
263
+def _get_windows_console_stream(
264
+    f: t.TextIO, encoding: t.Optional[str], errors: t.Optional[str]
265
+) -> t.Optional[t.TextIO]:
266
+    if (
267
+        get_buffer is not None
268
+        and encoding in {"utf-16-le", None}
269
+        and errors in {"strict", None}
270
+        and _is_console(f)
271
+    ):
272
+        func = _stream_factories.get(f.fileno())
273
+        if func is not None:
274
+            b = getattr(f, "buffer", None)
275
+
276
+            if b is None:
277
+                return None
278
+
279
+            return func(b)

+ 2953
- 0
www/Files-API/.venv/lib/python3.7/site-packages/click/core.py
File diff suppressed because it is too large
View File


+ 436
- 0
www/Files-API/.venv/lib/python3.7/site-packages/click/decorators.py View File

@@ -0,0 +1,436 @@
1
+import inspect
2
+import types
3
+import typing as t
4
+from functools import update_wrapper
5
+from gettext import gettext as _
6
+
7
+from .core import Argument
8
+from .core import Command
9
+from .core import Context
10
+from .core import Group
11
+from .core import Option
12
+from .core import Parameter
13
+from .globals import get_current_context
14
+from .utils import echo
15
+
16
+F = t.TypeVar("F", bound=t.Callable[..., t.Any])
17
+FC = t.TypeVar("FC", t.Callable[..., t.Any], Command)
18
+
19
+
20
+def pass_context(f: F) -> F:
21
+    """Marks a callback as wanting to receive the current context
22
+    object as first argument.
23
+    """
24
+
25
+    def new_func(*args, **kwargs):  # type: ignore
26
+        return f(get_current_context(), *args, **kwargs)
27
+
28
+    return update_wrapper(t.cast(F, new_func), f)
29
+
30
+
31
+def pass_obj(f: F) -> F:
32
+    """Similar to :func:`pass_context`, but only pass the object on the
33
+    context onwards (:attr:`Context.obj`).  This is useful if that object
34
+    represents the state of a nested system.
35
+    """
36
+
37
+    def new_func(*args, **kwargs):  # type: ignore
38
+        return f(get_current_context().obj, *args, **kwargs)
39
+
40
+    return update_wrapper(t.cast(F, new_func), f)
41
+
42
+
43
+def make_pass_decorator(
44
+    object_type: t.Type, ensure: bool = False
45
+) -> "t.Callable[[F], F]":
46
+    """Given an object type this creates a decorator that will work
47
+    similar to :func:`pass_obj` but instead of passing the object of the
48
+    current context, it will find the innermost context of type
49
+    :func:`object_type`.
50
+
51
+    This generates a decorator that works roughly like this::
52
+
53
+        from functools import update_wrapper
54
+
55
+        def decorator(f):
56
+            @pass_context
57
+            def new_func(ctx, *args, **kwargs):
58
+                obj = ctx.find_object(object_type)
59
+                return ctx.invoke(f, obj, *args, **kwargs)
60
+            return update_wrapper(new_func, f)
61
+        return decorator
62
+
63
+    :param object_type: the type of the object to pass.
64
+    :param ensure: if set to `True`, a new object will be created and
65
+                   remembered on the context if it's not there yet.
66
+    """
67
+
68
+    def decorator(f: F) -> F:
69
+        def new_func(*args, **kwargs):  # type: ignore
70
+            ctx = get_current_context()
71
+
72
+            if ensure:
73
+                obj = ctx.ensure_object(object_type)
74
+            else:
75
+                obj = ctx.find_object(object_type)
76
+
77
+            if obj is None:
78
+                raise RuntimeError(
79
+                    "Managed to invoke callback without a context"
80
+                    f" object of type {object_type.__name__!r}"
81
+                    " existing."
82
+                )
83
+
84
+            return ctx.invoke(f, obj, *args, **kwargs)
85
+
86
+        return update_wrapper(t.cast(F, new_func), f)
87
+
88
+    return decorator
89
+
90
+
91
+def pass_meta_key(
92
+    key: str, *, doc_description: t.Optional[str] = None
93
+) -> "t.Callable[[F], F]":
94
+    """Create a decorator that passes a key from
95
+    :attr:`click.Context.meta` as the first argument to the decorated
96
+    function.
97
+
98
+    :param key: Key in ``Context.meta`` to pass.
99
+    :param doc_description: Description of the object being passed,
100
+        inserted into the decorator's docstring. Defaults to "the 'key'
101
+        key from Context.meta".
102
+
103
+    .. versionadded:: 8.0
104
+    """
105
+
106
+    def decorator(f: F) -> F:
107
+        def new_func(*args, **kwargs):  # type: ignore
108
+            ctx = get_current_context()
109
+            obj = ctx.meta[key]
110
+            return ctx.invoke(f, obj, *args, **kwargs)
111
+
112
+        return update_wrapper(t.cast(F, new_func), f)
113
+
114
+    if doc_description is None:
115
+        doc_description = f"the {key!r} key from :attr:`click.Context.meta`"
116
+
117
+    decorator.__doc__ = (
118
+        f"Decorator that passes {doc_description} as the first argument"
119
+        " to the decorated function."
120
+    )
121
+    return decorator
122
+
123
+
124
+def _make_command(
125
+    f: F,
126
+    name: t.Optional[str],
127
+    attrs: t.MutableMapping[str, t.Any],
128
+    cls: t.Type[Command],
129
+) -> Command:
130
+    if isinstance(f, Command):
131
+        raise TypeError("Attempted to convert a callback into a command twice.")
132
+
133
+    try:
134
+        params = f.__click_params__  # type: ignore
135
+        params.reverse()
136
+        del f.__click_params__  # type: ignore
137
+    except AttributeError:
138
+        params = []
139
+
140
+    help = attrs.get("help")
141
+
142
+    if help is None:
143
+        help = inspect.getdoc(f)
144
+    else:
145
+        help = inspect.cleandoc(help)
146
+
147
+    attrs["help"] = help
148
+    return cls(
149
+        name=name or f.__name__.lower().replace("_", "-"),
150
+        callback=f,
151
+        params=params,
152
+        **attrs,
153
+    )
154
+
155
+
156
+def command(
157
+    name: t.Optional[str] = None,
158
+    cls: t.Optional[t.Type[Command]] = None,
159
+    **attrs: t.Any,
160
+) -> t.Callable[[F], Command]:
161
+    r"""Creates a new :class:`Command` and uses the decorated function as
162
+    callback.  This will also automatically attach all decorated
163
+    :func:`option`\s and :func:`argument`\s as parameters to the command.
164
+
165
+    The name of the command defaults to the name of the function with
166
+    underscores replaced by dashes.  If you want to change that, you can
167
+    pass the intended name as the first argument.
168
+
169
+    All keyword arguments are forwarded to the underlying command class.
170
+
171
+    Once decorated the function turns into a :class:`Command` instance
172
+    that can be invoked as a command line utility or be attached to a
173
+    command :class:`Group`.
174
+
175
+    :param name: the name of the command.  This defaults to the function
176
+                 name with underscores replaced by dashes.
177
+    :param cls: the command class to instantiate.  This defaults to
178
+                :class:`Command`.
179
+    """
180
+    if cls is None:
181
+        cls = Command
182
+
183
+    def decorator(f: t.Callable[..., t.Any]) -> Command:
184
+        cmd = _make_command(f, name, attrs, cls)  # type: ignore
185
+        cmd.__doc__ = f.__doc__
186
+        return cmd
187
+
188
+    return decorator
189
+
190
+
191
+def group(name: t.Optional[str] = None, **attrs: t.Any) -> t.Callable[[F], Group]:
192
+    """Creates a new :class:`Group` with a function as callback.  This
193
+    works otherwise the same as :func:`command` just that the `cls`
194
+    parameter is set to :class:`Group`.
195
+    """
196
+    attrs.setdefault("cls", Group)
197
+    return t.cast(Group, command(name, **attrs))
198
+
199
+
200
+def _param_memo(f: FC, param: Parameter) -> None:
201
+    if isinstance(f, Command):
202
+        f.params.append(param)
203
+    else:
204
+        if not hasattr(f, "__click_params__"):
205
+            f.__click_params__ = []  # type: ignore
206
+
207
+        f.__click_params__.append(param)  # type: ignore
208
+
209
+
210
+def argument(*param_decls: str, **attrs: t.Any) -> t.Callable[[FC], FC]:
211
+    """Attaches an argument to the command.  All positional arguments are
212
+    passed as parameter declarations to :class:`Argument`; all keyword
213
+    arguments are forwarded unchanged (except ``cls``).
214
+    This is equivalent to creating an :class:`Argument` instance manually
215
+    and attaching it to the :attr:`Command.params` list.
216
+
217
+    :param cls: the argument class to instantiate.  This defaults to
218
+                :class:`Argument`.
219
+    """
220
+
221
+    def decorator(f: FC) -> FC:
222
+        ArgumentClass = attrs.pop("cls", Argument)
223
+        _param_memo(f, ArgumentClass(param_decls, **attrs))
224
+        return f
225
+
226
+    return decorator
227
+
228
+
229
+def option(*param_decls: str, **attrs: t.Any) -> t.Callable[[FC], FC]:
230
+    """Attaches an option to the command.  All positional arguments are
231
+    passed as parameter declarations to :class:`Option`; all keyword
232
+    arguments are forwarded unchanged (except ``cls``).
233
+    This is equivalent to creating an :class:`Option` instance manually
234
+    and attaching it to the :attr:`Command.params` list.
235
+
236
+    :param cls: the option class to instantiate.  This defaults to
237
+                :class:`Option`.
238
+    """
239
+
240
+    def decorator(f: FC) -> FC:
241
+        # Issue 926, copy attrs, so pre-defined options can re-use the same cls=
242
+        option_attrs = attrs.copy()
243
+
244
+        if "help" in option_attrs:
245
+            option_attrs["help"] = inspect.cleandoc(option_attrs["help"])
246
+        OptionClass = option_attrs.pop("cls", Option)
247
+        _param_memo(f, OptionClass(param_decls, **option_attrs))
248
+        return f
249
+
250
+    return decorator
251
+
252
+
253
+def confirmation_option(*param_decls: str, **kwargs: t.Any) -> t.Callable[[FC], FC]:
254
+    """Add a ``--yes`` option which shows a prompt before continuing if
255
+    not passed. If the prompt is declined, the program will exit.
256
+
257
+    :param param_decls: One or more option names. Defaults to the single
258
+        value ``"--yes"``.
259
+    :param kwargs: Extra arguments are passed to :func:`option`.
260
+    """
261
+
262
+    def callback(ctx: Context, param: Parameter, value: bool) -> None:
263
+        if not value:
264
+            ctx.abort()
265
+
266
+    if not param_decls:
267
+        param_decls = ("--yes",)
268
+
269
+    kwargs.setdefault("is_flag", True)
270
+    kwargs.setdefault("callback", callback)
271
+    kwargs.setdefault("expose_value", False)
272
+    kwargs.setdefault("prompt", "Do you want to continue?")
273
+    kwargs.setdefault("help", "Confirm the action without prompting.")
274
+    return option(*param_decls, **kwargs)
275
+
276
+
277
+def password_option(*param_decls: str, **kwargs: t.Any) -> t.Callable[[FC], FC]:
278
+    """Add a ``--password`` option which prompts for a password, hiding
279
+    input and asking to enter the value again for confirmation.
280
+
281
+    :param param_decls: One or more option names. Defaults to the single
282
+        value ``"--password"``.
283
+    :param kwargs: Extra arguments are passed to :func:`option`.
284
+    """
285
+    if not param_decls:
286
+        param_decls = ("--password",)
287
+
288
+    kwargs.setdefault("prompt", True)
289
+    kwargs.setdefault("confirmation_prompt", True)
290
+    kwargs.setdefault("hide_input", True)
291
+    return option(*param_decls, **kwargs)
292
+
293
+
294
+def version_option(
295
+    version: t.Optional[str] = None,
296
+    *param_decls: str,
297
+    package_name: t.Optional[str] = None,
298
+    prog_name: t.Optional[str] = None,
299
+    message: t.Optional[str] = None,
300
+    **kwargs: t.Any,
301
+) -> t.Callable[[FC], FC]:
302
+    """Add a ``--version`` option which immediately prints the version
303
+    number and exits the program.
304
+
305
+    If ``version`` is not provided, Click will try to detect it using
306
+    :func:`importlib.metadata.version` to get the version for the
307
+    ``package_name``. On Python < 3.8, the ``importlib_metadata``
308
+    backport must be installed.
309
+
310
+    If ``package_name`` is not provided, Click will try to detect it by
311
+    inspecting the stack frames. This will be used to detect the
312
+    version, so it must match the name of the installed package.
313
+
314
+    :param version: The version number to show. If not provided, Click
315
+        will try to detect it.
316
+    :param param_decls: One or more option names. Defaults to the single
317
+        value ``"--version"``.
318
+    :param package_name: The package name to detect the version from. If
319
+        not provided, Click will try to detect it.
320
+    :param prog_name: The name of the CLI to show in the message. If not
321
+        provided, it will be detected from the command.
322
+    :param message: The message to show. The values ``%(prog)s``,
323
+        ``%(package)s``, and ``%(version)s`` are available. Defaults to
324
+        ``"%(prog)s, version %(version)s"``.
325
+    :param kwargs: Extra arguments are passed to :func:`option`.
326
+    :raise RuntimeError: ``version`` could not be detected.
327
+
328
+    .. versionchanged:: 8.0
329
+        Add the ``package_name`` parameter, and the ``%(package)s``
330
+        value for messages.
331
+
332
+    .. versionchanged:: 8.0
333
+        Use :mod:`importlib.metadata` instead of ``pkg_resources``. The
334
+        version is detected based on the package name, not the entry
335
+        point name. The Python package name must match the installed
336
+        package name, or be passed with ``package_name=``.
337
+    """
338
+    if message is None:
339
+        message = _("%(prog)s, version %(version)s")
340
+
341
+    if version is None and package_name is None:
342
+        frame = inspect.currentframe()
343
+        f_back = frame.f_back if frame is not None else None
344
+        f_globals = f_back.f_globals if f_back is not None else None
345
+        # break reference cycle
346
+        # https://docs.python.org/3/library/inspect.html#the-interpreter-stack
347
+        del frame
348
+
349
+        if f_globals is not None:
350
+            package_name = f_globals.get("__name__")
351
+
352
+            if package_name == "__main__":
353
+                package_name = f_globals.get("__package__")
354
+
355
+            if package_name:
356
+                package_name = package_name.partition(".")[0]
357
+
358
+    def callback(ctx: Context, param: Parameter, value: bool) -> None:
359
+        if not value or ctx.resilient_parsing:
360
+            return
361
+
362
+        nonlocal prog_name
363
+        nonlocal version
364
+
365
+        if prog_name is None:
366
+            prog_name = ctx.find_root().info_name
367
+
368
+        if version is None and package_name is not None:
369
+            metadata: t.Optional[types.ModuleType]
370
+
371
+            try:
372
+                from importlib import metadata  # type: ignore
373
+            except ImportError:
374
+                # Python < 3.8
375
+                import importlib_metadata as metadata  # type: ignore
376
+
377
+            try:
378
+                version = metadata.version(package_name)  # type: ignore
379
+            except metadata.PackageNotFoundError:  # type: ignore
380
+                raise RuntimeError(
381
+                    f"{package_name!r} is not installed. Try passing"
382
+                    " 'package_name' instead."
383
+                ) from None
384
+
385
+        if version is None:
386
+            raise RuntimeError(
387
+                f"Could not determine the version for {package_name!r} automatically."
388
+            )
389
+
390
+        echo(
391
+            t.cast(str, message)
392
+            % {"prog": prog_name, "package": package_name, "version": version},
393
+            color=ctx.color,
394
+        )
395
+        ctx.exit()
396
+
397
+    if not param_decls:
398
+        param_decls = ("--version",)
399
+
400
+    kwargs.setdefault("is_flag", True)
401
+    kwargs.setdefault("expose_value", False)
402
+    kwargs.setdefault("is_eager", True)
403
+    kwargs.setdefault("help", _("Show the version and exit."))
404
+    kwargs["callback"] = callback
405
+    return option(*param_decls, **kwargs)
406
+
407
+
408
+def help_option(*param_decls: str, **kwargs: t.Any) -> t.Callable[[FC], FC]:
409
+    """Add a ``--help`` option which immediately prints the help page
410
+    and exits the program.
411
+
412
+    This is usually unnecessary, as the ``--help`` option is added to
413
+    each command automatically unless ``add_help_option=False`` is
414
+    passed.
415
+
416
+    :param param_decls: One or more option names. Defaults to the single
417
+        value ``"--help"``.
418
+    :param kwargs: Extra arguments are passed to :func:`option`.
419
+    """
420
+
421
+    def callback(ctx: Context, param: Parameter, value: bool) -> None:
422
+        if not value or ctx.resilient_parsing:
423
+            return
424
+
425
+        echo(ctx.get_help(), color=ctx.color)
426
+        ctx.exit()
427
+
428
+    if not param_decls:
429
+        param_decls = ("--help",)
430
+
431
+    kwargs.setdefault("is_flag", True)
432
+    kwargs.setdefault("expose_value", False)
433
+    kwargs.setdefault("is_eager", True)
434
+    kwargs.setdefault("help", _("Show this message and exit."))
435
+    kwargs["callback"] = callback
436
+    return option(*param_decls, **kwargs)

+ 287
- 0
www/Files-API/.venv/lib/python3.7/site-packages/click/exceptions.py View File

@@ -0,0 +1,287 @@
1
+import os
2
+import typing as t
3
+from gettext import gettext as _
4
+from gettext import ngettext
5
+
6
+from ._compat import get_text_stderr
7
+from .utils import echo
8
+
9
+if t.TYPE_CHECKING:
10
+    from .core import Context
11
+    from .core import Parameter
12
+
13
+
14
+def _join_param_hints(
15
+    param_hint: t.Optional[t.Union[t.Sequence[str], str]]
16
+) -> t.Optional[str]:
17
+    if param_hint is not None and not isinstance(param_hint, str):
18
+        return " / ".join(repr(x) for x in param_hint)
19
+
20
+    return param_hint
21
+
22
+
23
+class ClickException(Exception):
24
+    """An exception that Click can handle and show to the user."""
25
+
26
+    #: The exit code for this exception.
27
+    exit_code = 1
28
+
29
+    def __init__(self, message: str) -> None:
30
+        super().__init__(message)
31
+        self.message = message
32
+
33
+    def format_message(self) -> str:
34
+        return self.message
35
+
36
+    def __str__(self) -> str:
37
+        return self.message
38
+
39
+    def show(self, file: t.Optional[t.IO] = None) -> None:
40
+        if file is None:
41
+            file = get_text_stderr()
42
+
43
+        echo(_("Error: {message}").format(message=self.format_message()), file=file)
44
+
45
+
46
+class UsageError(ClickException):
47
+    """An internal exception that signals a usage error.  This typically
48
+    aborts any further handling.
49
+
50
+    :param message: the error message to display.
51
+    :param ctx: optionally the context that caused this error.  Click will
52
+                fill in the context automatically in some situations.
53
+    """
54
+
55
+    exit_code = 2
56
+
57
+    def __init__(self, message: str, ctx: t.Optional["Context"] = None) -> None:
58
+        super().__init__(message)
59
+        self.ctx = ctx
60
+        self.cmd = self.ctx.command if self.ctx else None
61
+
62
+    def show(self, file: t.Optional[t.IO] = None) -> None:
63
+        if file is None:
64
+            file = get_text_stderr()
65
+        color = None
66
+        hint = ""
67
+        if (
68
+            self.ctx is not None
69
+            and self.ctx.command.get_help_option(self.ctx) is not None
70
+        ):
71
+            hint = _("Try '{command} {option}' for help.").format(
72
+                command=self.ctx.command_path, option=self.ctx.help_option_names[0]
73
+            )
74
+            hint = f"{hint}\n"
75
+        if self.ctx is not None:
76
+            color = self.ctx.color
77
+            echo(f"{self.ctx.get_usage()}\n{hint}", file=file, color=color)
78
+        echo(
79
+            _("Error: {message}").format(message=self.format_message()),
80
+            file=file,
81
+            color=color,
82
+        )
83
+
84
+
85
+class BadParameter(UsageError):
86
+    """An exception that formats out a standardized error message for a
87
+    bad parameter.  This is useful when thrown from a callback or type as
88
+    Click will attach contextual information to it (for instance, which
89
+    parameter it is).
90
+
91
+    .. versionadded:: 2.0
92
+
93
+    :param param: the parameter object that caused this error.  This can
94
+                  be left out, and Click will attach this info itself
95
+                  if possible.
96
+    :param param_hint: a string that shows up as parameter name.  This
97
+                       can be used as alternative to `param` in cases
98
+                       where custom validation should happen.  If it is
99
+                       a string it's used as such, if it's a list then
100
+                       each item is quoted and separated.
101
+    """
102
+
103
+    def __init__(
104
+        self,
105
+        message: str,
106
+        ctx: t.Optional["Context"] = None,
107
+        param: t.Optional["Parameter"] = None,
108
+        param_hint: t.Optional[str] = None,
109
+    ) -> None:
110
+        super().__init__(message, ctx)
111
+        self.param = param
112
+        self.param_hint = param_hint
113
+
114
+    def format_message(self) -> str:
115
+        if self.param_hint is not None:
116
+            param_hint = self.param_hint
117
+        elif self.param is not None:
118
+            param_hint = self.param.get_error_hint(self.ctx)  # type: ignore
119
+        else:
120
+            return _("Invalid value: {message}").format(message=self.message)
121
+
122
+        return _("Invalid value for {param_hint}: {message}").format(
123
+            param_hint=_join_param_hints(param_hint), message=self.message
124
+        )
125
+
126
+
127
+class MissingParameter(BadParameter):
128
+    """Raised if click required an option or argument but it was not
129
+    provided when invoking the script.
130
+
131
+    .. versionadded:: 4.0
132
+
133
+    :param param_type: a string that indicates the type of the parameter.
134
+                       The default is to inherit the parameter type from
135
+                       the given `param`.  Valid values are ``'parameter'``,
136
+                       ``'option'`` or ``'argument'``.
137
+    """
138
+
139
+    def __init__(
140
+        self,
141
+        message: t.Optional[str] = None,
142
+        ctx: t.Optional["Context"] = None,
143
+        param: t.Optional["Parameter"] = None,
144
+        param_hint: t.Optional[str] = None,
145
+        param_type: t.Optional[str] = None,
146
+    ) -> None:
147
+        super().__init__(message or "", ctx, param, param_hint)
148
+        self.param_type = param_type
149
+
150
+    def format_message(self) -> str:
151
+        if self.param_hint is not None:
152
+            param_hint: t.Optional[str] = self.param_hint
153
+        elif self.param is not None:
154
+            param_hint = self.param.get_error_hint(self.ctx)  # type: ignore
155
+        else:
156
+            param_hint = None
157
+
158
+        param_hint = _join_param_hints(param_hint)
159
+        param_hint = f" {param_hint}" if param_hint else ""
160
+
161
+        param_type = self.param_type
162
+        if param_type is None and self.param is not None:
163
+            param_type = self.param.param_type_name
164
+
165
+        msg = self.message
166
+        if self.param is not None:
167
+            msg_extra = self.param.type.get_missing_message(self.param)
168
+            if msg_extra:
169
+                if msg:
170
+                    msg += f". {msg_extra}"
171
+                else:
172
+                    msg = msg_extra
173
+
174
+        msg = f" {msg}" if msg else ""
175
+
176
+        # Translate param_type for known types.
177
+        if param_type == "argument":
178
+            missing = _("Missing argument")
179
+        elif param_type == "option":
180
+            missing = _("Missing option")
181
+        elif param_type == "parameter":
182
+            missing = _("Missing parameter")
183
+        else:
184
+            missing = _("Missing {param_type}").format(param_type=param_type)
185
+
186
+        return f"{missing}{param_hint}.{msg}"
187
+
188
+    def __str__(self) -> str:
189
+        if not self.message:
190
+            param_name = self.param.name if self.param else None
191
+            return _("Missing parameter: {param_name}").format(param_name=param_name)
192
+        else:
193
+            return self.message
194
+
195
+
196
+class NoSuchOption(UsageError):
197
+    """Raised if click attempted to handle an option that does not
198
+    exist.
199
+
200
+    .. versionadded:: 4.0
201
+    """
202
+
203
+    def __init__(
204
+        self,
205
+        option_name: str,
206
+        message: t.Optional[str] = None,
207
+        possibilities: t.Optional[t.Sequence[str]] = None,
208
+        ctx: t.Optional["Context"] = None,
209
+    ) -> None:
210
+        if message is None:
211
+            message = _("No such option: {name}").format(name=option_name)
212
+
213
+        super().__init__(message, ctx)
214
+        self.option_name = option_name
215
+        self.possibilities = possibilities
216
+
217
+    def format_message(self) -> str:
218
+        if not self.possibilities:
219
+            return self.message
220
+
221
+        possibility_str = ", ".join(sorted(self.possibilities))
222
+        suggest = ngettext(
223
+            "Did you mean {possibility}?",
224
+            "(Possible options: {possibilities})",
225
+            len(self.possibilities),
226
+        ).format(possibility=possibility_str, possibilities=possibility_str)
227
+        return f"{self.message} {suggest}"
228
+
229
+
230
+class BadOptionUsage(UsageError):
231
+    """Raised if an option is generally supplied but the use of the option
232
+    was incorrect.  This is for instance raised if the number of arguments
233
+    for an option is not correct.
234
+
235
+    .. versionadded:: 4.0
236
+
237
+    :param option_name: the name of the option being used incorrectly.
238
+    """
239
+
240
+    def __init__(
241
+        self, option_name: str, message: str, ctx: t.Optional["Context"] = None
242
+    ) -> None:
243
+        super().__init__(message, ctx)
244
+        self.option_name = option_name
245
+
246
+
247
+class BadArgumentUsage(UsageError):
248
+    """Raised if an argument is generally supplied but the use of the argument
249
+    was incorrect.  This is for instance raised if the number of values
250
+    for an argument is not correct.
251
+
252
+    .. versionadded:: 6.0
253
+    """
254
+
255
+
256
+class FileError(ClickException):
257
+    """Raised if a file cannot be opened."""
258
+
259
+    def __init__(self, filename: str, hint: t.Optional[str] = None) -> None:
260
+        if hint is None:
261
+            hint = _("unknown error")
262
+
263
+        super().__init__(hint)
264
+        self.ui_filename = os.fsdecode(filename)
265
+        self.filename = filename
266
+
267
+    def format_message(self) -> str:
268
+        return _("Could not open file {filename!r}: {message}").format(
269
+            filename=self.ui_filename, message=self.message
270
+        )
271
+
272
+
273
+class Abort(RuntimeError):
274
+    """An internal signalling exception that signals Click to abort."""
275
+
276
+
277
+class Exit(RuntimeError):
278
+    """An exception that indicates that the application should exit with some
279
+    status code.
280
+
281
+    :param code: the status code to exit with.
282
+    """
283
+
284
+    __slots__ = ("exit_code",)
285
+
286
+    def __init__(self, code: int = 0) -> None:
287
+        self.exit_code = code

+ 301
- 0
www/Files-API/.venv/lib/python3.7/site-packages/click/formatting.py View File

@@ -0,0 +1,301 @@
1
+import typing as t
2
+from contextlib import contextmanager
3
+from gettext import gettext as _
4
+
5
+from ._compat import term_len
6
+from .parser import split_opt
7
+
8
+# Can force a width.  This is used by the test system
9
+FORCED_WIDTH: t.Optional[int] = None
10
+
11
+
12
+def measure_table(rows: t.Iterable[t.Tuple[str, str]]) -> t.Tuple[int, ...]:
13
+    widths: t.Dict[int, int] = {}
14
+
15
+    for row in rows:
16
+        for idx, col in enumerate(row):
17
+            widths[idx] = max(widths.get(idx, 0), term_len(col))
18
+
19
+    return tuple(y for x, y in sorted(widths.items()))
20
+
21
+
22
+def iter_rows(
23
+    rows: t.Iterable[t.Tuple[str, str]], col_count: int
24
+) -> t.Iterator[t.Tuple[str, ...]]:
25
+    for row in rows:
26
+        yield row + ("",) * (col_count - len(row))
27
+
28
+
29
+def wrap_text(
30
+    text: str,
31
+    width: int = 78,
32
+    initial_indent: str = "",
33
+    subsequent_indent: str = "",
34
+    preserve_paragraphs: bool = False,
35
+) -> str:
36
+    """A helper function that intelligently wraps text.  By default, it
37
+    assumes that it operates on a single paragraph of text but if the
38
+    `preserve_paragraphs` parameter is provided it will intelligently
39
+    handle paragraphs (defined by two empty lines).
40
+
41
+    If paragraphs are handled, a paragraph can be prefixed with an empty
42
+    line containing the ``\\b`` character (``\\x08``) to indicate that
43
+    no rewrapping should happen in that block.
44
+
45
+    :param text: the text that should be rewrapped.
46
+    :param width: the maximum width for the text.
47
+    :param initial_indent: the initial indent that should be placed on the
48
+                           first line as a string.
49
+    :param subsequent_indent: the indent string that should be placed on
50
+                              each consecutive line.
51
+    :param preserve_paragraphs: if this flag is set then the wrapping will
52
+                                intelligently handle paragraphs.
53
+    """
54
+    from ._textwrap import TextWrapper
55
+
56
+    text = text.expandtabs()
57
+    wrapper = TextWrapper(
58
+        width,
59
+        initial_indent=initial_indent,
60
+        subsequent_indent=subsequent_indent,
61
+        replace_whitespace=False,
62
+    )
63
+    if not preserve_paragraphs:
64
+        return wrapper.fill(text)
65
+
66
+    p: t.List[t.Tuple[int, bool, str]] = []
67
+    buf: t.List[str] = []
68
+    indent = None
69
+
70
+    def _flush_par() -> None:
71
+        if not buf:
72
+            return
73
+        if buf[0].strip() == "\b":
74
+            p.append((indent or 0, True, "\n".join(buf[1:])))
75
+        else:
76
+            p.append((indent or 0, False, " ".join(buf)))
77
+        del buf[:]
78
+
79
+    for line in text.splitlines():
80
+        if not line:
81
+            _flush_par()
82
+            indent = None
83
+        else:
84
+            if indent is None:
85
+                orig_len = term_len(line)
86
+                line = line.lstrip()
87
+                indent = orig_len - term_len(line)
88
+            buf.append(line)
89
+    _flush_par()
90
+
91
+    rv = []
92
+    for indent, raw, text in p:
93
+        with wrapper.extra_indent(" " * indent):
94
+            if raw:
95
+                rv.append(wrapper.indent_only(text))
96
+            else:
97
+                rv.append(wrapper.fill(text))
98
+
99
+    return "\n\n".join(rv)
100
+
101
+
102
+class HelpFormatter:
103
+    """This class helps with formatting text-based help pages.  It's
104
+    usually just needed for very special internal cases, but it's also
105
+    exposed so that developers can write their own fancy outputs.
106
+
107
+    At present, it always writes into memory.
108
+
109
+    :param indent_increment: the additional increment for each level.
110
+    :param width: the width for the text.  This defaults to the terminal
111
+                  width clamped to a maximum of 78.
112
+    """
113
+
114
+    def __init__(
115
+        self,
116
+        indent_increment: int = 2,
117
+        width: t.Optional[int] = None,
118
+        max_width: t.Optional[int] = None,
119
+    ) -> None:
120
+        import shutil
121
+
122
+        self.indent_increment = indent_increment
123
+        if max_width is None:
124
+            max_width = 80
125
+        if width is None:
126
+            width = FORCED_WIDTH
127
+            if width is None:
128
+                width = max(min(shutil.get_terminal_size().columns, max_width) - 2, 50)
129
+        self.width = width
130
+        self.current_indent = 0
131
+        self.buffer: t.List[str] = []
132
+
133
+    def write(self, string: str) -> None:
134
+        """Writes a unicode string into the internal buffer."""
135
+        self.buffer.append(string)
136
+
137
+    def indent(self) -> None:
138
+        """Increases the indentation."""
139
+        self.current_indent += self.indent_increment
140
+
141
+    def dedent(self) -> None:
142
+        """Decreases the indentation."""
143
+        self.current_indent -= self.indent_increment
144
+
145
+    def write_usage(
146
+        self, prog: str, args: str = "", prefix: t.Optional[str] = None
147
+    ) -> None:
148
+        """Writes a usage line into the buffer.
149
+
150
+        :param prog: the program name.
151
+        :param args: whitespace separated list of arguments.
152
+        :param prefix: The prefix for the first line. Defaults to
153
+            ``"Usage: "``.
154
+        """
155
+        if prefix is None:
156
+            prefix = f"{_('Usage:')} "
157
+
158
+        usage_prefix = f"{prefix:>{self.current_indent}}{prog} "
159
+        text_width = self.width - self.current_indent
160
+
161
+        if text_width >= (term_len(usage_prefix) + 20):
162
+            # The arguments will fit to the right of the prefix.
163
+            indent = " " * term_len(usage_prefix)
164
+            self.write(
165
+                wrap_text(
166
+                    args,
167
+                    text_width,
168
+                    initial_indent=usage_prefix,
169
+                    subsequent_indent=indent,
170
+                )
171
+            )
172
+        else:
173
+            # The prefix is too long, put the arguments on the next line.
174
+            self.write(usage_prefix)
175
+            self.write("\n")
176
+            indent = " " * (max(self.current_indent, term_len(prefix)) + 4)
177
+            self.write(
178
+                wrap_text(
179
+                    args, text_width, initial_indent=indent, subsequent_indent=indent
180
+                )
181
+            )
182
+
183
+        self.write("\n")
184
+
185
+    def write_heading(self, heading: str) -> None:
186
+        """Writes a heading into the buffer."""
187
+        self.write(f"{'':>{self.current_indent}}{heading}:\n")
188
+
189
+    def write_paragraph(self) -> None:
190
+        """Writes a paragraph into the buffer."""
191
+        if self.buffer:
192
+            self.write("\n")
193
+
194
+    def write_text(self, text: str) -> None:
195
+        """Writes re-indented text into the buffer.  This rewraps and
196
+        preserves paragraphs.
197
+        """
198
+        indent = " " * self.current_indent
199
+        self.write(
200
+            wrap_text(
201
+                text,
202
+                self.width,
203
+                initial_indent=indent,
204
+                subsequent_indent=indent,
205
+                preserve_paragraphs=True,
206
+            )
207
+        )
208
+        self.write("\n")
209
+
210
+    def write_dl(
211
+        self,
212
+        rows: t.Sequence[t.Tuple[str, str]],
213
+        col_max: int = 30,
214
+        col_spacing: int = 2,
215
+    ) -> None:
216
+        """Writes a definition list into the buffer.  This is how options
217
+        and commands are usually formatted.
218
+
219
+        :param rows: a list of two item tuples for the terms and values.
220
+        :param col_max: the maximum width of the first column.
221
+        :param col_spacing: the number of spaces between the first and
222
+                            second column.
223
+        """
224
+        rows = list(rows)
225
+        widths = measure_table(rows)
226
+        if len(widths) != 2:
227
+            raise TypeError("Expected two columns for definition list")
228
+
229
+        first_col = min(widths[0], col_max) + col_spacing
230
+
231
+        for first, second in iter_rows(rows, len(widths)):
232
+            self.write(f"{'':>{self.current_indent}}{first}")
233
+            if not second:
234
+                self.write("\n")
235
+                continue
236
+            if term_len(first) <= first_col - col_spacing:
237
+                self.write(" " * (first_col - term_len(first)))
238
+            else:
239
+                self.write("\n")
240
+                self.write(" " * (first_col + self.current_indent))
241
+
242
+            text_width = max(self.width - first_col - 2, 10)
243
+            wrapped_text = wrap_text(second, text_width, preserve_paragraphs=True)
244
+            lines = wrapped_text.splitlines()
245
+
246
+            if lines:
247
+                self.write(f"{lines[0]}\n")
248
+
249
+                for line in lines[1:]:
250
+                    self.write(f"{'':>{first_col + self.current_indent}}{line}\n")
251
+            else:
252
+                self.write("\n")
253
+
254
+    @contextmanager
255
+    def section(self, name: str) -> t.Iterator[None]:
256
+        """Helpful context manager that writes a paragraph, a heading,
257
+        and the indents.
258
+
259
+        :param name: the section name that is written as heading.
260
+        """
261
+        self.write_paragraph()
262
+        self.write_heading(name)
263
+        self.indent()
264
+        try:
265
+            yield
266
+        finally:
267
+            self.dedent()
268
+
269
+    @contextmanager
270
+    def indentation(self) -> t.Iterator[None]:
271
+        """A context manager that increases the indentation."""
272
+        self.indent()
273
+        try:
274
+            yield
275
+        finally:
276
+            self.dedent()
277
+
278
+    def getvalue(self) -> str:
279
+        """Returns the buffer contents."""
280
+        return "".join(self.buffer)
281
+
282
+
283
+def join_options(options: t.Sequence[str]) -> t.Tuple[str, bool]:
284
+    """Given a list of option strings this joins them in the most appropriate
285
+    way and returns them in the form ``(formatted_string,
286
+    any_prefix_is_slash)`` where the second item in the tuple is a flag that
287
+    indicates if any of the option prefixes was a slash.
288
+    """
289
+    rv = []
290
+    any_prefix_is_slash = False
291
+
292
+    for opt in options:
293
+        prefix = split_opt(opt)[0]
294
+
295
+        if prefix == "/":
296
+            any_prefix_is_slash = True
297
+
298
+        rv.append((len(prefix), opt))
299
+
300
+    rv.sort(key=lambda x: x[0])
301
+    return ", ".join(x[1] for x in rv), any_prefix_is_slash

+ 69
- 0
www/Files-API/.venv/lib/python3.7/site-packages/click/globals.py View File

@@ -0,0 +1,69 @@
1
+import typing
2
+import typing as t
3
+from threading import local
4
+
5
+if t.TYPE_CHECKING:
6
+    import typing_extensions as te
7
+    from .core import Context
8
+
9
+_local = local()
10
+
11
+
12
+@typing.overload
13
+def get_current_context(silent: "te.Literal[False]" = False) -> "Context":
14
+    ...
15
+
16
+
17
+@typing.overload
18
+def get_current_context(silent: bool = ...) -> t.Optional["Context"]:
19
+    ...
20
+
21
+
22
+def get_current_context(silent: bool = False) -> t.Optional["Context"]:
23
+    """Returns the current click context.  This can be used as a way to
24
+    access the current context object from anywhere.  This is a more implicit
25
+    alternative to the :func:`pass_context` decorator.  This function is
26
+    primarily useful for helpers such as :func:`echo` which might be
27
+    interested in changing its behavior based on the current context.
28
+
29
+    To push the current context, :meth:`Context.scope` can be used.
30
+
31
+    .. versionadded:: 5.0
32
+
33
+    :param silent: if set to `True` the return value is `None` if no context
34
+                   is available.  The default behavior is to raise a
35
+                   :exc:`RuntimeError`.
36
+    """
37
+    try:
38
+        return t.cast("Context", _local.stack[-1])
39
+    except (AttributeError, IndexError) as e:
40
+        if not silent:
41
+            raise RuntimeError("There is no active click context.") from e
42
+
43
+    return None
44
+
45
+
46
+def push_context(ctx: "Context") -> None:
47
+    """Pushes a new context to the current stack."""
48
+    _local.__dict__.setdefault("stack", []).append(ctx)
49
+
50
+
51
+def pop_context() -> None:
52
+    """Removes the top level from the stack."""
53
+    _local.stack.pop()
54
+
55
+
56
+def resolve_color_default(color: t.Optional[bool] = None) -> t.Optional[bool]:
57
+    """Internal helper to get the default value of the color flag.  If a
58
+    value is passed it's returned unchanged, otherwise it's looked up from
59
+    the current context.
60
+    """
61
+    if color is not None:
62
+        return color
63
+
64
+    ctx = get_current_context(silent=True)
65
+
66
+    if ctx is not None:
67
+        return ctx.color
68
+
69
+    return None

+ 529
- 0
www/Files-API/.venv/lib/python3.7/site-packages/click/parser.py View File

@@ -0,0 +1,529 @@
1
+"""
2
+This module started out as largely a copy paste from the stdlib's
3
+optparse module with the features removed that we do not need from
4
+optparse because we implement them in Click on a higher level (for
5
+instance type handling, help formatting and a lot more).
6
+
7
+The plan is to remove more and more from here over time.
8
+
9
+The reason this is a different module and not optparse from the stdlib
10
+is that there are differences in 2.x and 3.x about the error messages
11
+generated and optparse in the stdlib uses gettext for no good reason
12
+and might cause us issues.
13
+
14
+Click uses parts of optparse written by Gregory P. Ward and maintained
15
+by the Python Software Foundation. This is limited to code in parser.py.
16
+
17
+Copyright 2001-2006 Gregory P. Ward. All rights reserved.
18
+Copyright 2002-2006 Python Software Foundation. All rights reserved.
19
+"""
20
+# This code uses parts of optparse written by Gregory P. Ward and
21
+# maintained by the Python Software Foundation.
22
+# Copyright 2001-2006 Gregory P. Ward
23
+# Copyright 2002-2006 Python Software Foundation
24
+import typing as t
25
+from collections import deque
26
+from gettext import gettext as _
27
+from gettext import ngettext
28
+
29
+from .exceptions import BadArgumentUsage
30
+from .exceptions import BadOptionUsage
31
+from .exceptions import NoSuchOption
32
+from .exceptions import UsageError
33
+
34
+if t.TYPE_CHECKING:
35
+    import typing_extensions as te
36
+    from .core import Argument as CoreArgument
37
+    from .core import Context
38
+    from .core import Option as CoreOption
39
+    from .core import Parameter as CoreParameter
40
+
41
+V = t.TypeVar("V")
42
+
43
+# Sentinel value that indicates an option was passed as a flag without a
44
+# value but is not a flag option. Option.consume_value uses this to
45
+# prompt or use the flag_value.
46
+_flag_needs_value = object()
47
+
48
+
49
+def _unpack_args(
50
+    args: t.Sequence[str], nargs_spec: t.Sequence[int]
51
+) -> t.Tuple[t.Sequence[t.Union[str, t.Sequence[t.Optional[str]], None]], t.List[str]]:
52
+    """Given an iterable of arguments and an iterable of nargs specifications,
53
+    it returns a tuple with all the unpacked arguments at the first index
54
+    and all remaining arguments as the second.
55
+
56
+    The nargs specification is the number of arguments that should be consumed
57
+    or `-1` to indicate that this position should eat up all the remainders.
58
+
59
+    Missing items are filled with `None`.
60
+    """
61
+    args = deque(args)
62
+    nargs_spec = deque(nargs_spec)
63
+    rv: t.List[t.Union[str, t.Tuple[t.Optional[str], ...], None]] = []
64
+    spos: t.Optional[int] = None
65
+
66
+    def _fetch(c: "te.Deque[V]") -> t.Optional[V]:
67
+        try:
68
+            if spos is None:
69
+                return c.popleft()
70
+            else:
71
+                return c.pop()
72
+        except IndexError:
73
+            return None
74
+
75
+    while nargs_spec:
76
+        nargs = _fetch(nargs_spec)
77
+
78
+        if nargs is None:
79
+            continue
80
+
81
+        if nargs == 1:
82
+            rv.append(_fetch(args))
83
+        elif nargs > 1:
84
+            x = [_fetch(args) for _ in range(nargs)]
85
+
86
+            # If we're reversed, we're pulling in the arguments in reverse,
87
+            # so we need to turn them around.
88
+            if spos is not None:
89
+                x.reverse()
90
+
91
+            rv.append(tuple(x))
92
+        elif nargs < 0:
93
+            if spos is not None:
94
+                raise TypeError("Cannot have two nargs < 0")
95
+
96
+            spos = len(rv)
97
+            rv.append(None)
98
+
99
+    # spos is the position of the wildcard (star).  If it's not `None`,
100
+    # we fill it with the remainder.
101
+    if spos is not None:
102
+        rv[spos] = tuple(args)
103
+        args = []
104
+        rv[spos + 1 :] = reversed(rv[spos + 1 :])
105
+
106
+    return tuple(rv), list(args)
107
+
108
+
109
+def split_opt(opt: str) -> t.Tuple[str, str]:
110
+    first = opt[:1]
111
+    if first.isalnum():
112
+        return "", opt
113
+    if opt[1:2] == first:
114
+        return opt[:2], opt[2:]
115
+    return first, opt[1:]
116
+
117
+
118
+def normalize_opt(opt: str, ctx: t.Optional["Context"]) -> str:
119
+    if ctx is None or ctx.token_normalize_func is None:
120
+        return opt
121
+    prefix, opt = split_opt(opt)
122
+    return f"{prefix}{ctx.token_normalize_func(opt)}"
123
+
124
+
125
+def split_arg_string(string: str) -> t.List[str]:
126
+    """Split an argument string as with :func:`shlex.split`, but don't
127
+    fail if the string is incomplete. Ignores a missing closing quote or
128
+    incomplete escape sequence and uses the partial token as-is.
129
+
130
+    .. code-block:: python
131
+
132
+        split_arg_string("example 'my file")
133
+        ["example", "my file"]
134
+
135
+        split_arg_string("example my\\")
136
+        ["example", "my"]
137
+
138
+    :param string: String to split.
139
+    """
140
+    import shlex
141
+
142
+    lex = shlex.shlex(string, posix=True)
143
+    lex.whitespace_split = True
144
+    lex.commenters = ""
145
+    out = []
146
+
147
+    try:
148
+        for token in lex:
149
+            out.append(token)
150
+    except ValueError:
151
+        # Raised when end-of-string is reached in an invalid state. Use
152
+        # the partial token as-is. The quote or escape character is in
153
+        # lex.state, not lex.token.
154
+        out.append(lex.token)
155
+
156
+    return out
157
+
158
+
159
+class Option:
160
+    def __init__(
161
+        self,
162
+        obj: "CoreOption",
163
+        opts: t.Sequence[str],
164
+        dest: t.Optional[str],
165
+        action: t.Optional[str] = None,
166
+        nargs: int = 1,
167
+        const: t.Optional[t.Any] = None,
168
+    ):
169
+        self._short_opts = []
170
+        self._long_opts = []
171
+        self.prefixes = set()
172
+
173
+        for opt in opts:
174
+            prefix, value = split_opt(opt)
175
+            if not prefix:
176
+                raise ValueError(f"Invalid start character for option ({opt})")
177
+            self.prefixes.add(prefix[0])
178
+            if len(prefix) == 1 and len(value) == 1:
179
+                self._short_opts.append(opt)
180
+            else:
181
+                self._long_opts.append(opt)
182
+                self.prefixes.add(prefix)
183
+
184
+        if action is None:
185
+            action = "store"
186
+
187
+        self.dest = dest
188
+        self.action = action
189
+        self.nargs = nargs
190
+        self.const = const
191
+        self.obj = obj
192
+
193
+    @property
194
+    def takes_value(self) -> bool:
195
+        return self.action in ("store", "append")
196
+
197
+    def process(self, value: str, state: "ParsingState") -> None:
198
+        if self.action == "store":
199
+            state.opts[self.dest] = value  # type: ignore
200
+        elif self.action == "store_const":
201
+            state.opts[self.dest] = self.const  # type: ignore
202
+        elif self.action == "append":
203
+            state.opts.setdefault(self.dest, []).append(value)  # type: ignore
204
+        elif self.action == "append_const":
205
+            state.opts.setdefault(self.dest, []).append(self.const)  # type: ignore
206
+        elif self.action == "count":
207
+            state.opts[self.dest] = state.opts.get(self.dest, 0) + 1  # type: ignore
208
+        else:
209
+            raise ValueError(f"unknown action '{self.action}'")
210
+        state.order.append(self.obj)
211
+
212
+
213
+class Argument:
214
+    def __init__(self, obj: "CoreArgument", dest: t.Optional[str], nargs: int = 1):
215
+        self.dest = dest
216
+        self.nargs = nargs
217
+        self.obj = obj
218
+
219
+    def process(
220
+        self,
221
+        value: t.Union[t.Optional[str], t.Sequence[t.Optional[str]]],
222
+        state: "ParsingState",
223
+    ) -> None:
224
+        if self.nargs > 1:
225
+            assert value is not None
226
+            holes = sum(1 for x in value if x is None)
227
+            if holes == len(value):
228
+                value = None
229
+            elif holes != 0:
230
+                raise BadArgumentUsage(
231
+                    _("Argument {name!r} takes {nargs} values.").format(
232
+                        name=self.dest, nargs=self.nargs
233
+                    )
234
+                )
235
+
236
+        if self.nargs == -1 and self.obj.envvar is not None and value == ():
237
+            # Replace empty tuple with None so that a value from the
238
+            # environment may be tried.
239
+            value = None
240
+
241
+        state.opts[self.dest] = value  # type: ignore
242
+        state.order.append(self.obj)
243
+
244
+
245
+class ParsingState:
246
+    def __init__(self, rargs: t.List[str]) -> None:
247
+        self.opts: t.Dict[str, t.Any] = {}
248
+        self.largs: t.List[str] = []
249
+        self.rargs = rargs
250
+        self.order: t.List["CoreParameter"] = []
251
+
252
+
253
+class OptionParser:
254
+    """The option parser is an internal class that is ultimately used to
255
+    parse options and arguments.  It's modelled after optparse and brings
256
+    a similar but vastly simplified API.  It should generally not be used
257
+    directly as the high level Click classes wrap it for you.
258
+
259
+    It's not nearly as extensible as optparse or argparse as it does not
260
+    implement features that are implemented on a higher level (such as
261
+    types or defaults).
262
+
263
+    :param ctx: optionally the :class:`~click.Context` where this parser
264
+                should go with.
265
+    """
266
+
267
+    def __init__(self, ctx: t.Optional["Context"] = None) -> None:
268
+        #: The :class:`~click.Context` for this parser.  This might be
269
+        #: `None` for some advanced use cases.
270
+        self.ctx = ctx
271
+        #: This controls how the parser deals with interspersed arguments.
272
+        #: If this is set to `False`, the parser will stop on the first
273
+        #: non-option.  Click uses this to implement nested subcommands
274
+        #: safely.
275
+        self.allow_interspersed_args = True
276
+        #: This tells the parser how to deal with unknown options.  By
277
+        #: default it will error out (which is sensible), but there is a
278
+        #: second mode where it will ignore it and continue processing
279
+        #: after shifting all the unknown options into the resulting args.
280
+        self.ignore_unknown_options = False
281
+
282
+        if ctx is not None:
283
+            self.allow_interspersed_args = ctx.allow_interspersed_args
284
+            self.ignore_unknown_options = ctx.ignore_unknown_options
285
+
286
+        self._short_opt: t.Dict[str, Option] = {}
287
+        self._long_opt: t.Dict[str, Option] = {}
288
+        self._opt_prefixes = {"-", "--"}
289
+        self._args: t.List[Argument] = []
290
+
291
+    def add_option(
292
+        self,
293
+        obj: "CoreOption",
294
+        opts: t.Sequence[str],
295
+        dest: t.Optional[str],
296
+        action: t.Optional[str] = None,
297
+        nargs: int = 1,
298
+        const: t.Optional[t.Any] = None,
299
+    ) -> None:
300
+        """Adds a new option named `dest` to the parser.  The destination
301
+        is not inferred (unlike with optparse) and needs to be explicitly
302
+        provided.  Action can be any of ``store``, ``store_const``,
303
+        ``append``, ``append_const`` or ``count``.
304
+
305
+        The `obj` can be used to identify the option in the order list
306
+        that is returned from the parser.
307
+        """
308
+        opts = [normalize_opt(opt, self.ctx) for opt in opts]
309
+        option = Option(obj, opts, dest, action=action, nargs=nargs, const=const)
310
+        self._opt_prefixes.update(option.prefixes)
311
+        for opt in option._short_opts:
312
+            self._short_opt[opt] = option
313
+        for opt in option._long_opts:
314
+            self._long_opt[opt] = option
315
+
316
+    def add_argument(
317
+        self, obj: "CoreArgument", dest: t.Optional[str], nargs: int = 1
318
+    ) -> None:
319
+        """Adds a positional argument named `dest` to the parser.
320
+
321
+        The `obj` can be used to identify the option in the order list
322
+        that is returned from the parser.
323
+        """
324
+        self._args.append(Argument(obj, dest=dest, nargs=nargs))
325
+
326
+    def parse_args(
327
+        self, args: t.List[str]
328
+    ) -> t.Tuple[t.Dict[str, t.Any], t.List[str], t.List["CoreParameter"]]:
329
+        """Parses positional arguments and returns ``(values, args, order)``
330
+        for the parsed options and arguments as well as the leftover
331
+        arguments if there are any.  The order is a list of objects as they
332
+        appear on the command line.  If arguments appear multiple times they
333
+        will be memorized multiple times as well.
334
+        """
335
+        state = ParsingState(args)
336
+        try:
337
+            self._process_args_for_options(state)
338
+            self._process_args_for_args(state)
339
+        except UsageError:
340
+            if self.ctx is None or not self.ctx.resilient_parsing:
341
+                raise
342
+        return state.opts, state.largs, state.order
343
+
344
+    def _process_args_for_args(self, state: ParsingState) -> None:
345
+        pargs, args = _unpack_args(
346
+            state.largs + state.rargs, [x.nargs for x in self._args]
347
+        )
348
+
349
+        for idx, arg in enumerate(self._args):
350
+            arg.process(pargs[idx], state)
351
+
352
+        state.largs = args
353
+        state.rargs = []
354
+
355
+    def _process_args_for_options(self, state: ParsingState) -> None:
356
+        while state.rargs:
357
+            arg = state.rargs.pop(0)
358
+            arglen = len(arg)
359
+            # Double dashes always handled explicitly regardless of what
360
+            # prefixes are valid.
361
+            if arg == "--":
362
+                return
363
+            elif arg[:1] in self._opt_prefixes and arglen > 1:
364
+                self._process_opts(arg, state)
365
+            elif self.allow_interspersed_args:
366
+                state.largs.append(arg)
367
+            else:
368
+                state.rargs.insert(0, arg)
369
+                return
370
+
371
+        # Say this is the original argument list:
372
+        # [arg0, arg1, ..., arg(i-1), arg(i), arg(i+1), ..., arg(N-1)]
373
+        #                            ^
374
+        # (we are about to process arg(i)).
375
+        #
376
+        # Then rargs is [arg(i), ..., arg(N-1)] and largs is a *subset* of
377
+        # [arg0, ..., arg(i-1)] (any options and their arguments will have
378
+        # been removed from largs).
379
+        #
380
+        # The while loop will usually consume 1 or more arguments per pass.
381
+        # If it consumes 1 (eg. arg is an option that takes no arguments),
382
+        # then after _process_arg() is done the situation is:
383
+        #
384
+        #   largs = subset of [arg0, ..., arg(i)]
385
+        #   rargs = [arg(i+1), ..., arg(N-1)]
386
+        #
387
+        # If allow_interspersed_args is false, largs will always be
388
+        # *empty* -- still a subset of [arg0, ..., arg(i-1)], but
389
+        # not a very interesting subset!
390
+
391
+    def _match_long_opt(
392
+        self, opt: str, explicit_value: t.Optional[str], state: ParsingState
393
+    ) -> None:
394
+        if opt not in self._long_opt:
395
+            from difflib import get_close_matches
396
+
397
+            possibilities = get_close_matches(opt, self._long_opt)
398
+            raise NoSuchOption(opt, possibilities=possibilities, ctx=self.ctx)
399
+
400
+        option = self._long_opt[opt]
401
+        if option.takes_value:
402
+            # At this point it's safe to modify rargs by injecting the
403
+            # explicit value, because no exception is raised in this
404
+            # branch.  This means that the inserted value will be fully
405
+            # consumed.
406
+            if explicit_value is not None:
407
+                state.rargs.insert(0, explicit_value)
408
+
409
+            value = self._get_value_from_state(opt, option, state)
410
+
411
+        elif explicit_value is not None:
412
+            raise BadOptionUsage(
413
+                opt, _("Option {name!r} does not take a value.").format(name=opt)
414
+            )
415
+
416
+        else:
417
+            value = None
418
+
419
+        option.process(value, state)
420
+
421
+    def _match_short_opt(self, arg: str, state: ParsingState) -> None:
422
+        stop = False
423
+        i = 1
424
+        prefix = arg[0]
425
+        unknown_options = []
426
+
427
+        for ch in arg[1:]:
428
+            opt = normalize_opt(f"{prefix}{ch}", self.ctx)
429
+            option = self._short_opt.get(opt)
430
+            i += 1
431
+
432
+            if not option:
433
+                if self.ignore_unknown_options:
434
+                    unknown_options.append(ch)
435
+                    continue
436
+                raise NoSuchOption(opt, ctx=self.ctx)
437
+            if option.takes_value:
438
+                # Any characters left in arg?  Pretend they're the
439
+                # next arg, and stop consuming characters of arg.
440
+                if i < len(arg):
441
+                    state.rargs.insert(0, arg[i:])
442
+                    stop = True
443
+
444
+                value = self._get_value_from_state(opt, option, state)
445
+
446
+            else:
447
+                value = None
448
+
449
+            option.process(value, state)
450
+
451
+            if stop:
452
+                break
453
+
454
+        # If we got any unknown options we re-combinate the string of the
455
+        # remaining options and re-attach the prefix, then report that
456
+        # to the state as new larg.  This way there is basic combinatorics
457
+        # that can be achieved while still ignoring unknown arguments.
458
+        if self.ignore_unknown_options and unknown_options:
459
+            state.largs.append(f"{prefix}{''.join(unknown_options)}")
460
+
461
+    def _get_value_from_state(
462
+        self, option_name: str, option: Option, state: ParsingState
463
+    ) -> t.Any:
464
+        nargs = option.nargs
465
+
466
+        if len(state.rargs) < nargs:
467
+            if option.obj._flag_needs_value:
468
+                # Option allows omitting the value.
469
+                value = _flag_needs_value
470
+            else:
471
+                raise BadOptionUsage(
472
+                    option_name,
473
+                    ngettext(
474
+                        "Option {name!r} requires an argument.",
475
+                        "Option {name!r} requires {nargs} arguments.",
476
+                        nargs,
477
+                    ).format(name=option_name, nargs=nargs),
478
+                )
479
+        elif nargs == 1:
480
+            next_rarg = state.rargs[0]
481
+
482
+            if (
483
+                option.obj._flag_needs_value
484
+                and isinstance(next_rarg, str)
485
+                and next_rarg[:1] in self._opt_prefixes
486
+                and len(next_rarg) > 1
487
+            ):
488
+                # The next arg looks like the start of an option, don't
489
+                # use it as the value if omitting the value is allowed.
490
+                value = _flag_needs_value
491
+            else:
492
+                value = state.rargs.pop(0)
493
+        else:
494
+            value = tuple(state.rargs[:nargs])
495
+            del state.rargs[:nargs]
496
+
497
+        return value
498
+
499
+    def _process_opts(self, arg: str, state: ParsingState) -> None:
500
+        explicit_value = None
501
+        # Long option handling happens in two parts.  The first part is
502
+        # supporting explicitly attached values.  In any case, we will try
503
+        # to long match the option first.
504
+        if "=" in arg:
505
+            long_opt, explicit_value = arg.split("=", 1)
506
+        else:
507
+            long_opt = arg
508
+        norm_long_opt = normalize_opt(long_opt, self.ctx)
509
+
510
+        # At this point we will match the (assumed) long option through
511
+        # the long option matching code.  Note that this allows options
512
+        # like "-foo" to be matched as long options.
513
+        try:
514
+            self._match_long_opt(norm_long_opt, explicit_value, state)
515
+        except NoSuchOption:
516
+            # At this point the long option matching failed, and we need
517
+            # to try with short options.  However there is a special rule
518
+            # which says, that if we have a two character options prefix
519
+            # (applies to "--foo" for instance), we do not dispatch to the
520
+            # short option code and will instead raise the no option
521
+            # error.
522
+            if arg[:2] not in self._opt_prefixes:
523
+                self._match_short_opt(arg, state)
524
+                return
525
+
526
+            if not self.ignore_unknown_options:
527
+                raise
528
+
529
+            state.largs.append(arg)

+ 0
- 0
www/Files-API/.venv/lib/python3.7/site-packages/click/py.typed View File


+ 581
- 0
www/Files-API/.venv/lib/python3.7/site-packages/click/shell_completion.py View File

@@ -0,0 +1,581 @@
1
+import os
2
+import re
3
+import typing as t
4
+from gettext import gettext as _
5
+
6
+from .core import Argument
7
+from .core import BaseCommand
8
+from .core import Context
9
+from .core import MultiCommand
10
+from .core import Option
11
+from .core import Parameter
12
+from .core import ParameterSource
13
+from .parser import split_arg_string
14
+from .utils import echo
15
+
16
+
17
+def shell_complete(
18
+    cli: BaseCommand,
19
+    ctx_args: t.Dict[str, t.Any],
20
+    prog_name: str,
21
+    complete_var: str,
22
+    instruction: str,
23
+) -> int:
24
+    """Perform shell completion for the given CLI program.
25
+
26
+    :param cli: Command being called.
27
+    :param ctx_args: Extra arguments to pass to
28
+        ``cli.make_context``.
29
+    :param prog_name: Name of the executable in the shell.
30
+    :param complete_var: Name of the environment variable that holds
31
+        the completion instruction.
32
+    :param instruction: Value of ``complete_var`` with the completion
33
+        instruction and shell, in the form ``instruction_shell``.
34
+    :return: Status code to exit with.
35
+    """
36
+    shell, _, instruction = instruction.partition("_")
37
+    comp_cls = get_completion_class(shell)
38
+
39
+    if comp_cls is None:
40
+        return 1
41
+
42
+    comp = comp_cls(cli, ctx_args, prog_name, complete_var)
43
+
44
+    if instruction == "source":
45
+        echo(comp.source())
46
+        return 0
47
+
48
+    if instruction == "complete":
49
+        echo(comp.complete())
50
+        return 0
51
+
52
+    return 1
53
+
54
+
55
+class CompletionItem:
56
+    """Represents a completion value and metadata about the value. The
57
+    default metadata is ``type`` to indicate special shell handling,
58
+    and ``help`` if a shell supports showing a help string next to the
59
+    value.
60
+
61
+    Arbitrary parameters can be passed when creating the object, and
62
+    accessed using ``item.attr``. If an attribute wasn't passed,
63
+    accessing it returns ``None``.
64
+
65
+    :param value: The completion suggestion.
66
+    :param type: Tells the shell script to provide special completion
67
+        support for the type. Click uses ``"dir"`` and ``"file"``.
68
+    :param help: String shown next to the value if supported.
69
+    :param kwargs: Arbitrary metadata. The built-in implementations
70
+        don't use this, but custom type completions paired with custom
71
+        shell support could use it.
72
+    """
73
+
74
+    __slots__ = ("value", "type", "help", "_info")
75
+
76
+    def __init__(
77
+        self,
78
+        value: t.Any,
79
+        type: str = "plain",
80
+        help: t.Optional[str] = None,
81
+        **kwargs: t.Any,
82
+    ) -> None:
83
+        self.value = value
84
+        self.type = type
85
+        self.help = help
86
+        self._info = kwargs
87
+
88
+    def __getattr__(self, name: str) -> t.Any:
89
+        return self._info.get(name)
90
+
91
+
92
+# Only Bash >= 4.4 has the nosort option.
93
+_SOURCE_BASH = """\
94
+%(complete_func)s() {
95
+    local IFS=$'\\n'
96
+    local response
97
+
98
+    response=$(env COMP_WORDS="${COMP_WORDS[*]}" COMP_CWORD=$COMP_CWORD \
99
+%(complete_var)s=bash_complete $1)
100
+
101
+    for completion in $response; do
102
+        IFS=',' read type value <<< "$completion"
103
+
104
+        if [[ $type == 'dir' ]]; then
105
+            COMREPLY=()
106
+            compopt -o dirnames
107
+        elif [[ $type == 'file' ]]; then
108
+            COMREPLY=()
109
+            compopt -o default
110
+        elif [[ $type == 'plain' ]]; then
111
+            COMPREPLY+=($value)
112
+        fi
113
+    done
114
+
115
+    return 0
116
+}
117
+
118
+%(complete_func)s_setup() {
119
+    complete -o nosort -F %(complete_func)s %(prog_name)s
120
+}
121
+
122
+%(complete_func)s_setup;
123
+"""
124
+
125
+_SOURCE_ZSH = """\
126
+#compdef %(prog_name)s
127
+
128
+%(complete_func)s() {
129
+    local -a completions
130
+    local -a completions_with_descriptions
131
+    local -a response
132
+    (( ! $+commands[%(prog_name)s] )) && return 1
133
+
134
+    response=("${(@f)$(env COMP_WORDS="${words[*]}" COMP_CWORD=$((CURRENT-1)) \
135
+%(complete_var)s=zsh_complete %(prog_name)s)}")
136
+
137
+    for type key descr in ${response}; do
138
+        if [[ "$type" == "plain" ]]; then
139
+            if [[ "$descr" == "_" ]]; then
140
+                completions+=("$key")
141
+            else
142
+                completions_with_descriptions+=("$key":"$descr")
143
+            fi
144
+        elif [[ "$type" == "dir" ]]; then
145
+            _path_files -/
146
+        elif [[ "$type" == "file" ]]; then
147
+            _path_files -f
148
+        fi
149
+    done
150
+
151
+    if [ -n "$completions_with_descriptions" ]; then
152
+        _describe -V unsorted completions_with_descriptions -U
153
+    fi
154
+
155
+    if [ -n "$completions" ]; then
156
+        compadd -U -V unsorted -a completions
157
+    fi
158
+}
159
+
160
+compdef %(complete_func)s %(prog_name)s;
161
+"""
162
+
163
+_SOURCE_FISH = """\
164
+function %(complete_func)s;
165
+    set -l response;
166
+
167
+    for value in (env %(complete_var)s=fish_complete COMP_WORDS=(commandline -cp) \
168
+COMP_CWORD=(commandline -t) %(prog_name)s);
169
+        set response $response $value;
170
+    end;
171
+
172
+    for completion in $response;
173
+        set -l metadata (string split "," $completion);
174
+
175
+        if test $metadata[1] = "dir";
176
+            __fish_complete_directories $metadata[2];
177
+        else if test $metadata[1] = "file";
178
+            __fish_complete_path $metadata[2];
179
+        else if test $metadata[1] = "plain";
180
+            echo $metadata[2];
181
+        end;
182
+    end;
183
+end;
184
+
185
+complete --no-files --command %(prog_name)s --arguments \
186
+"(%(complete_func)s)";
187
+"""
188
+
189
+
190
+class ShellComplete:
191
+    """Base class for providing shell completion support. A subclass for
192
+    a given shell will override attributes and methods to implement the
193
+    completion instructions (``source`` and ``complete``).
194
+
195
+    :param cli: Command being called.
196
+    :param prog_name: Name of the executable in the shell.
197
+    :param complete_var: Name of the environment variable that holds
198
+        the completion instruction.
199
+
200
+    .. versionadded:: 8.0
201
+    """
202
+
203
+    name: t.ClassVar[str]
204
+    """Name to register the shell as with :func:`add_completion_class`.
205
+    This is used in completion instructions (``{name}_source`` and
206
+    ``{name}_complete``).
207
+    """
208
+
209
+    source_template: t.ClassVar[str]
210
+    """Completion script template formatted by :meth:`source`. This must
211
+    be provided by subclasses.
212
+    """
213
+
214
+    def __init__(
215
+        self,
216
+        cli: BaseCommand,
217
+        ctx_args: t.Dict[str, t.Any],
218
+        prog_name: str,
219
+        complete_var: str,
220
+    ) -> None:
221
+        self.cli = cli
222
+        self.ctx_args = ctx_args
223
+        self.prog_name = prog_name
224
+        self.complete_var = complete_var
225
+
226
+    @property
227
+    def func_name(self) -> str:
228
+        """The name of the shell function defined by the completion
229
+        script.
230
+        """
231
+        safe_name = re.sub(r"\W*", "", self.prog_name.replace("-", "_"), re.ASCII)
232
+        return f"_{safe_name}_completion"
233
+
234
+    def source_vars(self) -> t.Dict[str, t.Any]:
235
+        """Vars for formatting :attr:`source_template`.
236
+
237
+        By default this provides ``complete_func``, ``complete_var``,
238
+        and ``prog_name``.
239
+        """
240
+        return {
241
+            "complete_func": self.func_name,
242
+            "complete_var": self.complete_var,
243
+            "prog_name": self.prog_name,
244
+        }
245
+
246
+    def source(self) -> str:
247
+        """Produce the shell script that defines the completion
248
+        function. By default this ``%``-style formats
249
+        :attr:`source_template` with the dict returned by
250
+        :meth:`source_vars`.
251
+        """
252
+        return self.source_template % self.source_vars()
253
+
254
+    def get_completion_args(self) -> t.Tuple[t.List[str], str]:
255
+        """Use the env vars defined by the shell script to return a
256
+        tuple of ``args, incomplete``. This must be implemented by
257
+        subclasses.
258
+        """
259
+        raise NotImplementedError
260
+
261
+    def get_completions(
262
+        self, args: t.List[str], incomplete: str
263
+    ) -> t.List[CompletionItem]:
264
+        """Determine the context and last complete command or parameter
265
+        from the complete args. Call that object's ``shell_complete``
266
+        method to get the completions for the incomplete value.
267
+
268
+        :param args: List of complete args before the incomplete value.
269
+        :param incomplete: Value being completed. May be empty.
270
+        """
271
+        ctx = _resolve_context(self.cli, self.ctx_args, self.prog_name, args)
272
+        obj, incomplete = _resolve_incomplete(ctx, args, incomplete)
273
+        return obj.shell_complete(ctx, incomplete)
274
+
275
+    def format_completion(self, item: CompletionItem) -> str:
276
+        """Format a completion item into the form recognized by the
277
+        shell script. This must be implemented by subclasses.
278
+
279
+        :param item: Completion item to format.
280
+        """
281
+        raise NotImplementedError
282
+
283
+    def complete(self) -> str:
284
+        """Produce the completion data to send back to the shell.
285
+
286
+        By default this calls :meth:`get_completion_args`, gets the
287
+        completions, then calls :meth:`format_completion` for each
288
+        completion.
289
+        """
290
+        args, incomplete = self.get_completion_args()
291
+        completions = self.get_completions(args, incomplete)
292
+        out = [self.format_completion(item) for item in completions]
293
+        return "\n".join(out)
294
+
295
+
296
+class BashComplete(ShellComplete):
297
+    """Shell completion for Bash."""
298
+
299
+    name = "bash"
300
+    source_template = _SOURCE_BASH
301
+
302
+    def _check_version(self) -> None:
303
+        import subprocess
304
+
305
+        output = subprocess.run(
306
+            ["bash", "-c", "echo ${BASH_VERSION}"], stdout=subprocess.PIPE
307
+        )
308
+        match = re.search(r"^(\d+)\.(\d+)\.\d+", output.stdout.decode())
309
+
310
+        if match is not None:
311
+            major, minor = match.groups()
312
+
313
+            if major < "4" or major == "4" and minor < "4":
314
+                raise RuntimeError(
315
+                    _(
316
+                        "Shell completion is not supported for Bash"
317
+                        " versions older than 4.4."
318
+                    )
319
+                )
320
+        else:
321
+            raise RuntimeError(
322
+                _("Couldn't detect Bash version, shell completion is not supported.")
323
+            )
324
+
325
+    def source(self) -> str:
326
+        self._check_version()
327
+        return super().source()
328
+
329
+    def get_completion_args(self) -> t.Tuple[t.List[str], str]:
330
+        cwords = split_arg_string(os.environ["COMP_WORDS"])
331
+        cword = int(os.environ["COMP_CWORD"])
332
+        args = cwords[1:cword]
333
+
334
+        try:
335
+            incomplete = cwords[cword]
336
+        except IndexError:
337
+            incomplete = ""
338
+
339
+        return args, incomplete
340
+
341
+    def format_completion(self, item: CompletionItem) -> str:
342
+        return f"{item.type},{item.value}"
343
+
344
+
345
+class ZshComplete(ShellComplete):
346
+    """Shell completion for Zsh."""
347
+
348
+    name = "zsh"
349
+    source_template = _SOURCE_ZSH
350
+
351
+    def get_completion_args(self) -> t.Tuple[t.List[str], str]:
352
+        cwords = split_arg_string(os.environ["COMP_WORDS"])
353
+        cword = int(os.environ["COMP_CWORD"])
354
+        args = cwords[1:cword]
355
+
356
+        try:
357
+            incomplete = cwords[cword]
358
+        except IndexError:
359
+            incomplete = ""
360
+
361
+        return args, incomplete
362
+
363
+    def format_completion(self, item: CompletionItem) -> str:
364
+        return f"{item.type}\n{item.value}\n{item.help if item.help else '_'}"
365
+
366
+
367
+class FishComplete(ShellComplete):
368
+    """Shell completion for Fish."""
369
+
370
+    name = "fish"
371
+    source_template = _SOURCE_FISH
372
+
373
+    def get_completion_args(self) -> t.Tuple[t.List[str], str]:
374
+        cwords = split_arg_string(os.environ["COMP_WORDS"])
375
+        incomplete = os.environ["COMP_CWORD"]
376
+        args = cwords[1:]
377
+
378
+        # Fish stores the partial word in both COMP_WORDS and
379
+        # COMP_CWORD, remove it from complete args.
380
+        if incomplete and args and args[-1] == incomplete:
381
+            args.pop()
382
+
383
+        return args, incomplete
384
+
385
+    def format_completion(self, item: CompletionItem) -> str:
386
+        if item.help:
387
+            return f"{item.type},{item.value}\t{item.help}"
388
+
389
+        return f"{item.type},{item.value}"
390
+
391
+
392
+_available_shells: t.Dict[str, t.Type[ShellComplete]] = {
393
+    "bash": BashComplete,
394
+    "fish": FishComplete,
395
+    "zsh": ZshComplete,
396
+}
397
+
398
+
399
+def add_completion_class(
400
+    cls: t.Type[ShellComplete], name: t.Optional[str] = None
401
+) -> None:
402
+    """Register a :class:`ShellComplete` subclass under the given name.
403
+    The name will be provided by the completion instruction environment
404
+    variable during completion.
405
+
406
+    :param cls: The completion class that will handle completion for the
407
+        shell.
408
+    :param name: Name to register the class under. Defaults to the
409
+        class's ``name`` attribute.
410
+    """
411
+    if name is None:
412
+        name = cls.name
413
+
414
+    _available_shells[name] = cls
415
+
416
+
417
+def get_completion_class(shell: str) -> t.Optional[t.Type[ShellComplete]]:
418
+    """Look up a registered :class:`ShellComplete` subclass by the name
419
+    provided by the completion instruction environment variable. If the
420
+    name isn't registered, returns ``None``.
421
+
422
+    :param shell: Name the class is registered under.
423
+    """
424
+    return _available_shells.get(shell)
425
+
426
+
427
+def _is_incomplete_argument(ctx: Context, param: Parameter) -> bool:
428
+    """Determine if the given parameter is an argument that can still
429
+    accept values.
430
+
431
+    :param ctx: Invocation context for the command represented by the
432
+        parsed complete args.
433
+    :param param: Argument object being checked.
434
+    """
435
+    if not isinstance(param, Argument):
436
+        return False
437
+
438
+    assert param.name is not None
439
+    value = ctx.params[param.name]
440
+    return (
441
+        param.nargs == -1
442
+        or ctx.get_parameter_source(param.name) is not ParameterSource.COMMANDLINE
443
+        or (
444
+            param.nargs > 1
445
+            and isinstance(value, (tuple, list))
446
+            and len(value) < param.nargs
447
+        )
448
+    )
449
+
450
+
451
+def _start_of_option(value: str) -> bool:
452
+    """Check if the value looks like the start of an option."""
453
+    if not value:
454
+        return False
455
+
456
+    c = value[0]
457
+    # Allow "/" since that starts a path.
458
+    return not c.isalnum() and c != "/"
459
+
460
+
461
+def _is_incomplete_option(args: t.List[str], param: Parameter) -> bool:
462
+    """Determine if the given parameter is an option that needs a value.
463
+
464
+    :param args: List of complete args before the incomplete value.
465
+    :param param: Option object being checked.
466
+    """
467
+    if not isinstance(param, Option):
468
+        return False
469
+
470
+    if param.is_flag:
471
+        return False
472
+
473
+    last_option = None
474
+
475
+    for index, arg in enumerate(reversed(args)):
476
+        if index + 1 > param.nargs:
477
+            break
478
+
479
+        if _start_of_option(arg):
480
+            last_option = arg
481
+
482
+    return last_option is not None and last_option in param.opts
483
+
484
+
485
+def _resolve_context(
486
+    cli: BaseCommand, ctx_args: t.Dict[str, t.Any], prog_name: str, args: t.List[str]
487
+) -> Context:
488
+    """Produce the context hierarchy starting with the command and
489
+    traversing the complete arguments. This only follows the commands,
490
+    it doesn't trigger input prompts or callbacks.
491
+
492
+    :param cli: Command being called.
493
+    :param prog_name: Name of the executable in the shell.
494
+    :param args: List of complete args before the incomplete value.
495
+    """
496
+    ctx_args["resilient_parsing"] = True
497
+    ctx = cli.make_context(prog_name, args.copy(), **ctx_args)
498
+    args = ctx.protected_args + ctx.args
499
+
500
+    while args:
501
+        command = ctx.command
502
+
503
+        if isinstance(command, MultiCommand):
504
+            if not command.chain:
505
+                name, cmd, args = command.resolve_command(ctx, args)
506
+
507
+                if cmd is None:
508
+                    return ctx
509
+
510
+                ctx = cmd.make_context(name, args, parent=ctx, resilient_parsing=True)
511
+                args = ctx.protected_args + ctx.args
512
+            else:
513
+                while args:
514
+                    name, cmd, args = command.resolve_command(ctx, args)
515
+
516
+                    if cmd is None:
517
+                        return ctx
518
+
519
+                    sub_ctx = cmd.make_context(
520
+                        name,
521
+                        args,
522
+                        parent=ctx,
523
+                        allow_extra_args=True,
524
+                        allow_interspersed_args=False,
525
+                        resilient_parsing=True,
526
+                    )
527
+                    args = sub_ctx.args
528
+
529
+                ctx = sub_ctx
530
+                args = [*sub_ctx.protected_args, *sub_ctx.args]
531
+        else:
532
+            break
533
+
534
+    return ctx
535
+
536
+
537
+def _resolve_incomplete(
538
+    ctx: Context, args: t.List[str], incomplete: str
539
+) -> t.Tuple[t.Union[BaseCommand, Parameter], str]:
540
+    """Find the Click object that will handle the completion of the
541
+    incomplete value. Return the object and the incomplete value.
542
+
543
+    :param ctx: Invocation context for the command represented by
544
+        the parsed complete args.
545
+    :param args: List of complete args before the incomplete value.
546
+    :param incomplete: Value being completed. May be empty.
547
+    """
548
+    # Different shells treat an "=" between a long option name and
549
+    # value differently. Might keep the value joined, return the "="
550
+    # as a separate item, or return the split name and value. Always
551
+    # split and discard the "=" to make completion easier.
552
+    if incomplete == "=":
553
+        incomplete = ""
554
+    elif "=" in incomplete and _start_of_option(incomplete):
555
+        name, _, incomplete = incomplete.partition("=")
556
+        args.append(name)
557
+
558
+    # The "--" marker tells Click to stop treating values as options
559
+    # even if they start with the option character. If it hasn't been
560
+    # given and the incomplete arg looks like an option, the current
561
+    # command will provide option name completions.
562
+    if "--" not in args and _start_of_option(incomplete):
563
+        return ctx.command, incomplete
564
+
565
+    params = ctx.command.get_params(ctx)
566
+
567
+    # If the last complete arg is an option name with an incomplete
568
+    # value, the option will provide value completions.
569
+    for param in params:
570
+        if _is_incomplete_option(args, param):
571
+            return param, incomplete
572
+
573
+    # It's not an option name or value. The first argument without a
574
+    # parsed value will provide value completions.
575
+    for param in params:
576
+        if _is_incomplete_argument(ctx, param):
577
+            return param, incomplete
578
+
579
+    # There were no unparsed arguments, the command may be a group that
580
+    # will provide command name completions.
581
+    return ctx.command, incomplete

+ 0
- 0
www/Files-API/.venv/lib/python3.7/site-packages/click/termui.py View File


Some files were not shown because too many files changed in this diff