ultimos cambios
This commit is contained in:
241
.venv/bin/Activate.ps1
Normal file
241
.venv/bin/Activate.ps1
Normal file
@ -0,0 +1,241 @@
|
||||
<#
|
||||
.Synopsis
|
||||
Activate a Python virtual environment for the current PowerShell session.
|
||||
|
||||
.Description
|
||||
Pushes the python executable for a virtual environment to the front of the
|
||||
$Env:PATH environment variable and sets the prompt to signify that you are
|
||||
in a Python virtual environment. Makes use of the command line switches as
|
||||
well as the `pyvenv.cfg` file values present in the virtual environment.
|
||||
|
||||
.Parameter VenvDir
|
||||
Path to the directory that contains the virtual environment to activate. The
|
||||
default value for this is the parent of the directory that the Activate.ps1
|
||||
script is located within.
|
||||
|
||||
.Parameter Prompt
|
||||
The prompt prefix to display when this virtual environment is activated. By
|
||||
default, this prompt is the name of the virtual environment folder (VenvDir)
|
||||
surrounded by parentheses and followed by a single space (ie. '(.venv) ').
|
||||
|
||||
.Example
|
||||
Activate.ps1
|
||||
Activates the Python virtual environment that contains the Activate.ps1 script.
|
||||
|
||||
.Example
|
||||
Activate.ps1 -Verbose
|
||||
Activates the Python virtual environment that contains the Activate.ps1 script,
|
||||
and shows extra information about the activation as it executes.
|
||||
|
||||
.Example
|
||||
Activate.ps1 -VenvDir C:\Users\MyUser\Common\.venv
|
||||
Activates the Python virtual environment located in the specified location.
|
||||
|
||||
.Example
|
||||
Activate.ps1 -Prompt "MyPython"
|
||||
Activates the Python virtual environment that contains the Activate.ps1 script,
|
||||
and prefixes the current prompt with the specified string (surrounded in
|
||||
parentheses) while the virtual environment is active.
|
||||
|
||||
.Notes
|
||||
On Windows, it may be required to enable this Activate.ps1 script by setting the
|
||||
execution policy for the user. You can do this by issuing the following PowerShell
|
||||
command:
|
||||
|
||||
PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
|
||||
|
||||
For more information on Execution Policies:
|
||||
https://go.microsoft.com/fwlink/?LinkID=135170
|
||||
|
||||
#>
|
||||
Param(
|
||||
[Parameter(Mandatory = $false)]
|
||||
[String]
|
||||
$VenvDir,
|
||||
[Parameter(Mandatory = $false)]
|
||||
[String]
|
||||
$Prompt
|
||||
)
|
||||
|
||||
<# Function declarations --------------------------------------------------- #>
|
||||
|
||||
<#
|
||||
.Synopsis
|
||||
Remove all shell session elements added by the Activate script, including the
|
||||
addition of the virtual environment's Python executable from the beginning of
|
||||
the PATH variable.
|
||||
|
||||
.Parameter NonDestructive
|
||||
If present, do not remove this function from the global namespace for the
|
||||
session.
|
||||
|
||||
#>
|
||||
function global:deactivate ([switch]$NonDestructive) {
|
||||
# Revert to original values
|
||||
|
||||
# The prior prompt:
|
||||
if (Test-Path -Path Function:_OLD_VIRTUAL_PROMPT) {
|
||||
Copy-Item -Path Function:_OLD_VIRTUAL_PROMPT -Destination Function:prompt
|
||||
Remove-Item -Path Function:_OLD_VIRTUAL_PROMPT
|
||||
}
|
||||
|
||||
# The prior PYTHONHOME:
|
||||
if (Test-Path -Path Env:_OLD_VIRTUAL_PYTHONHOME) {
|
||||
Copy-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME -Destination Env:PYTHONHOME
|
||||
Remove-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME
|
||||
}
|
||||
|
||||
# The prior PATH:
|
||||
if (Test-Path -Path Env:_OLD_VIRTUAL_PATH) {
|
||||
Copy-Item -Path Env:_OLD_VIRTUAL_PATH -Destination Env:PATH
|
||||
Remove-Item -Path Env:_OLD_VIRTUAL_PATH
|
||||
}
|
||||
|
||||
# Just remove the VIRTUAL_ENV altogether:
|
||||
if (Test-Path -Path Env:VIRTUAL_ENV) {
|
||||
Remove-Item -Path env:VIRTUAL_ENV
|
||||
}
|
||||
|
||||
# Just remove the _PYTHON_VENV_PROMPT_PREFIX altogether:
|
||||
if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) {
|
||||
Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force
|
||||
}
|
||||
|
||||
# Leave deactivate function in the global namespace if requested:
|
||||
if (-not $NonDestructive) {
|
||||
Remove-Item -Path function:deactivate
|
||||
}
|
||||
}
|
||||
|
||||
<#
|
||||
.Description
|
||||
Get-PyVenvConfig parses the values from the pyvenv.cfg file located in the
|
||||
given folder, and returns them in a map.
|
||||
|
||||
For each line in the pyvenv.cfg file, if that line can be parsed into exactly
|
||||
two strings separated by `=` (with any amount of whitespace surrounding the =)
|
||||
then it is considered a `key = value` line. The left hand string is the key,
|
||||
the right hand is the value.
|
||||
|
||||
If the value starts with a `'` or a `"` then the first and last character is
|
||||
stripped from the value before being captured.
|
||||
|
||||
.Parameter ConfigDir
|
||||
Path to the directory that contains the `pyvenv.cfg` file.
|
||||
#>
|
||||
function Get-PyVenvConfig(
|
||||
[String]
|
||||
$ConfigDir
|
||||
) {
|
||||
Write-Verbose "Given ConfigDir=$ConfigDir, obtain values in pyvenv.cfg"
|
||||
|
||||
# Ensure the file exists, and issue a warning if it doesn't (but still allow the function to continue).
|
||||
$pyvenvConfigPath = Join-Path -Resolve -Path $ConfigDir -ChildPath 'pyvenv.cfg' -ErrorAction Continue
|
||||
|
||||
# An empty map will be returned if no config file is found.
|
||||
$pyvenvConfig = @{ }
|
||||
|
||||
if ($pyvenvConfigPath) {
|
||||
|
||||
Write-Verbose "File exists, parse `key = value` lines"
|
||||
$pyvenvConfigContent = Get-Content -Path $pyvenvConfigPath
|
||||
|
||||
$pyvenvConfigContent | ForEach-Object {
|
||||
$keyval = $PSItem -split "\s*=\s*", 2
|
||||
if ($keyval[0] -and $keyval[1]) {
|
||||
$val = $keyval[1]
|
||||
|
||||
# Remove extraneous quotations around a string value.
|
||||
if ("'""".Contains($val.Substring(0, 1))) {
|
||||
$val = $val.Substring(1, $val.Length - 2)
|
||||
}
|
||||
|
||||
$pyvenvConfig[$keyval[0]] = $val
|
||||
Write-Verbose "Adding Key: '$($keyval[0])'='$val'"
|
||||
}
|
||||
}
|
||||
}
|
||||
return $pyvenvConfig
|
||||
}
|
||||
|
||||
|
||||
<# Begin Activate script --------------------------------------------------- #>
|
||||
|
||||
# Determine the containing directory of this script
|
||||
$VenvExecPath = Split-Path -Parent $MyInvocation.MyCommand.Definition
|
||||
$VenvExecDir = Get-Item -Path $VenvExecPath
|
||||
|
||||
Write-Verbose "Activation script is located in path: '$VenvExecPath'"
|
||||
Write-Verbose "VenvExecDir Fullname: '$($VenvExecDir.FullName)"
|
||||
Write-Verbose "VenvExecDir Name: '$($VenvExecDir.Name)"
|
||||
|
||||
# Set values required in priority: CmdLine, ConfigFile, Default
|
||||
# First, get the location of the virtual environment, it might not be
|
||||
# VenvExecDir if specified on the command line.
|
||||
if ($VenvDir) {
|
||||
Write-Verbose "VenvDir given as parameter, using '$VenvDir' to determine values"
|
||||
}
|
||||
else {
|
||||
Write-Verbose "VenvDir not given as a parameter, using parent directory name as VenvDir."
|
||||
$VenvDir = $VenvExecDir.Parent.FullName.TrimEnd("\\/")
|
||||
Write-Verbose "VenvDir=$VenvDir"
|
||||
}
|
||||
|
||||
# Next, read the `pyvenv.cfg` file to determine any required value such
|
||||
# as `prompt`.
|
||||
$pyvenvCfg = Get-PyVenvConfig -ConfigDir $VenvDir
|
||||
|
||||
# Next, set the prompt from the command line, or the config file, or
|
||||
# just use the name of the virtual environment folder.
|
||||
if ($Prompt) {
|
||||
Write-Verbose "Prompt specified as argument, using '$Prompt'"
|
||||
}
|
||||
else {
|
||||
Write-Verbose "Prompt not specified as argument to script, checking pyvenv.cfg value"
|
||||
if ($pyvenvCfg -and $pyvenvCfg['prompt']) {
|
||||
Write-Verbose " Setting based on value in pyvenv.cfg='$($pyvenvCfg['prompt'])'"
|
||||
$Prompt = $pyvenvCfg['prompt'];
|
||||
}
|
||||
else {
|
||||
Write-Verbose " Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virutal environment)"
|
||||
Write-Verbose " Got leaf-name of $VenvDir='$(Split-Path -Path $venvDir -Leaf)'"
|
||||
$Prompt = Split-Path -Path $venvDir -Leaf
|
||||
}
|
||||
}
|
||||
|
||||
Write-Verbose "Prompt = '$Prompt'"
|
||||
Write-Verbose "VenvDir='$VenvDir'"
|
||||
|
||||
# Deactivate any currently active virtual environment, but leave the
|
||||
# deactivate function in place.
|
||||
deactivate -nondestructive
|
||||
|
||||
# Now set the environment variable VIRTUAL_ENV, used by many tools to determine
|
||||
# that there is an activated venv.
|
||||
$env:VIRTUAL_ENV = $VenvDir
|
||||
|
||||
if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) {
|
||||
|
||||
Write-Verbose "Setting prompt to '$Prompt'"
|
||||
|
||||
# Set the prompt to include the env name
|
||||
# Make sure _OLD_VIRTUAL_PROMPT is global
|
||||
function global:_OLD_VIRTUAL_PROMPT { "" }
|
||||
Copy-Item -Path function:prompt -Destination function:_OLD_VIRTUAL_PROMPT
|
||||
New-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Description "Python virtual environment prompt prefix" -Scope Global -Option ReadOnly -Visibility Public -Value $Prompt
|
||||
|
||||
function global:prompt {
|
||||
Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) "
|
||||
_OLD_VIRTUAL_PROMPT
|
||||
}
|
||||
}
|
||||
|
||||
# Clear PYTHONHOME
|
||||
if (Test-Path -Path Env:PYTHONHOME) {
|
||||
Copy-Item -Path Env:PYTHONHOME -Destination Env:_OLD_VIRTUAL_PYTHONHOME
|
||||
Remove-Item -Path Env:PYTHONHOME
|
||||
}
|
||||
|
||||
# Add the venv to the PATH
|
||||
Copy-Item -Path Env:PATH -Destination Env:_OLD_VIRTUAL_PATH
|
||||
$Env:PATH = "$VenvExecDir$([System.IO.Path]::PathSeparator)$Env:PATH"
|
||||
BIN
.venv/bin/__pycache__/jp.cpython-38.pyc
Normal file
BIN
.venv/bin/__pycache__/jp.cpython-38.pyc
Normal file
Binary file not shown.
76
.venv/bin/activate
Normal file
76
.venv/bin/activate
Normal file
@ -0,0 +1,76 @@
|
||||
# This file must be used with "source bin/activate" *from bash*
|
||||
# you cannot run it directly
|
||||
|
||||
deactivate () {
|
||||
# reset old environment variables
|
||||
if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then
|
||||
PATH="${_OLD_VIRTUAL_PATH:-}"
|
||||
export PATH
|
||||
unset _OLD_VIRTUAL_PATH
|
||||
fi
|
||||
if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then
|
||||
PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}"
|
||||
export PYTHONHOME
|
||||
unset _OLD_VIRTUAL_PYTHONHOME
|
||||
fi
|
||||
|
||||
# This should detect bash and zsh, which have a hash command that must
|
||||
# be called to get it to forget past commands. Without forgetting
|
||||
# past commands the $PATH changes we made may not be respected
|
||||
if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
|
||||
hash -r
|
||||
fi
|
||||
|
||||
if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then
|
||||
PS1="${_OLD_VIRTUAL_PS1:-}"
|
||||
export PS1
|
||||
unset _OLD_VIRTUAL_PS1
|
||||
fi
|
||||
|
||||
unset VIRTUAL_ENV
|
||||
if [ ! "${1:-}" = "nondestructive" ] ; then
|
||||
# Self destruct!
|
||||
unset -f deactivate
|
||||
fi
|
||||
}
|
||||
|
||||
# unset irrelevant variables
|
||||
deactivate nondestructive
|
||||
|
||||
VIRTUAL_ENV="/home/antonio/bin/CursoPythonDavidBombal/.venv"
|
||||
export VIRTUAL_ENV
|
||||
|
||||
_OLD_VIRTUAL_PATH="$PATH"
|
||||
PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||
export PATH
|
||||
|
||||
# unset PYTHONHOME if set
|
||||
# this will fail if PYTHONHOME is set to the empty string (which is bad anyway)
|
||||
# could use `if (set -u; : $PYTHONHOME) ;` in bash
|
||||
if [ -n "${PYTHONHOME:-}" ] ; then
|
||||
_OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}"
|
||||
unset PYTHONHOME
|
||||
fi
|
||||
|
||||
if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
|
||||
_OLD_VIRTUAL_PS1="${PS1:-}"
|
||||
if [ "x(.venv) " != x ] ; then
|
||||
PS1="(.venv) ${PS1:-}"
|
||||
else
|
||||
if [ "`basename \"$VIRTUAL_ENV\"`" = "__" ] ; then
|
||||
# special case for Aspen magic directories
|
||||
# see http://www.zetadev.com/software/aspen/
|
||||
PS1="[`basename \`dirname \"$VIRTUAL_ENV\"\``] $PS1"
|
||||
else
|
||||
PS1="(`basename \"$VIRTUAL_ENV\"`)$PS1"
|
||||
fi
|
||||
fi
|
||||
export PS1
|
||||
fi
|
||||
|
||||
# This should detect bash and zsh, which have a hash command that must
|
||||
# be called to get it to forget past commands. Without forgetting
|
||||
# past commands the $PATH changes we made may not be respected
|
||||
if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
|
||||
hash -r
|
||||
fi
|
||||
37
.venv/bin/activate.csh
Normal file
37
.venv/bin/activate.csh
Normal file
@ -0,0 +1,37 @@
|
||||
# This file must be used with "source bin/activate.csh" *from csh*.
|
||||
# You cannot run it directly.
|
||||
# Created by Davide Di Blasi <davidedb@gmail.com>.
|
||||
# Ported to Python 3.3 venv by Andrew Svetlov <andrew.svetlov@gmail.com>
|
||||
|
||||
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'
|
||||
|
||||
# Unset irrelevant variables.
|
||||
deactivate nondestructive
|
||||
|
||||
setenv VIRTUAL_ENV "/home/antonio/bin/CursoPythonDavidBombal/.venv"
|
||||
|
||||
set _OLD_VIRTUAL_PATH="$PATH"
|
||||
setenv PATH "$VIRTUAL_ENV/bin:$PATH"
|
||||
|
||||
|
||||
set _OLD_VIRTUAL_PROMPT="$prompt"
|
||||
|
||||
if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then
|
||||
if (".venv" != "") then
|
||||
set env_name = ".venv"
|
||||
else
|
||||
if (`basename "VIRTUAL_ENV"` == "__") then
|
||||
# special case for Aspen magic directories
|
||||
# see http://www.zetadev.com/software/aspen/
|
||||
set env_name = `basename \`dirname "$VIRTUAL_ENV"\``
|
||||
else
|
||||
set env_name = `basename "$VIRTUAL_ENV"`
|
||||
endif
|
||||
endif
|
||||
set prompt = "[$env_name] $prompt"
|
||||
unset env_name
|
||||
endif
|
||||
|
||||
alias pydoc python -m pydoc
|
||||
|
||||
rehash
|
||||
75
.venv/bin/activate.fish
Normal file
75
.venv/bin/activate.fish
Normal file
@ -0,0 +1,75 @@
|
||||
# This file must be used with ". bin/activate.fish" *from fish* (http://fishshell.org)
|
||||
# you cannot run it directly
|
||||
|
||||
function deactivate -d "Exit virtualenv and return to normal shell environment"
|
||||
# reset old environment variables
|
||||
if test -n "$_OLD_VIRTUAL_PATH"
|
||||
set -gx PATH $_OLD_VIRTUAL_PATH
|
||||
set -e _OLD_VIRTUAL_PATH
|
||||
end
|
||||
if test -n "$_OLD_VIRTUAL_PYTHONHOME"
|
||||
set -gx PYTHONHOME $_OLD_VIRTUAL_PYTHONHOME
|
||||
set -e _OLD_VIRTUAL_PYTHONHOME
|
||||
end
|
||||
|
||||
if test -n "$_OLD_FISH_PROMPT_OVERRIDE"
|
||||
functions -e fish_prompt
|
||||
set -e _OLD_FISH_PROMPT_OVERRIDE
|
||||
functions -c _old_fish_prompt fish_prompt
|
||||
functions -e _old_fish_prompt
|
||||
end
|
||||
|
||||
set -e VIRTUAL_ENV
|
||||
if test "$argv[1]" != "nondestructive"
|
||||
# Self destruct!
|
||||
functions -e deactivate
|
||||
end
|
||||
end
|
||||
|
||||
# unset irrelevant variables
|
||||
deactivate nondestructive
|
||||
|
||||
set -gx VIRTUAL_ENV "/home/antonio/bin/CursoPythonDavidBombal/.venv"
|
||||
|
||||
set -gx _OLD_VIRTUAL_PATH $PATH
|
||||
set -gx PATH "$VIRTUAL_ENV/bin" $PATH
|
||||
|
||||
# unset PYTHONHOME if set
|
||||
if set -q PYTHONHOME
|
||||
set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME
|
||||
set -e PYTHONHOME
|
||||
end
|
||||
|
||||
if test -z "$VIRTUAL_ENV_DISABLE_PROMPT"
|
||||
# fish uses a function instead of an env var to generate the prompt.
|
||||
|
||||
# save the current fish_prompt function as the function _old_fish_prompt
|
||||
functions -c fish_prompt _old_fish_prompt
|
||||
|
||||
# with the original prompt function renamed, we can override with our own.
|
||||
function fish_prompt
|
||||
# Save the return status of the last command
|
||||
set -l old_status $status
|
||||
|
||||
# Prompt override?
|
||||
if test -n "(.venv) "
|
||||
printf "%s%s" "(.venv) " (set_color normal)
|
||||
else
|
||||
# ...Otherwise, prepend env
|
||||
set -l _checkbase (basename "$VIRTUAL_ENV")
|
||||
if test $_checkbase = "__"
|
||||
# special case for Aspen magic directories
|
||||
# see http://www.zetadev.com/software/aspen/
|
||||
printf "%s[%s]%s " (set_color -b blue white) (basename (dirname "$VIRTUAL_ENV")) (set_color normal)
|
||||
else
|
||||
printf "%s(%s)%s" (set_color -b blue white) (basename "$VIRTUAL_ENV") (set_color normal)
|
||||
end
|
||||
end
|
||||
|
||||
# Restore the return status of the previous command.
|
||||
echo "exit $old_status" | .
|
||||
_old_fish_prompt
|
||||
end
|
||||
|
||||
set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV"
|
||||
end
|
||||
8
.venv/bin/chardetect
Executable file
8
.venv/bin/chardetect
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from chardet.cli.chardetect import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
8
.venv/bin/cl_napalm_configure
Executable file
8
.venv/bin/cl_napalm_configure
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from napalm.base.clitools.cl_napalm_configure import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
8
.venv/bin/cl_napalm_test
Executable file
8
.venv/bin/cl_napalm_test
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from napalm.base.clitools.cl_napalm_test import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
8
.venv/bin/cl_napalm_validate
Executable file
8
.venv/bin/cl_napalm_validate
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from napalm.base.clitools.cl_napalm_validate import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
8
.venv/bin/easy_install
Executable file
8
.venv/bin/easy_install
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from setuptools.command.easy_install import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
8
.venv/bin/easy_install-3.8
Executable file
8
.venv/bin/easy_install-3.8
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from setuptools.command.easy_install import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
8
.venv/bin/epylint
Executable file
8
.venv/bin/epylint
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from pylint import run_epylint
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(run_epylint())
|
||||
8
.venv/bin/flask
Executable file
8
.venv/bin/flask
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from flask.cli import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
8
.venv/bin/futurize
Executable file
8
.venv/bin/futurize
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from libfuturize.main import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
8
.venv/bin/iptest
Executable file
8
.venv/bin/iptest
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from IPython.testing.iptestcontroller import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
8
.venv/bin/iptest3
Executable file
8
.venv/bin/iptest3
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from IPython.testing.iptestcontroller import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
8
.venv/bin/ipython
Executable file
8
.venv/bin/ipython
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from IPython import start_ipython
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(start_ipython())
|
||||
8
.venv/bin/ipython3
Executable file
8
.venv/bin/ipython3
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from IPython import start_ipython
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(start_ipython())
|
||||
8
.venv/bin/isort
Executable file
8
.venv/bin/isort
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from isort.main import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
54
.venv/bin/jp.py
Executable file
54
.venv/bin/jp.py
Executable file
@ -0,0 +1,54 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
|
||||
import sys
|
||||
import json
|
||||
import argparse
|
||||
from pprint import pformat
|
||||
|
||||
import jmespath
|
||||
from jmespath import exceptions
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('expression')
|
||||
parser.add_argument('-f', '--filename',
|
||||
help=('The filename containing the input data. '
|
||||
'If a filename is not given then data is '
|
||||
'read from stdin.'))
|
||||
parser.add_argument('--ast', action='store_true',
|
||||
help=('Pretty print the AST, do not search the data.'))
|
||||
args = parser.parse_args()
|
||||
expression = args.expression
|
||||
if args.ast:
|
||||
# Only print the AST
|
||||
expression = jmespath.compile(args.expression)
|
||||
sys.stdout.write(pformat(expression.parsed))
|
||||
sys.stdout.write('\n')
|
||||
return 0
|
||||
if args.filename:
|
||||
with open(args.filename, 'r') as f:
|
||||
data = json.load(f)
|
||||
else:
|
||||
data = sys.stdin.read()
|
||||
data = json.loads(data)
|
||||
try:
|
||||
sys.stdout.write(json.dumps(
|
||||
jmespath.search(expression, data), indent=4, ensure_ascii=False))
|
||||
sys.stdout.write('\n')
|
||||
except exceptions.ArityError as e:
|
||||
sys.stderr.write("invalid-arity: %s\n" % e)
|
||||
return 1
|
||||
except exceptions.JMESPathTypeError as e:
|
||||
sys.stderr.write("invalid-type: %s\n" % e)
|
||||
return 1
|
||||
except exceptions.UnknownFunctionError as e:
|
||||
sys.stderr.write("unknown-function: %s\n" % e)
|
||||
return 1
|
||||
except exceptions.ParseError as e:
|
||||
sys.stderr.write("syntax-error: %s\n" % e)
|
||||
return 1
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
8
.venv/bin/jupyter
Executable file
8
.venv/bin/jupyter
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from jupyter_core.command import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
8
.venv/bin/jupyter-kernel
Executable file
8
.venv/bin/jupyter-kernel
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from jupyter_client.kernelapp import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
8
.venv/bin/jupyter-kernelspec
Executable file
8
.venv/bin/jupyter-kernelspec
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from jupyter_client.kernelspecapp import KernelSpecApp
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(KernelSpecApp.launch_instance())
|
||||
8
.venv/bin/jupyter-migrate
Executable file
8
.venv/bin/jupyter-migrate
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from jupyter_core.migrate import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
8
.venv/bin/jupyter-run
Executable file
8
.venv/bin/jupyter-run
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from jupyter_client.runapp import RunApp
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(RunApp.launch_instance())
|
||||
8
.venv/bin/jupyter-troubleshoot
Executable file
8
.venv/bin/jupyter-troubleshoot
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from jupyter_core.troubleshoot import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
8
.venv/bin/napalm
Executable file
8
.venv/bin/napalm
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from napalm.base.clitools.cl_napalm import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
8
.venv/bin/net-tools
Executable file
8
.venv/bin/net-tools
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from nettools.cli import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
8
.venv/bin/netaddr
Executable file
8
.venv/bin/netaddr
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from netaddr.cli import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
8
.venv/bin/pasteurize
Executable file
8
.venv/bin/pasteurize
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from libpasteurize.main import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
8
.venv/bin/pip
Executable file
8
.venv/bin/pip
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from pip._internal.cli.main import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
8
.venv/bin/pip3
Executable file
8
.venv/bin/pip3
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from pip._internal.cli.main import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
8
.venv/bin/pip3.8
Executable file
8
.venv/bin/pip3.8
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from pip._internal.cli.main import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
8
.venv/bin/pygmentize
Executable file
8
.venv/bin/pygmentize
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from pygments.cmdline import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
8
.venv/bin/pylint
Executable file
8
.venv/bin/pylint
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from pylint import run_pylint
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(run_pylint())
|
||||
8
.venv/bin/pyreverse
Executable file
8
.venv/bin/pyreverse
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from pylint import run_pyreverse
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(run_pyreverse())
|
||||
8
.venv/bin/pyserial-miniterm
Executable file
8
.venv/bin/pyserial-miniterm
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from serial.tools.miniterm import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
8
.venv/bin/pyserial-ports
Executable file
8
.venv/bin/pyserial-ports
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from serial.tools.list_ports import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
1
.venv/bin/python
Symbolic link
1
.venv/bin/python
Symbolic link
@ -0,0 +1 @@
|
||||
python3
|
||||
1
.venv/bin/python3
Symbolic link
1
.venv/bin/python3
Symbolic link
@ -0,0 +1 @@
|
||||
/usr/bin/python3
|
||||
8
.venv/bin/symilar
Executable file
8
.venv/bin/symilar
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from pylint import run_symilar
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(run_symilar())
|
||||
8
.venv/bin/tabulate
Executable file
8
.venv/bin/tabulate
Executable file
@ -0,0 +1,8 @@
|
||||
#!/home/antonio/bin/CursoPythonDavidBombal/.venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from tabulate import _main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(_main())
|
||||
@ -0,0 +1 @@
|
||||
pip
|
||||
@ -0,0 +1,28 @@
|
||||
Copyright 2010 Pallets
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
137
.venv/lib/python3.8/site-packages/Flask-1.1.2.dist-info/METADATA
Normal file
137
.venv/lib/python3.8/site-packages/Flask-1.1.2.dist-info/METADATA
Normal file
@ -0,0 +1,137 @@
|
||||
Metadata-Version: 2.1
|
||||
Name: Flask
|
||||
Version: 1.1.2
|
||||
Summary: A simple framework for building complex web applications.
|
||||
Home-page: https://palletsprojects.com/p/flask/
|
||||
Author: Armin Ronacher
|
||||
Author-email: armin.ronacher@active-4.com
|
||||
Maintainer: Pallets
|
||||
Maintainer-email: contact@palletsprojects.com
|
||||
License: BSD-3-Clause
|
||||
Project-URL: Documentation, https://flask.palletsprojects.com/
|
||||
Project-URL: Code, https://github.com/pallets/flask
|
||||
Project-URL: Issue tracker, https://github.com/pallets/flask/issues
|
||||
Platform: UNKNOWN
|
||||
Classifier: Development Status :: 5 - Production/Stable
|
||||
Classifier: Environment :: Web Environment
|
||||
Classifier: Framework :: Flask
|
||||
Classifier: Intended Audience :: Developers
|
||||
Classifier: License :: OSI Approved :: BSD License
|
||||
Classifier: Operating System :: OS Independent
|
||||
Classifier: Programming Language :: Python
|
||||
Classifier: Programming Language :: Python :: 2
|
||||
Classifier: Programming Language :: Python :: 2.7
|
||||
Classifier: Programming Language :: Python :: 3
|
||||
Classifier: Programming Language :: Python :: 3.5
|
||||
Classifier: Programming Language :: Python :: 3.6
|
||||
Classifier: Programming Language :: Python :: 3.7
|
||||
Classifier: Programming Language :: Python :: 3.8
|
||||
Classifier: Programming Language :: Python :: Implementation :: CPython
|
||||
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
||||
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
|
||||
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
|
||||
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
||||
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
||||
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
|
||||
Requires-Dist: Werkzeug (>=0.15)
|
||||
Requires-Dist: Jinja2 (>=2.10.1)
|
||||
Requires-Dist: itsdangerous (>=0.24)
|
||||
Requires-Dist: click (>=5.1)
|
||||
Provides-Extra: dev
|
||||
Requires-Dist: pytest ; extra == 'dev'
|
||||
Requires-Dist: coverage ; extra == 'dev'
|
||||
Requires-Dist: tox ; extra == 'dev'
|
||||
Requires-Dist: sphinx ; extra == 'dev'
|
||||
Requires-Dist: pallets-sphinx-themes ; extra == 'dev'
|
||||
Requires-Dist: sphinxcontrib-log-cabinet ; extra == 'dev'
|
||||
Requires-Dist: sphinx-issues ; extra == 'dev'
|
||||
Provides-Extra: docs
|
||||
Requires-Dist: sphinx ; extra == 'docs'
|
||||
Requires-Dist: pallets-sphinx-themes ; extra == 'docs'
|
||||
Requires-Dist: sphinxcontrib-log-cabinet ; extra == 'docs'
|
||||
Requires-Dist: sphinx-issues ; extra == 'docs'
|
||||
Provides-Extra: dotenv
|
||||
Requires-Dist: python-dotenv ; extra == 'dotenv'
|
||||
|
||||
Flask
|
||||
=====
|
||||
|
||||
Flask is a lightweight `WSGI`_ web application framework. It is designed
|
||||
to make getting started quick and easy, with the ability to scale up to
|
||||
complex applications. It began as a simple wrapper around `Werkzeug`_
|
||||
and `Jinja`_ and has become one of the most popular Python web
|
||||
application frameworks.
|
||||
|
||||
Flask offers suggestions, but doesn't enforce any dependencies or
|
||||
project layout. It is up to the developer to choose the tools and
|
||||
libraries they want to use. There are many extensions provided by the
|
||||
community that make adding new functionality easy.
|
||||
|
||||
|
||||
Installing
|
||||
----------
|
||||
|
||||
Install and update using `pip`_:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
pip install -U Flask
|
||||
|
||||
|
||||
A Simple Example
|
||||
----------------
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from flask import Flask
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route("/")
|
||||
def hello():
|
||||
return "Hello, World!"
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
$ env FLASK_APP=hello.py flask run
|
||||
* Serving Flask app "hello"
|
||||
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
|
||||
|
||||
|
||||
Contributing
|
||||
------------
|
||||
|
||||
For guidance on setting up a development environment and how to make a
|
||||
contribution to Flask, see the `contributing guidelines`_.
|
||||
|
||||
.. _contributing guidelines: https://github.com/pallets/flask/blob/master/CONTRIBUTING.rst
|
||||
|
||||
|
||||
Donate
|
||||
------
|
||||
|
||||
The Pallets organization develops and supports Flask and the libraries
|
||||
it uses. In order to grow the community of contributors and users, and
|
||||
allow the maintainers to devote more time to the projects, `please
|
||||
donate today`_.
|
||||
|
||||
.. _please donate today: https://psfmember.org/civicrm/contribute/transact?reset=1&id=20
|
||||
|
||||
|
||||
Links
|
||||
-----
|
||||
|
||||
* Website: https://palletsprojects.com/p/flask/
|
||||
* Documentation: https://flask.palletsprojects.com/
|
||||
* Releases: https://pypi.org/project/Flask/
|
||||
* Code: https://github.com/pallets/flask
|
||||
* Issue tracker: https://github.com/pallets/flask/issues
|
||||
* Test status: https://dev.azure.com/pallets/flask/_build
|
||||
* Official chat: https://discord.gg/t6rrQZH
|
||||
|
||||
.. _WSGI: https://wsgi.readthedocs.io
|
||||
.. _Werkzeug: https://www.palletsprojects.com/p/werkzeug/
|
||||
.. _Jinja: https://www.palletsprojects.com/p/jinja/
|
||||
.. _pip: https://pip.pypa.io/en/stable/quickstart/
|
||||
|
||||
|
||||
@ -0,0 +1,48 @@
|
||||
../../../bin/flask,sha256=NIK5z114xXP0Y3CQLwYG1ORDb705FZyfGjn4TR4Jwz4,250
|
||||
Flask-1.1.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
||||
Flask-1.1.2.dist-info/LICENSE.rst,sha256=SJqOEQhQntmKN7uYPhHg9-HTHwvY-Zp5yESOf_N9B-o,1475
|
||||
Flask-1.1.2.dist-info/METADATA,sha256=3INpPWH6nKfZ33R2N-bQZy4TOe1wQCMweZc9mwcNrtc,4591
|
||||
Flask-1.1.2.dist-info/RECORD,,
|
||||
Flask-1.1.2.dist-info/WHEEL,sha256=8zNYZbwQSXoB9IfXOjPfeNwvAsALAjffgk27FqvCWbo,110
|
||||
Flask-1.1.2.dist-info/entry_points.txt,sha256=gBLA1aKg0OYR8AhbAfg8lnburHtKcgJLDU52BBctN0k,42
|
||||
Flask-1.1.2.dist-info/top_level.txt,sha256=dvi65F6AeGWVU0TBpYiC04yM60-FX1gJFkK31IKQr5c,6
|
||||
flask/__init__.py,sha256=YnA9wkwbJcnb_jTT-nMsMFeFE_UWt33khKzdHmMSuyI,1894
|
||||
flask/__main__.py,sha256=fjVtt3QTANXlpJCOv3Ha7d5H-76MwzSIOab7SFD9TEk,254
|
||||
flask/__pycache__/__init__.cpython-38.pyc,,
|
||||
flask/__pycache__/__main__.cpython-38.pyc,,
|
||||
flask/__pycache__/_compat.cpython-38.pyc,,
|
||||
flask/__pycache__/app.cpython-38.pyc,,
|
||||
flask/__pycache__/blueprints.cpython-38.pyc,,
|
||||
flask/__pycache__/cli.cpython-38.pyc,,
|
||||
flask/__pycache__/config.cpython-38.pyc,,
|
||||
flask/__pycache__/ctx.cpython-38.pyc,,
|
||||
flask/__pycache__/debughelpers.cpython-38.pyc,,
|
||||
flask/__pycache__/globals.cpython-38.pyc,,
|
||||
flask/__pycache__/helpers.cpython-38.pyc,,
|
||||
flask/__pycache__/logging.cpython-38.pyc,,
|
||||
flask/__pycache__/sessions.cpython-38.pyc,,
|
||||
flask/__pycache__/signals.cpython-38.pyc,,
|
||||
flask/__pycache__/templating.cpython-38.pyc,,
|
||||
flask/__pycache__/testing.cpython-38.pyc,,
|
||||
flask/__pycache__/views.cpython-38.pyc,,
|
||||
flask/__pycache__/wrappers.cpython-38.pyc,,
|
||||
flask/_compat.py,sha256=8KPT54Iig96TuLipdogLRHNYToIcg-xPhnSV5VRERnw,4099
|
||||
flask/app.py,sha256=tmEhx_XrIRP24vZg39dHMWFzJ2jj-YxIcd51LaIT5cE,98059
|
||||
flask/blueprints.py,sha256=vkdm8NusGsfZUeIfPdCluj733QFmiQcT4Sk1tuZLUjw,21400
|
||||
flask/cli.py,sha256=SIb22uq9wYBeB2tKMl0pYdhtZ1MAQyZtPL-3m6es4G0,31035
|
||||
flask/config.py,sha256=3dejvQRYfNHw_V7dCLMxU8UNFpL34xIKemN7gHZIZ8Y,10052
|
||||
flask/ctx.py,sha256=cks-omGedkxawHFo6bKIrdOHsJCAgg1i_NWw_htxb5U,16724
|
||||
flask/debughelpers.py,sha256=-whvPKuAoU8AZ9c1z_INuOeBgfYDqE1J2xNBsoriugU,6475
|
||||
flask/globals.py,sha256=OgcHb6_NCyX6-TldciOdKcyj4PNfyQwClxdMhvov6aA,1637
|
||||
flask/helpers.py,sha256=IHa578HU_3XAAo1wpXQv24MYRYO5TzaiDQQwvUIcE6Q,43074
|
||||
flask/json/__init__.py,sha256=6nITbZYiYOPB8Qfi1-dvsblwn01KRz8VOsMBIZyaYek,11988
|
||||
flask/json/__pycache__/__init__.cpython-38.pyc,,
|
||||
flask/json/__pycache__/tag.cpython-38.pyc,,
|
||||
flask/json/tag.py,sha256=vq9GOllg_0kTWKuVFrwmkeOQzR-jdBD23x-89JyCCQI,8306
|
||||
flask/logging.py,sha256=WcY5UkqTysGfmosyygSlXyZYGwOp3y-VsE6ehoJ48dk,3250
|
||||
flask/sessions.py,sha256=G0KsEkr_i1LG_wOINwFSOW3ts7Xbv4bNgEZKc7TRloc,14360
|
||||
flask/signals.py,sha256=yYLOed2x8WnQ7pirGalQYfpYpCILJ0LJhmNSrnWvjqw,2212
|
||||
flask/templating.py,sha256=F8E_IZXn9BGsjMzUJ5N_ACMyZdiFBp_SSEaUunvfZ7g,4939
|
||||
flask/testing.py,sha256=WXsciCQbHBP7xjHqNvOA4bT0k86GvSNpgzncfXLDEEg,10146
|
||||
flask/views.py,sha256=eeWnadLAj0QdQPLtjKipDetRZyG62CT2y7fNOFDJz0g,5802
|
||||
flask/wrappers.py,sha256=kgsvtZuMM6RQaDqhRbc5Pcj9vqTnaERl2pmXcdGL7LU,4736
|
||||
@ -0,0 +1,6 @@
|
||||
Wheel-Version: 1.0
|
||||
Generator: bdist_wheel (0.33.6)
|
||||
Root-Is-Purelib: true
|
||||
Tag: py2-none-any
|
||||
Tag: py3-none-any
|
||||
|
||||
@ -0,0 +1,3 @@
|
||||
[console_scripts]
|
||||
flask = flask.cli:main
|
||||
|
||||
@ -0,0 +1 @@
|
||||
flask
|
||||
@ -0,0 +1 @@
|
||||
pip
|
||||
@ -0,0 +1,7 @@
|
||||
Copyright (C) 2016 Cory Dolphin, Olin College
|
||||
|
||||
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:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
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.
|
||||
@ -0,0 +1,162 @@
|
||||
Metadata-Version: 2.1
|
||||
Name: Flask-Cors
|
||||
Version: 3.0.9
|
||||
Summary: A Flask extension adding a decorator for CORS support
|
||||
Home-page: https://github.com/corydolphin/flask-cors
|
||||
Author: Cory Dolphin
|
||||
Author-email: corydolphin@gmail.com
|
||||
License: MIT
|
||||
Platform: any
|
||||
Classifier: Environment :: Web Environment
|
||||
Classifier: Intended Audience :: Developers
|
||||
Classifier: License :: OSI Approved :: MIT License
|
||||
Classifier: Operating System :: OS Independent
|
||||
Classifier: Programming Language :: Python
|
||||
Classifier: Programming Language :: Python :: 2
|
||||
Classifier: Programming Language :: Python :: 2.7
|
||||
Classifier: Programming Language :: Python :: 3
|
||||
Classifier: Programming Language :: Python :: 3.4
|
||||
Classifier: Programming Language :: Python :: 3.5
|
||||
Classifier: Programming Language :: Python :: 3.6
|
||||
Classifier: Programming Language :: Python :: 3.7
|
||||
Classifier: Programming Language :: Python :: Implementation :: CPython
|
||||
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
||||
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
|
||||
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
||||
Requires-Dist: Flask (>=0.9)
|
||||
Requires-Dist: Six
|
||||
|
||||
Flask-CORS
|
||||
==========
|
||||
|
||||
|Build Status| |Latest Version| |Supported Python versions|
|
||||
|License|
|
||||
|
||||
A Flask extension for handling Cross Origin Resource Sharing (CORS),
|
||||
making cross-origin AJAX possible.
|
||||
|
||||
This package has a simple philosophy, when you want to enable CORS, you
|
||||
wish to enable it for all use cases on a domain. This means no mucking
|
||||
around with different allowed headers, methods, etc. By default,
|
||||
submission of cookies across domains is disabled due to the security
|
||||
implications, 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!
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
Install the extension with using pip, or easy\_install.
|
||||
|
||||
.. code:: bash
|
||||
|
||||
$ pip install -U flask-cors
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
This package exposes a Flask extension which by default enables CORS support on all routes, for all origins and methods. It allows parameterization of all CORS headers on a per-resource level. The package also contains a decorator, for those who prefer this approach.
|
||||
|
||||
Simple Usage
|
||||
~~~~~~~~~~~~
|
||||
|
||||
In the simplest case, initialize the Flask-Cors extension with default
|
||||
arguments in order to allow CORS for all domains on all routes. See the
|
||||
full list of options in the `documentation <https://flask-cors.corydolphin.com/en/latest/api.html#extension>`__.
|
||||
|
||||
.. code:: python
|
||||
|
||||
|
||||
from flask import Flask
|
||||
from flask_cors import CORS
|
||||
|
||||
app = Flask(__name__)
|
||||
CORS(app)
|
||||
|
||||
@app.route("/")
|
||||
def helloWorld():
|
||||
return "Hello, cross-origin-world!"
|
||||
|
||||
Resource specific CORS
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
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. See the
|
||||
full list of options in the `documentation <https://flask-cors.corydolphin.com/en/latest/api.html#extension>`__.
|
||||
|
||||
.. code:: python
|
||||
|
||||
app = Flask(__name__)
|
||||
cors = CORS(app, resources={r"/api/*": {"origins": "*"}})
|
||||
|
||||
@app.route("/api/v1/users")
|
||||
def list_users():
|
||||
return "user example"
|
||||
|
||||
Route specific CORS via decorator
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
This extension also exposes a simple decorator to decorate flask routes
|
||||
with. Simply add ``@cross_origin()`` below a call to Flask's
|
||||
``@app.route(..)`` to allow CORS on a given route. See the
|
||||
full list of options in the `decorator documentation <https://flask-cors.corydolphin.com/en/latest/api.html#decorator>`__.
|
||||
|
||||
.. code:: python
|
||||
|
||||
@app.route("/")
|
||||
@cross_origin()
|
||||
def helloWorld():
|
||||
return "Hello, cross-origin-world!"
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
For a full list of options, please see the full
|
||||
`documentation <https://flask-cors.corydolphin.com/en/latest/api.html>`__
|
||||
|
||||
Troubleshooting
|
||||
---------------
|
||||
|
||||
If things aren't working as you expect, enable logging to help understand
|
||||
what is going on under the hood, and why.
|
||||
|
||||
.. code:: python
|
||||
|
||||
logging.getLogger('flask_cors').level = logging.DEBUG
|
||||
|
||||
|
||||
Tests
|
||||
-----
|
||||
|
||||
A simple set of tests is included in ``test/``. To run, install nose,
|
||||
and simply invoke ``nosetests`` or ``python setup.py test`` to exercise
|
||||
the tests.
|
||||
|
||||
Contributing
|
||||
------------
|
||||
|
||||
Questions, comments or improvements? Please create an issue on
|
||||
`Github <https://github.com/corydolphin/flask-cors>`__, tweet at
|
||||
`@corydolphin <https://twitter.com/corydolphin>`__ or send me an email.
|
||||
I do my best to include every contribution proposed in any way that I
|
||||
can.
|
||||
|
||||
Credits
|
||||
-------
|
||||
|
||||
This Flask extension is based upon the `Decorator for the HTTP Access
|
||||
Control <http://flask.pocoo.org/snippets/56/>`__ written by Armin
|
||||
Ronacher.
|
||||
|
||||
.. |Build Status| image:: https://api.travis-ci.org/corydolphin/flask-cors.svg?branch=master
|
||||
:target: https://travis-ci.org/corydolphin/flask-cors
|
||||
.. |Latest Version| image:: https://img.shields.io/pypi/v/Flask-Cors.svg
|
||||
:target: https://pypi.python.org/pypi/Flask-Cors/
|
||||
.. |Supported Python versions| image:: https://img.shields.io/pypi/pyversions/Flask-Cors.svg
|
||||
:target: https://img.shields.io/pypi/pyversions/Flask-Cors.svg
|
||||
.. |License| image:: http://img.shields.io/:license-mit-blue.svg
|
||||
:target: https://pypi.python.org/pypi/Flask-Cors/
|
||||
|
||||
|
||||
@ -0,0 +1,16 @@
|
||||
Flask_Cors-3.0.9.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
||||
Flask_Cors-3.0.9.dist-info/LICENSE,sha256=bhob3FSDTB4HQMvOXV9vLK4chG_Sp_SCsRZJWU-vvV0,1069
|
||||
Flask_Cors-3.0.9.dist-info/METADATA,sha256=cUytRTISWTyZGDu2VxycuGloLxldjEGw7gTLKe1irAU,5368
|
||||
Flask_Cors-3.0.9.dist-info/RECORD,,
|
||||
Flask_Cors-3.0.9.dist-info/WHEEL,sha256=ADKeyaGyKF5DwBNE0sRE5pvW-bSkFMJfBuhzZ3rceP4,110
|
||||
Flask_Cors-3.0.9.dist-info/top_level.txt,sha256=aWye_0QNZPp_QtPF4ZluLHqnyVLT9CPJsfiGhwqkWuo,11
|
||||
flask_cors/__init__.py,sha256=oJExwfR7yU3HAsmQ_EfL6KoLK3zq3J9HsET9r-56sfM,791
|
||||
flask_cors/__pycache__/__init__.cpython-38.pyc,,
|
||||
flask_cors/__pycache__/core.cpython-38.pyc,,
|
||||
flask_cors/__pycache__/decorator.cpython-38.pyc,,
|
||||
flask_cors/__pycache__/extension.cpython-38.pyc,,
|
||||
flask_cors/__pycache__/version.cpython-38.pyc,,
|
||||
flask_cors/core.py,sha256=N6dEVe5dffaQTw79Mc8IvEeTzvY_YsKCiOZ1lJ_PyNk,13894
|
||||
flask_cors/decorator.py,sha256=iiwjUi0lVeCm4OJJHY5Cvuzj2nENbUns3Iq6zqKXuss,4937
|
||||
flask_cors/extension.py,sha256=5PvNVLg6GsR6bWS0izBx737kZMw0vf3DUYUNdSDcBtA,7585
|
||||
flask_cors/version.py,sha256=GgzlXELdHTkTAUXqLnCAGFr2E0nwjjBPe-3RxfSkl6c,22
|
||||
@ -0,0 +1,6 @@
|
||||
Wheel-Version: 1.0
|
||||
Generator: bdist_wheel (0.35.1)
|
||||
Root-Is-Purelib: true
|
||||
Tag: py2-none-any
|
||||
Tag: py3-none-any
|
||||
|
||||
@ -0,0 +1 @@
|
||||
flask_cors
|
||||
@ -0,0 +1 @@
|
||||
pip
|
||||
@ -0,0 +1,28 @@
|
||||
Copyright 2010 Pallets
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@ -0,0 +1,94 @@
|
||||
Metadata-Version: 2.1
|
||||
Name: Flask-SQLAlchemy
|
||||
Version: 2.4.4
|
||||
Summary: Adds SQLAlchemy support to your Flask application.
|
||||
Home-page: https://github.com/pallets/flask-sqlalchemy
|
||||
Author: Armin Ronacher
|
||||
Author-email: armin.ronacher@active-4.com
|
||||
Maintainer: Pallets
|
||||
Maintainer-email: contact@palletsprojects.com
|
||||
License: BSD-3-Clause
|
||||
Project-URL: Documentation, https://flask-sqlalchemy.palletsprojects.com/
|
||||
Project-URL: Code, https://github.com/pallets/flask-sqlalchemy
|
||||
Project-URL: Issue tracker, https://github.com/pallets/flask-sqlalchemy/issues
|
||||
Platform: UNKNOWN
|
||||
Classifier: Development Status :: 5 - Production/Stable
|
||||
Classifier: Environment :: Web Environment
|
||||
Classifier: Intended Audience :: Developers
|
||||
Classifier: License :: OSI Approved :: BSD License
|
||||
Classifier: Operating System :: OS Independent
|
||||
Classifier: Programming Language :: Python
|
||||
Classifier: Programming Language :: Python :: 2
|
||||
Classifier: Programming Language :: Python :: 2.7
|
||||
Classifier: Programming Language :: Python :: 3
|
||||
Classifier: Programming Language :: Python :: 3.4
|
||||
Classifier: Programming Language :: Python :: 3.5
|
||||
Classifier: Programming Language :: Python :: 3.6
|
||||
Classifier: Programming Language :: Python :: 3.7
|
||||
Classifier: Programming Language :: Python :: Implementation :: CPython
|
||||
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
||||
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
|
||||
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
||||
Requires-Python: >= 2.7, != 3.0.*, != 3.1.*, != 3.2.*, != 3.3.*
|
||||
Requires-Dist: Flask (>=0.10)
|
||||
Requires-Dist: SQLAlchemy (>=0.8.0)
|
||||
|
||||
Flask-SQLAlchemy
|
||||
================
|
||||
|
||||
Flask-SQLAlchemy is an extension for `Flask`_ that adds support for
|
||||
`SQLAlchemy`_ to your application. It aims to simplify using SQLAlchemy
|
||||
with Flask by providing useful defaults and extra helpers that make it
|
||||
easier to accomplish common tasks.
|
||||
|
||||
|
||||
Installing
|
||||
----------
|
||||
|
||||
Install and update using `pip`_:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
$ pip install -U Flask-SQLAlchemy
|
||||
|
||||
|
||||
A Simple Example
|
||||
----------------
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from flask import Flask
|
||||
from flask_sqlalchemy import SQLAlchemy
|
||||
|
||||
app = Flask(__name__)
|
||||
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///example.sqlite"
|
||||
db = SQLAlchemy(app)
|
||||
|
||||
|
||||
class User(db.Model):
|
||||
id = db.Column(db.Integer, primary_key=True)
|
||||
username = db.Column(db.String, unique=True, nullable=False)
|
||||
email = db.Column(db.String, unique=True, nullable=False)
|
||||
|
||||
|
||||
db.session.add(User(name="Flask", email="example@example.com"))
|
||||
db.session.commit()
|
||||
|
||||
users = User.query.all()
|
||||
|
||||
|
||||
Links
|
||||
-----
|
||||
|
||||
- Documentation: https://flask-sqlalchemy.palletsprojects.com/
|
||||
- Releases: https://pypi.org/project/Flask-SQLAlchemy/
|
||||
- Code: https://github.com/pallets/flask-sqlalchemy
|
||||
- Issue tracker: https://github.com/pallets/flask-sqlalchemy/issues
|
||||
- Test status: https://travis-ci.org/pallets/flask-sqlalchemy
|
||||
- Test coverage: https://codecov.io/gh/pallets/flask-sqlalchemy
|
||||
|
||||
.. _Flask: https://palletsprojects.com/p/flask/
|
||||
.. _SQLAlchemy: https://www.sqlalchemy.org
|
||||
.. _pip: https://pip.pypa.io/en/stable/quickstart/
|
||||
|
||||
|
||||
@ -0,0 +1,14 @@
|
||||
Flask_SQLAlchemy-2.4.4.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
||||
Flask_SQLAlchemy-2.4.4.dist-info/LICENSE.rst,sha256=SJqOEQhQntmKN7uYPhHg9-HTHwvY-Zp5yESOf_N9B-o,1475
|
||||
Flask_SQLAlchemy-2.4.4.dist-info/METADATA,sha256=1yH4TLt3DLzKOecOhPYiTI0WbP6lfpGt_9DrNfxqEU0,3128
|
||||
Flask_SQLAlchemy-2.4.4.dist-info/RECORD,,
|
||||
Flask_SQLAlchemy-2.4.4.dist-info/WHEEL,sha256=kGT74LWyRUZrL4VgLh6_g12IeVl_9u9ZVhadrgXZUEY,110
|
||||
Flask_SQLAlchemy-2.4.4.dist-info/top_level.txt,sha256=w2K4fNNoTh4HItoFfz2FRQShSeLcvHYrzU_sZov21QU,17
|
||||
flask_sqlalchemy/__init__.py,sha256=3GEH-HwbpHrmd3bFpkFbG66_r1Y0W78wkGDNWG84qz8,39265
|
||||
flask_sqlalchemy/__pycache__/__init__.cpython-38.pyc,,
|
||||
flask_sqlalchemy/__pycache__/_compat.cpython-38.pyc,,
|
||||
flask_sqlalchemy/__pycache__/model.cpython-38.pyc,,
|
||||
flask_sqlalchemy/__pycache__/utils.cpython-38.pyc,,
|
||||
flask_sqlalchemy/_compat.py,sha256=yua0ZSgVWwi56QpEgwaPInzkNQ9PFb7YQdvEk3dImXo,821
|
||||
flask_sqlalchemy/model.py,sha256=bd2mIv9LA1A2MZkQObgnMUCSrxNvyqplaSkCxyxKNxY,4988
|
||||
flask_sqlalchemy/utils.py,sha256=4eHqAbYElnJ3NbSAHhuINckoAHDABoxjleMJD0iKgyg,1390
|
||||
@ -0,0 +1,6 @@
|
||||
Wheel-Version: 1.0
|
||||
Generator: bdist_wheel (0.34.2)
|
||||
Root-Is-Purelib: true
|
||||
Tag: py2-none-any
|
||||
Tag: py3-none-any
|
||||
|
||||
@ -0,0 +1 @@
|
||||
flask_sqlalchemy
|
||||
152
.venv/lib/python3.8/site-packages/IPython/__init__.py
Normal file
152
.venv/lib/python3.8/site-packages/IPython/__init__.py
Normal file
@ -0,0 +1,152 @@
|
||||
# encoding: utf-8
|
||||
"""
|
||||
IPython: tools for interactive and parallel computing in Python.
|
||||
|
||||
https://ipython.org
|
||||
"""
|
||||
#-----------------------------------------------------------------------------
|
||||
# Copyright (c) 2008-2011, IPython Development Team.
|
||||
# Copyright (c) 2001-2007, Fernando Perez <fernando.perez@colorado.edu>
|
||||
# Copyright (c) 2001, Janko Hauser <jhauser@zscout.de>
|
||||
# Copyright (c) 2001, Nathaniel Gray <n8gray@caltech.edu>
|
||||
#
|
||||
# Distributed under the terms of the Modified BSD License.
|
||||
#
|
||||
# The full license is in the file COPYING.txt, distributed with this software.
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Imports
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Setup everything
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# Don't forget to also update setup.py when this changes!
|
||||
if sys.version_info < (3, 6):
|
||||
raise ImportError(
|
||||
"""
|
||||
IPython 7.10+ supports Python 3.6 and above.
|
||||
When using Python 2.7, please install IPython 5.x LTS Long Term Support version.
|
||||
Python 3.3 and 3.4 were supported up to IPython 6.x.
|
||||
Python 3.5 was supported with IPython 7.0 to 7.9.
|
||||
|
||||
See IPython `README.rst` file for more information:
|
||||
|
||||
https://github.com/ipython/ipython/blob/master/README.rst
|
||||
|
||||
""")
|
||||
|
||||
# Make it easy to import extensions - they are always directly on pythonpath.
|
||||
# Therefore, non-IPython modules can be added to extensions directory.
|
||||
# This should probably be in ipapp.py.
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), "extensions"))
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Setup the top level names
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
from .core.getipython import get_ipython
|
||||
from .core import release
|
||||
from .core.application import Application
|
||||
from .terminal.embed import embed
|
||||
|
||||
from .core.interactiveshell import InteractiveShell
|
||||
from .testing import test
|
||||
from .utils.sysinfo import sys_info
|
||||
from .utils.frame import extract_module_locals
|
||||
|
||||
# Release data
|
||||
__author__ = '%s <%s>' % (release.author, release.author_email)
|
||||
__license__ = release.license
|
||||
__version__ = release.version
|
||||
version_info = release.version_info
|
||||
|
||||
def embed_kernel(module=None, local_ns=None, **kwargs):
|
||||
"""Embed and start an IPython kernel in a given scope.
|
||||
|
||||
If you don't want the kernel to initialize the namespace
|
||||
from the scope of the surrounding function,
|
||||
and/or you want to load full IPython configuration,
|
||||
you probably want `IPython.start_kernel()` instead.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
module : types.ModuleType, optional
|
||||
The module to load into IPython globals (default: caller)
|
||||
local_ns : dict, optional
|
||||
The namespace to load into IPython user namespace (default: caller)
|
||||
|
||||
kwargs : various, optional
|
||||
Further keyword args are relayed to the IPKernelApp constructor,
|
||||
allowing configuration of the Kernel. Will only have an effect
|
||||
on the first embed_kernel call for a given process.
|
||||
"""
|
||||
|
||||
(caller_module, caller_locals) = extract_module_locals(1)
|
||||
if module is None:
|
||||
module = caller_module
|
||||
if local_ns is None:
|
||||
local_ns = caller_locals
|
||||
|
||||
# Only import .zmq when we really need it
|
||||
from ipykernel.embed import embed_kernel as real_embed_kernel
|
||||
real_embed_kernel(module=module, local_ns=local_ns, **kwargs)
|
||||
|
||||
def start_ipython(argv=None, **kwargs):
|
||||
"""Launch a normal IPython instance (as opposed to embedded)
|
||||
|
||||
`IPython.embed()` puts a shell in a particular calling scope,
|
||||
such as a function or method for debugging purposes,
|
||||
which is often not desirable.
|
||||
|
||||
`start_ipython()` does full, regular IPython initialization,
|
||||
including loading startup files, configuration, etc.
|
||||
much of which is skipped by `embed()`.
|
||||
|
||||
This is a public API method, and will survive implementation changes.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
|
||||
argv : list or None, optional
|
||||
If unspecified or None, IPython will parse command-line options from sys.argv.
|
||||
To prevent any command-line parsing, pass an empty list: `argv=[]`.
|
||||
user_ns : dict, optional
|
||||
specify this dictionary to initialize the IPython user namespace with particular values.
|
||||
kwargs : various, optional
|
||||
Any other kwargs will be passed to the Application constructor,
|
||||
such as `config`.
|
||||
"""
|
||||
from IPython.terminal.ipapp import launch_new_instance
|
||||
return launch_new_instance(argv=argv, **kwargs)
|
||||
|
||||
def start_kernel(argv=None, **kwargs):
|
||||
"""Launch a normal IPython kernel instance (as opposed to embedded)
|
||||
|
||||
`IPython.embed_kernel()` puts a shell in a particular calling scope,
|
||||
such as a function or method for debugging purposes,
|
||||
which is often not desirable.
|
||||
|
||||
`start_kernel()` does full, regular IPython initialization,
|
||||
including loading startup files, configuration, etc.
|
||||
much of which is skipped by `embed()`.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
|
||||
argv : list or None, optional
|
||||
If unspecified or None, IPython will parse command-line options from sys.argv.
|
||||
To prevent any command-line parsing, pass an empty list: `argv=[]`.
|
||||
user_ns : dict, optional
|
||||
specify this dictionary to initialize the IPython user namespace with particular values.
|
||||
kwargs : various, optional
|
||||
Any other kwargs will be passed to the Application constructor,
|
||||
such as `config`.
|
||||
"""
|
||||
from IPython.kernel.zmq.kernelapp import launch_new_instance
|
||||
return launch_new_instance(argv=argv, **kwargs)
|
||||
14
.venv/lib/python3.8/site-packages/IPython/__main__.py
Normal file
14
.venv/lib/python3.8/site-packages/IPython/__main__.py
Normal file
@ -0,0 +1,14 @@
|
||||
# encoding: utf-8
|
||||
"""Terminal-based IPython entry point.
|
||||
"""
|
||||
#-----------------------------------------------------------------------------
|
||||
# Copyright (c) 2012, IPython Development Team.
|
||||
#
|
||||
# Distributed under the terms of the Modified BSD License.
|
||||
#
|
||||
# The full license is in the file COPYING.txt, distributed with this software.
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
from IPython import start_ipython
|
||||
|
||||
start_ipython()
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
19
.venv/lib/python3.8/site-packages/IPython/config.py
Normal file
19
.venv/lib/python3.8/site-packages/IPython/config.py
Normal file
@ -0,0 +1,19 @@
|
||||
"""
|
||||
Shim to maintain backwards compatibility with old IPython.config imports.
|
||||
"""
|
||||
# Copyright (c) IPython Development Team.
|
||||
# Distributed under the terms of the Modified BSD License.
|
||||
|
||||
import sys
|
||||
from warnings import warn
|
||||
|
||||
from .utils.shimmodule import ShimModule, ShimWarning
|
||||
|
||||
warn("The `IPython.config` package has been deprecated since IPython 4.0. "
|
||||
"You should import from traitlets.config instead.", ShimWarning)
|
||||
|
||||
|
||||
# Unconditionally insert the shim into sys.modules so that further import calls
|
||||
# trigger the custom attribute access above
|
||||
|
||||
sys.modules['IPython.config'] = ShimModule(src='IPython.config', mirror='traitlets.config')
|
||||
69
.venv/lib/python3.8/site-packages/IPython/conftest.py
Normal file
69
.venv/lib/python3.8/site-packages/IPython/conftest.py
Normal file
@ -0,0 +1,69 @@
|
||||
import types
|
||||
import sys
|
||||
import builtins
|
||||
import os
|
||||
import pytest
|
||||
import pathlib
|
||||
import shutil
|
||||
|
||||
from .testing import tools
|
||||
|
||||
|
||||
def get_ipython():
|
||||
from .terminal.interactiveshell import TerminalInteractiveShell
|
||||
if TerminalInteractiveShell._instance:
|
||||
return TerminalInteractiveShell.instance()
|
||||
|
||||
config = tools.default_config()
|
||||
config.TerminalInteractiveShell.simple_prompt = True
|
||||
|
||||
# Create and initialize our test-friendly IPython instance.
|
||||
shell = TerminalInteractiveShell.instance(config=config)
|
||||
return shell
|
||||
|
||||
|
||||
@pytest.fixture(scope='session', autouse=True)
|
||||
def work_path():
|
||||
path = pathlib.Path("./tmp-ipython-pytest-profiledir")
|
||||
os.environ["IPYTHONDIR"] = str(path.absolute())
|
||||
if path.exists():
|
||||
raise ValueError('IPython dir temporary path already exists ! Did previous test run exit successfully ?')
|
||||
path.mkdir()
|
||||
yield
|
||||
shutil.rmtree(str(path.resolve()))
|
||||
|
||||
|
||||
def nopage(strng, start=0, screen_lines=0, pager_cmd=None):
|
||||
if isinstance(strng, dict):
|
||||
strng = strng.get("text/plain", "")
|
||||
print(strng)
|
||||
|
||||
|
||||
def xsys(self, cmd):
|
||||
"""Replace the default system call with a capturing one for doctest.
|
||||
"""
|
||||
# We use getoutput, but we need to strip it because pexpect captures
|
||||
# the trailing newline differently from commands.getoutput
|
||||
print(self.getoutput(cmd, split=False, depth=1).rstrip(), end="", file=sys.stdout)
|
||||
sys.stdout.flush()
|
||||
|
||||
|
||||
# for things to work correctly we would need this as a session fixture;
|
||||
# unfortunately this will fail on some test that get executed as _collection_
|
||||
# time (before the fixture run), in particular parametrized test that contain
|
||||
# yields. so for now execute at import time.
|
||||
#@pytest.fixture(autouse=True, scope='session')
|
||||
def inject():
|
||||
|
||||
builtins.get_ipython = get_ipython
|
||||
builtins._ip = get_ipython()
|
||||
builtins.ip = get_ipython()
|
||||
builtins.ip.system = types.MethodType(xsys, ip)
|
||||
builtins.ip.builtin_trap.activate()
|
||||
from .core import page
|
||||
|
||||
page.pager_page = nopage
|
||||
# yield
|
||||
|
||||
|
||||
inject()
|
||||
12
.venv/lib/python3.8/site-packages/IPython/consoleapp.py
Normal file
12
.venv/lib/python3.8/site-packages/IPython/consoleapp.py
Normal file
@ -0,0 +1,12 @@
|
||||
"""
|
||||
Shim to maintain backwards compatibility with old IPython.consoleapp imports.
|
||||
"""
|
||||
# Copyright (c) IPython Development Team.
|
||||
# Distributed under the terms of the Modified BSD License.
|
||||
|
||||
from warnings import warn
|
||||
|
||||
warn("The `IPython.consoleapp` package has been deprecated since IPython 4.0."
|
||||
"You should import from jupyter_client.consoleapp instead.", stacklevel=2)
|
||||
|
||||
from jupyter_client.consoleapp import *
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user