test
This commit is contained in:
parent
8b4218752d
commit
7331f20423
247
backend/env/bin/Activate.ps1
vendored
247
backend/env/bin/Activate.ps1
vendored
@ -1,247 +0,0 @@
|
|||||||
<#
|
|
||||||
.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 VIRTUAL_ENV_PROMPT altogether.
|
|
||||||
if (Test-Path -Path Env:VIRTUAL_ENV_PROMPT) {
|
|
||||||
Remove-Item -Path env:VIRTUAL_ENV_PROMPT
|
|
||||||
}
|
|
||||||
|
|
||||||
# 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
|
|
||||||
}
|
|
||||||
$env:VIRTUAL_ENV_PROMPT = $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"
|
|
69
backend/env/bin/activate
vendored
69
backend/env/bin/activate
vendored
@ -1,69 +0,0 @@
|
|||||||
# 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 2> /dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then
|
|
||||||
PS1="${_OLD_VIRTUAL_PS1:-}"
|
|
||||||
export PS1
|
|
||||||
unset _OLD_VIRTUAL_PS1
|
|
||||||
fi
|
|
||||||
|
|
||||||
unset VIRTUAL_ENV
|
|
||||||
unset VIRTUAL_ENV_PROMPT
|
|
||||||
if [ ! "${1:-}" = "nondestructive" ] ; then
|
|
||||||
# Self destruct!
|
|
||||||
unset -f deactivate
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# unset irrelevant variables
|
|
||||||
deactivate nondestructive
|
|
||||||
|
|
||||||
VIRTUAL_ENV="/home/lilian/web/generateur_v2/Generateur_v2/backend/env"
|
|
||||||
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:-}"
|
|
||||||
PS1="(env) ${PS1:-}"
|
|
||||||
export PS1
|
|
||||||
VIRTUAL_ENV_PROMPT="(env) "
|
|
||||||
export VIRTUAL_ENV_PROMPT
|
|
||||||
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 2> /dev/null
|
|
||||||
fi
|
|
26
backend/env/bin/activate.csh
vendored
26
backend/env/bin/activate.csh
vendored
@ -1,26 +0,0 @@
|
|||||||
# 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; unsetenv VIRTUAL_ENV_PROMPT; test "\!:*" != "nondestructive" && unalias deactivate'
|
|
||||||
|
|
||||||
# Unset irrelevant variables.
|
|
||||||
deactivate nondestructive
|
|
||||||
|
|
||||||
setenv VIRTUAL_ENV "/home/lilian/web/generateur_v2/Generateur_v2/backend/env"
|
|
||||||
|
|
||||||
set _OLD_VIRTUAL_PATH="$PATH"
|
|
||||||
setenv PATH "$VIRTUAL_ENV/bin:$PATH"
|
|
||||||
|
|
||||||
|
|
||||||
set _OLD_VIRTUAL_PROMPT="$prompt"
|
|
||||||
|
|
||||||
if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then
|
|
||||||
set prompt = "(env) $prompt"
|
|
||||||
setenv VIRTUAL_ENV_PROMPT "(env) "
|
|
||||||
endif
|
|
||||||
|
|
||||||
alias pydoc python -m pydoc
|
|
||||||
|
|
||||||
rehash
|
|
66
backend/env/bin/activate.fish
vendored
66
backend/env/bin/activate.fish
vendored
@ -1,66 +0,0 @@
|
|||||||
# This file must be used with "source <venv>/bin/activate.fish" *from fish*
|
|
||||||
# (https://fishshell.com/); you cannot run it directly.
|
|
||||||
|
|
||||||
function deactivate -d "Exit virtual environment 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
|
|
||||||
set -e VIRTUAL_ENV_PROMPT
|
|
||||||
if test "$argv[1]" != "nondestructive"
|
|
||||||
# Self-destruct!
|
|
||||||
functions -e deactivate
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# Unset irrelevant variables.
|
|
||||||
deactivate nondestructive
|
|
||||||
|
|
||||||
set -gx VIRTUAL_ENV "/home/lilian/web/generateur_v2/Generateur_v2/backend/env"
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
# Output the venv prompt; color taken from the blue of the Python logo.
|
|
||||||
printf "%s%s%s" (set_color 4B8BBE) "(env) " (set_color normal)
|
|
||||||
|
|
||||||
# Restore the return status of the previous command.
|
|
||||||
echo "exit $old_status" | .
|
|
||||||
# Output the original/"old" prompt.
|
|
||||||
_old_fish_prompt
|
|
||||||
end
|
|
||||||
|
|
||||||
set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV"
|
|
||||||
set -gx VIRTUAL_ENV_PROMPT "(env) "
|
|
||||||
end
|
|
8
backend/env/bin/automat-visualize
vendored
8
backend/env/bin/automat-visualize
vendored
@ -1,8 +0,0 @@
|
|||||||
#!/home/lilian/web/generateur_v2/Generateur_v2/backend/env/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
from automat._visualize import tool
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
|
||||||
sys.exit(tool())
|
|
8
backend/env/bin/autopep8
vendored
8
backend/env/bin/autopep8
vendored
@ -1,8 +0,0 @@
|
|||||||
#!/home/lilian/web/generateur_v2/Generateur_v2/backend/env/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
from autopep8 import main
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
|
||||||
sys.exit(main())
|
|
8
backend/env/bin/cftp
vendored
8
backend/env/bin/cftp
vendored
@ -1,8 +0,0 @@
|
|||||||
#!/home/lilian/web/generateur_v2/Generateur_v2/backend/env/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
from twisted.conch.scripts.cftp import run
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
|
||||||
sys.exit(run())
|
|
8
backend/env/bin/ckeygen
vendored
8
backend/env/bin/ckeygen
vendored
@ -1,8 +0,0 @@
|
|||||||
#!/home/lilian/web/generateur_v2/Generateur_v2/backend/env/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
from twisted.conch.scripts.ckeygen import run
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
|
||||||
sys.exit(run())
|
|
8
backend/env/bin/conch
vendored
8
backend/env/bin/conch
vendored
@ -1,8 +0,0 @@
|
|||||||
#!/home/lilian/web/generateur_v2/Generateur_v2/backend/env/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
from twisted.conch.scripts.conch import run
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
|
||||||
sys.exit(run())
|
|
8
backend/env/bin/daphne
vendored
8
backend/env/bin/daphne
vendored
@ -1,8 +0,0 @@
|
|||||||
#!/home/lilian/web/generateur_v2/Generateur_v2/backend/env/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
from daphne.cli import CommandLineInterface
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
|
||||||
sys.exit(CommandLineInterface.entrypoint())
|
|
8
backend/env/bin/django-admin
vendored
8
backend/env/bin/django-admin
vendored
@ -1,8 +0,0 @@
|
|||||||
#!/home/lilian/web/generateur_v2/Generateur_v2/backend/env/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
from django.core.management import execute_from_command_line
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
|
||||||
sys.exit(execute_from_command_line())
|
|
8
backend/env/bin/faker
vendored
8
backend/env/bin/faker
vendored
@ -1,8 +0,0 @@
|
|||||||
#!/home/lilian/web/generateur_v2/Generateur_v2/backend/env/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
from faker.cli import execute_from_command_line
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
|
||||||
sys.exit(execute_from_command_line())
|
|
8
backend/env/bin/fonttools
vendored
8
backend/env/bin/fonttools
vendored
@ -1,8 +0,0 @@
|
|||||||
#!/home/lilian/web/generateur_v2/Generateur_v2/backend/env/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
from fontTools.__main__ import main
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
|
||||||
sys.exit(main())
|
|
8
backend/env/bin/isympy
vendored
8
backend/env/bin/isympy
vendored
@ -1,8 +0,0 @@
|
|||||||
#!/home/lilian/web/generateur_v2/Generateur_v2/backend/env/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
from isympy import main
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
|
||||||
sys.exit(main())
|
|
8
backend/env/bin/mailmail
vendored
8
backend/env/bin/mailmail
vendored
@ -1,8 +0,0 @@
|
|||||||
#!/home/lilian/web/generateur_v2/Generateur_v2/backend/env/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
from twisted.mail.scripts.mailmail import run
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
|
||||||
sys.exit(run())
|
|
8
backend/env/bin/markdown_py
vendored
8
backend/env/bin/markdown_py
vendored
@ -1,8 +0,0 @@
|
|||||||
#!/home/lilian/web/generateur_v2/Generateur_v2/backend/env/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
from markdown.__main__ import run
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
|
||||||
sys.exit(run())
|
|
8
backend/env/bin/normalizer
vendored
8
backend/env/bin/normalizer
vendored
@ -1,8 +0,0 @@
|
|||||||
#!/home/lilian/web/generateur_v2/Generateur_v2/backend/env/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
from charset_normalizer.cli.normalizer import cli_detect
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
|
||||||
sys.exit(cli_detect())
|
|
8
backend/env/bin/pip
vendored
8
backend/env/bin/pip
vendored
@ -1,8 +0,0 @@
|
|||||||
#!/home/lilian/web/generateur_v2/Generateur_v2/backend/env/bin/python
|
|
||||||
# -*- 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
backend/env/bin/pip3
vendored
8
backend/env/bin/pip3
vendored
@ -1,8 +0,0 @@
|
|||||||
#!/home/lilian/web/generateur_v2/Generateur_v2/backend/env/bin/python
|
|
||||||
# -*- 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
backend/env/bin/pip3.10
vendored
8
backend/env/bin/pip3.10
vendored
@ -1,8 +0,0 @@
|
|||||||
#!/home/lilian/web/generateur_v2/Generateur_v2/backend/env/bin/python
|
|
||||||
# -*- 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
backend/env/bin/pycodestyle
vendored
8
backend/env/bin/pycodestyle
vendored
@ -1,8 +0,0 @@
|
|||||||
#!/home/lilian/web/generateur_v2/Generateur_v2/backend/env/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
from pycodestyle import _main
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
|
||||||
sys.exit(_main())
|
|
8
backend/env/bin/pyftmerge
vendored
8
backend/env/bin/pyftmerge
vendored
@ -1,8 +0,0 @@
|
|||||||
#!/home/lilian/web/generateur_v2/Generateur_v2/backend/env/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
from fontTools.merge import main
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
|
||||||
sys.exit(main())
|
|
8
backend/env/bin/pyftsubset
vendored
8
backend/env/bin/pyftsubset
vendored
@ -1,8 +0,0 @@
|
|||||||
#!/home/lilian/web/generateur_v2/Generateur_v2/backend/env/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
from fontTools.subset import main
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
|
||||||
sys.exit(main())
|
|
8
backend/env/bin/pyhtmlizer
vendored
8
backend/env/bin/pyhtmlizer
vendored
@ -1,8 +0,0 @@
|
|||||||
#!/home/lilian/web/generateur_v2/Generateur_v2/backend/env/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
from twisted.scripts.htmlizer import run
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
|
||||||
sys.exit(run())
|
|
1
backend/env/bin/python
vendored
1
backend/env/bin/python
vendored
@ -1 +0,0 @@
|
|||||||
/usr/bin/python
|
|
1
backend/env/bin/python3
vendored
1
backend/env/bin/python3
vendored
@ -1 +0,0 @@
|
|||||||
python
|
|
1
backend/env/bin/python3.10
vendored
1
backend/env/bin/python3.10
vendored
@ -1 +0,0 @@
|
|||||||
python
|
|
8
backend/env/bin/sqlformat
vendored
8
backend/env/bin/sqlformat
vendored
@ -1,8 +0,0 @@
|
|||||||
#!/home/lilian/web/generateur_v2/Generateur_v2/backend/env/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
from sqlparse.__main__ import main
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
|
||||||
sys.exit(main())
|
|
8
backend/env/bin/tkconch
vendored
8
backend/env/bin/tkconch
vendored
@ -1,8 +0,0 @@
|
|||||||
#!/home/lilian/web/generateur_v2/Generateur_v2/backend/env/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
from twisted.conch.scripts.tkconch import run
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
|
||||||
sys.exit(run())
|
|
8
backend/env/bin/trial
vendored
8
backend/env/bin/trial
vendored
@ -1,8 +0,0 @@
|
|||||||
#!/home/lilian/web/generateur_v2/Generateur_v2/backend/env/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
from twisted.scripts.trial import run
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
|
||||||
sys.exit(run())
|
|
8
backend/env/bin/ttx
vendored
8
backend/env/bin/ttx
vendored
@ -1,8 +0,0 @@
|
|||||||
#!/home/lilian/web/generateur_v2/Generateur_v2/backend/env/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
from fontTools.ttx import main
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
|
||||||
sys.exit(main())
|
|
8
backend/env/bin/twist
vendored
8
backend/env/bin/twist
vendored
@ -1,8 +0,0 @@
|
|||||||
#!/home/lilian/web/generateur_v2/Generateur_v2/backend/env/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
from twisted.application.twist._twist import Twist
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
|
||||||
sys.exit(Twist.main())
|
|
8
backend/env/bin/twistd
vendored
8
backend/env/bin/twistd
vendored
@ -1,8 +0,0 @@
|
|||||||
#!/home/lilian/web/generateur_v2/Generateur_v2/backend/env/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
from twisted.scripts.twistd import run
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
|
||||||
sys.exit(run())
|
|
33
backend/env/bin/wamp
vendored
33
backend/env/bin/wamp
vendored
@ -1,33 +0,0 @@
|
|||||||
#!/home/lilian/web/generateur_v2/Generateur_v2/backend/env/bin/python
|
|
||||||
# EASY-INSTALL-ENTRY-SCRIPT: 'autobahn==22.3.2','console_scripts','wamp'
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
|
|
||||||
# for compatibility with easy_install; see #2198
|
|
||||||
__requires__ = 'autobahn==22.3.2'
|
|
||||||
|
|
||||||
try:
|
|
||||||
from importlib.metadata import distribution
|
|
||||||
except ImportError:
|
|
||||||
try:
|
|
||||||
from importlib_metadata import distribution
|
|
||||||
except ImportError:
|
|
||||||
from pkg_resources import load_entry_point
|
|
||||||
|
|
||||||
|
|
||||||
def importlib_load_entry_point(spec, group, name):
|
|
||||||
dist_name, _, _ = spec.partition('==')
|
|
||||||
matches = (
|
|
||||||
entry_point
|
|
||||||
for entry_point in distribution(dist_name).entry_points
|
|
||||||
if entry_point.group == group and entry_point.name == name
|
|
||||||
)
|
|
||||||
return next(matches).load()
|
|
||||||
|
|
||||||
|
|
||||||
globals().setdefault('load_entry_point', importlib_load_entry_point)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
|
|
||||||
sys.exit(load_entry_point('autobahn==22.3.2', 'console_scripts', 'wamp')())
|
|
33
backend/env/bin/xbrnetwork
vendored
33
backend/env/bin/xbrnetwork
vendored
@ -1,33 +0,0 @@
|
|||||||
#!/home/lilian/web/generateur_v2/Generateur_v2/backend/env/bin/python
|
|
||||||
# EASY-INSTALL-ENTRY-SCRIPT: 'autobahn==22.3.2','console_scripts','xbrnetwork'
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
|
|
||||||
# for compatibility with easy_install; see #2198
|
|
||||||
__requires__ = 'autobahn==22.3.2'
|
|
||||||
|
|
||||||
try:
|
|
||||||
from importlib.metadata import distribution
|
|
||||||
except ImportError:
|
|
||||||
try:
|
|
||||||
from importlib_metadata import distribution
|
|
||||||
except ImportError:
|
|
||||||
from pkg_resources import load_entry_point
|
|
||||||
|
|
||||||
|
|
||||||
def importlib_load_entry_point(spec, group, name):
|
|
||||||
dist_name, _, _ = spec.partition('==')
|
|
||||||
matches = (
|
|
||||||
entry_point
|
|
||||||
for entry_point in distribution(dist_name).entry_points
|
|
||||||
if entry_point.group == group and entry_point.name == name
|
|
||||||
)
|
|
||||||
return next(matches).load()
|
|
||||||
|
|
||||||
|
|
||||||
globals().setdefault('load_entry_point', importlib_load_entry_point)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
|
|
||||||
sys.exit(load_entry_point('autobahn==22.3.2', 'console_scripts', 'xbrnetwork')())
|
|
33
backend/env/bin/xbrnetwork-ui
vendored
33
backend/env/bin/xbrnetwork-ui
vendored
@ -1,33 +0,0 @@
|
|||||||
#!/home/lilian/web/generateur_v2/Generateur_v2/backend/env/bin/python
|
|
||||||
# EASY-INSTALL-ENTRY-SCRIPT: 'autobahn==22.3.2','console_scripts','xbrnetwork-ui'
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
|
|
||||||
# for compatibility with easy_install; see #2198
|
|
||||||
__requires__ = 'autobahn==22.3.2'
|
|
||||||
|
|
||||||
try:
|
|
||||||
from importlib.metadata import distribution
|
|
||||||
except ImportError:
|
|
||||||
try:
|
|
||||||
from importlib_metadata import distribution
|
|
||||||
except ImportError:
|
|
||||||
from pkg_resources import load_entry_point
|
|
||||||
|
|
||||||
|
|
||||||
def importlib_load_entry_point(spec, group, name):
|
|
||||||
dist_name, _, _ = spec.partition('==')
|
|
||||||
matches = (
|
|
||||||
entry_point
|
|
||||||
for entry_point in distribution(dist_name).entry_points
|
|
||||||
if entry_point.group == group and entry_point.name == name
|
|
||||||
)
|
|
||||||
return next(matches).load()
|
|
||||||
|
|
||||||
|
|
||||||
globals().setdefault('load_entry_point', importlib_load_entry_point)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
|
|
||||||
sys.exit(load_entry_point('autobahn==22.3.2', 'console_scripts', 'xbrnetwork-ui')())
|
|
@ -1 +0,0 @@
|
|||||||
pip
|
|
@ -1,21 +0,0 @@
|
|||||||
Copyright (c) 2014
|
|
||||||
Rackspace
|
|
||||||
|
|
||||||
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.
|
|
@ -1,487 +0,0 @@
|
|||||||
Metadata-Version: 2.1
|
|
||||||
Name: Automat
|
|
||||||
Version: 20.2.0
|
|
||||||
Summary: Self-service finite-state machines for the programmer on the go.
|
|
||||||
Home-page: https://github.com/glyph/Automat
|
|
||||||
Author: Glyph
|
|
||||||
Author-email: glyph@twistedmatrix.com
|
|
||||||
License: MIT
|
|
||||||
Keywords: fsm finite state machine automata
|
|
||||||
Platform: UNKNOWN
|
|
||||||
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.5
|
|
||||||
Classifier: Programming Language :: Python :: 3.6
|
|
||||||
Classifier: Programming Language :: Python :: 3.7
|
|
||||||
Classifier: Programming Language :: Python :: 3.8
|
|
||||||
Requires-Dist: attrs (>=19.2.0)
|
|
||||||
Requires-Dist: six
|
|
||||||
Provides-Extra: visualize
|
|
||||||
Requires-Dist: graphviz (>0.5.1); extra == 'visualize'
|
|
||||||
Requires-Dist: Twisted (>=16.1.1); extra == 'visualize'
|
|
||||||
|
|
||||||
|
|
||||||
Automat
|
|
||||||
=======
|
|
||||||
|
|
||||||
|
|
||||||
.. image:: https://readthedocs.org/projects/automat/badge/?version=latest
|
|
||||||
:target: http://automat.readthedocs.io/en/latest/
|
|
||||||
:alt: Documentation Status
|
|
||||||
|
|
||||||
|
|
||||||
.. image:: https://travis-ci.org/glyph/automat.svg?branch=master
|
|
||||||
:target: https://travis-ci.org/glyph/automat
|
|
||||||
:alt: Build Status
|
|
||||||
|
|
||||||
|
|
||||||
.. image:: https://coveralls.io/repos/glyph/automat/badge.png
|
|
||||||
:target: https://coveralls.io/r/glyph/automat
|
|
||||||
:alt: Coverage Status
|
|
||||||
|
|
||||||
|
|
||||||
Self-service finite-state machines for the programmer on the go.
|
|
||||||
----------------------------------------------------------------
|
|
||||||
|
|
||||||
Automat is a library for concise, idiomatic Python expression of finite-state
|
|
||||||
automata (particularly deterministic finite-state transducers).
|
|
||||||
|
|
||||||
Read more here, or on `Read the Docs <https://automat.readthedocs.io/>`_\ , or watch the following videos for an overview and presentation
|
|
||||||
|
|
||||||
Overview and presentation by **Glyph Lefkowitz** at the first talk of the first Pyninsula meetup, on February 21st, 2017:
|
|
||||||
|
|
||||||
.. image:: https://img.youtube.com/vi/0wOZBpD1VVk/0.jpg
|
|
||||||
:target: https://www.youtube.com/watch?v=0wOZBpD1VVk
|
|
||||||
:alt: Glyph Lefkowitz - Automat - Pyninsula #0
|
|
||||||
|
|
||||||
|
|
||||||
Presentation by **Clinton Roy** at PyCon Australia, on August 6th 2017:
|
|
||||||
|
|
||||||
.. image:: https://img.youtube.com/vi/TedUKXhu9kE/0.jpg
|
|
||||||
:target: https://www.youtube.com/watch?v=TedUKXhu9kE
|
|
||||||
:alt: Clinton Roy - State Machines - Pycon Australia 2017
|
|
||||||
|
|
||||||
|
|
||||||
Why use state machines?
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
Sometimes you have to create an object whose behavior varies with its state,
|
|
||||||
but still wishes to present a consistent interface to its callers.
|
|
||||||
|
|
||||||
For example, let's say you're writing the software for a coffee machine. It
|
|
||||||
has a lid that can be opened or closed, a chamber for water, a chamber for
|
|
||||||
coffee beans, and a button for "brew".
|
|
||||||
|
|
||||||
There are a number of possible states for the coffee machine. It might or
|
|
||||||
might not have water. It might or might not have beans. The lid might be open
|
|
||||||
or closed. The "brew" button should only actually attempt to brew coffee in
|
|
||||||
one of these configurations, and the "open lid" button should only work if the
|
|
||||||
coffee is not, in fact, brewing.
|
|
||||||
|
|
||||||
With diligence and attention to detail, you can implement this correctly using
|
|
||||||
a collection of attributes on an object; ``has_water``\ , ``has_beans``\ ,
|
|
||||||
``is_lid_open`` and so on. However, you have to keep all these attributes
|
|
||||||
consistent. As the coffee maker becomes more complex - perhaps you add an
|
|
||||||
additional chamber for flavorings so you can make hazelnut coffee, for
|
|
||||||
example - you have to keep adding more and more checks and more and more
|
|
||||||
reasoning about which combinations of states are allowed.
|
|
||||||
|
|
||||||
Rather than adding tedious 'if' checks to every single method to make sure that
|
|
||||||
each of these flags are exactly what you expect, you can use a state machine to
|
|
||||||
ensure that if your code runs at all, it will be run with all the required
|
|
||||||
values initialized, because they have to be called in the order you declare
|
|
||||||
them.
|
|
||||||
|
|
||||||
You can read about state machines and their advantages for Python programmers
|
|
||||||
in considerably more detail
|
|
||||||
`in this excellent series of articles from ClusterHQ <https://clusterhq.com/blog/what-is-a-state-machine/>`_.
|
|
||||||
|
|
||||||
What makes Automat different?
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
There are
|
|
||||||
`dozens of libraries on PyPI implementing state machines <https://pypi.org/search/?q=finite+state+machine>`_.
|
|
||||||
So it behooves me to say why yet another one would be a good idea.
|
|
||||||
|
|
||||||
Automat is designed around this principle: while organizing your code around
|
|
||||||
state machines is a good idea, your callers don't, and shouldn't have to, care
|
|
||||||
that you've done so. In Python, the "input" to a stateful system is a method
|
|
||||||
call; the "output" may be a method call, if you need to invoke a side effect,
|
|
||||||
or a return value, if you are just performing a computation in memory. Most
|
|
||||||
other state-machine libraries require you to explicitly create an input object,
|
|
||||||
provide that object to a generic "input" method, and then receive results,
|
|
||||||
sometimes in terms of that library's interfaces and sometimes in terms of
|
|
||||||
classes you define yourself.
|
|
||||||
|
|
||||||
For example, a snippet of the coffee-machine example above might be implemented
|
|
||||||
as follows in naive Python:
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
class CoffeeMachine(object):
|
|
||||||
def brew_button(self):
|
|
||||||
if self.has_water and self.has_beans and not self.is_lid_open:
|
|
||||||
self.heat_the_heating_element()
|
|
||||||
# ...
|
|
||||||
|
|
||||||
With Automat, you'd create a class with a ``MethodicalMachine`` attribute:
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
from automat import MethodicalMachine
|
|
||||||
|
|
||||||
class CoffeeBrewer(object):
|
|
||||||
_machine = MethodicalMachine()
|
|
||||||
|
|
||||||
and then you would break the above logic into two pieces - the ``brew_button``
|
|
||||||
*input*\ , declared like so:
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
@_machine.input()
|
|
||||||
def brew_button(self):
|
|
||||||
"The user pressed the 'brew' button."
|
|
||||||
|
|
||||||
It wouldn't do any good to declare a method *body* on this, however, because
|
|
||||||
input methods don't actually execute their bodies when called; doing actual
|
|
||||||
work is the *output*\ 's job:
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
@_machine.output()
|
|
||||||
def _heat_the_heating_element(self):
|
|
||||||
"Heat up the heating element, which should cause coffee to happen."
|
|
||||||
self._heating_element.turn_on()
|
|
||||||
|
|
||||||
As well as a couple of *states* - and for simplicity's sake let's say that the
|
|
||||||
only two states are ``have_beans`` and ``dont_have_beans``\ :
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
@_machine.state()
|
|
||||||
def have_beans(self):
|
|
||||||
"In this state, you have some beans."
|
|
||||||
@_machine.state(initial=True)
|
|
||||||
def dont_have_beans(self):
|
|
||||||
"In this state, you don't have any beans."
|
|
||||||
|
|
||||||
``dont_have_beans`` is the ``initial`` state because ``CoffeeBrewer`` starts without beans
|
|
||||||
in it.
|
|
||||||
|
|
||||||
(And another input to put some beans in:)
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
@_machine.input()
|
|
||||||
def put_in_beans(self):
|
|
||||||
"The user put in some beans."
|
|
||||||
|
|
||||||
Finally, you hook everything together with the ``upon`` method of the functions
|
|
||||||
decorated with ``_machine.state``\ :
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
|
|
||||||
# When we don't have beans, upon putting in beans, we will then have beans
|
|
||||||
# (and produce no output)
|
|
||||||
dont_have_beans.upon(put_in_beans, enter=have_beans, outputs=[])
|
|
||||||
|
|
||||||
# When we have beans, upon pressing the brew button, we will then not have
|
|
||||||
# beans any more (as they have been entered into the brewing chamber) and
|
|
||||||
# our output will be heating the heating element.
|
|
||||||
have_beans.upon(brew_button, enter=dont_have_beans,
|
|
||||||
outputs=[_heat_the_heating_element])
|
|
||||||
|
|
||||||
To *users* of this coffee machine class though, it still looks like a POPO
|
|
||||||
(Plain Old Python Object):
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
>>> coffee_machine = CoffeeMachine()
|
|
||||||
>>> coffee_machine.put_in_beans()
|
|
||||||
>>> coffee_machine.brew_button()
|
|
||||||
|
|
||||||
All of the *inputs* are provided by calling them like methods, all of the
|
|
||||||
*outputs* are automatically invoked when they are produced according to the
|
|
||||||
outputs specified to ``upon`` and all of the states are simply opaque tokens -
|
|
||||||
although the fact that they're defined as methods like inputs and outputs
|
|
||||||
allows you to put docstrings on them easily to document them.
|
|
||||||
|
|
||||||
How do I get the current state of a state machine?
|
|
||||||
--------------------------------------------------
|
|
||||||
|
|
||||||
Don't do that.
|
|
||||||
|
|
||||||
One major reason for having a state machine is that you want the callers of the
|
|
||||||
state machine to just provide the appropriate input to the machine at the
|
|
||||||
appropriate time, and *not have to check themselves* what state the machine is
|
|
||||||
in. So if you are tempted to write some code like this:
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
if connection_state_machine.state == "CONNECTED":
|
|
||||||
connection_state_machine.send_message()
|
|
||||||
else:
|
|
||||||
print("not connected")
|
|
||||||
|
|
||||||
Instead, just make your calling code do this:
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
connection_state_machine.send_message()
|
|
||||||
|
|
||||||
and then change your state machine to look like this:
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
@_machine.state()
|
|
||||||
def connected(self):
|
|
||||||
"connected"
|
|
||||||
@_machine.state()
|
|
||||||
def not_connected(self):
|
|
||||||
"not connected"
|
|
||||||
@_machine.input()
|
|
||||||
def send_message(self):
|
|
||||||
"send a message"
|
|
||||||
@_machine.output()
|
|
||||||
def _actually_send_message(self):
|
|
||||||
self._transport.send(b"message")
|
|
||||||
@_machine.output()
|
|
||||||
def _report_sending_failure(self):
|
|
||||||
print("not connected")
|
|
||||||
connected.upon(send_message, enter=connected, [_actually_send_message])
|
|
||||||
not_connected.upon(send_message, enter=not_connected, [_report_sending_failure])
|
|
||||||
|
|
||||||
so that the responsibility for knowing which state the state machine is in
|
|
||||||
remains within the state machine itself.
|
|
||||||
|
|
||||||
Input for Inputs and Output for Outputs
|
|
||||||
---------------------------------------
|
|
||||||
|
|
||||||
Quite often you want to be able to pass parameters to your methods, as well as
|
|
||||||
inspecting their results. For example, when you brew the coffee, you might
|
|
||||||
expect a cup of coffee to result, and you would like to see what kind of coffee
|
|
||||||
it is. And if you were to put delicious hand-roasted small-batch artisanal
|
|
||||||
beans into the machine, you would expect a *better* cup of coffee than if you
|
|
||||||
were to use mass-produced beans. You would do this in plain old Python by
|
|
||||||
adding a parameter, so that's how you do it in Automat as well.
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
@_machine.input()
|
|
||||||
def put_in_beans(self, beans):
|
|
||||||
"The user put in some beans."
|
|
||||||
|
|
||||||
However, one important difference here is that *we can't add any
|
|
||||||
implementation code to the input method*. Inputs are purely a declaration of
|
|
||||||
the interface; the behavior must all come from outputs. Therefore, the change
|
|
||||||
in the state of the coffee machine must be represented as an output. We can
|
|
||||||
add an output method like this:
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
@_machine.output()
|
|
||||||
def _save_beans(self, beans):
|
|
||||||
"The beans are now in the machine; save them."
|
|
||||||
self._beans = beans
|
|
||||||
|
|
||||||
and then connect it to the ``put_in_beans`` by changing the transition from
|
|
||||||
``dont_have_beans`` to ``have_beans`` like so:
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
dont_have_beans.upon(put_in_beans, enter=have_beans,
|
|
||||||
outputs=[_save_beans])
|
|
||||||
|
|
||||||
Now, when you call:
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
coffee_machine.put_in_beans("real good beans")
|
|
||||||
|
|
||||||
the machine will remember the beans for later.
|
|
||||||
|
|
||||||
So how do we get the beans back out again? One of our outputs needs to have a
|
|
||||||
return value. It would make sense if our ``brew_button`` method returned the cup
|
|
||||||
of coffee that it made, so we should add an output. So, in addition to heating
|
|
||||||
the heating element, let's add a return value that describes the coffee. First
|
|
||||||
a new output:
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
@_machine.output()
|
|
||||||
def _describe_coffee(self):
|
|
||||||
return "A cup of coffee made with {}.".format(self._beans)
|
|
||||||
|
|
||||||
Note that we don't need to check first whether ``self._beans`` exists or not,
|
|
||||||
because we can only reach this output method if the state machine says we've
|
|
||||||
gone through a set of states that sets this attribute.
|
|
||||||
|
|
||||||
Now, we need to hook up ``_describe_coffee`` to the process of brewing, so change
|
|
||||||
the brewing transition to:
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
have_beans.upon(brew_button, enter=dont_have_beans,
|
|
||||||
outputs=[_heat_the_heating_element,
|
|
||||||
_describe_coffee])
|
|
||||||
|
|
||||||
Now, we can call it:
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
>>> coffee_machine.brew_button()
|
|
||||||
[None, 'A cup of coffee made with real good beans.']
|
|
||||||
|
|
||||||
Except... wait a second, what's that ``None`` doing there?
|
|
||||||
|
|
||||||
Since every input can produce multiple outputs, in automat, the default return
|
|
||||||
value from every input invocation is a ``list``. In this case, we have both
|
|
||||||
``_heat_the_heating_element`` and ``_describe_coffee`` outputs, so we're seeing
|
|
||||||
both of their return values. However, this can be customized, with the
|
|
||||||
``collector`` argument to ``upon``\ ; the ``collector`` is a callable which takes an
|
|
||||||
iterable of all the outputs' return values and "collects" a single return value
|
|
||||||
to return to the caller of the state machine.
|
|
||||||
|
|
||||||
In this case, we only care about the last output, so we can adjust the call to
|
|
||||||
``upon`` like this:
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
have_beans.upon(brew_button, enter=dont_have_beans,
|
|
||||||
outputs=[_heat_the_heating_element,
|
|
||||||
_describe_coffee],
|
|
||||||
collector=lambda iterable: list(iterable)[-1]
|
|
||||||
)
|
|
||||||
|
|
||||||
And now, we'll get just the return value we want:
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
>>> coffee_machine.brew_button()
|
|
||||||
'A cup of coffee made with real good beans.'
|
|
||||||
|
|
||||||
If I can't get the state of the state machine, how can I save it to (a database, an API response, a file on disk...)
|
|
||||||
--------------------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
There are APIs for serializing the state machine.
|
|
||||||
|
|
||||||
First, you have to decide on a persistent representation of each state, via the
|
|
||||||
``serialized=`` argument to the ``MethodicalMachine.state()`` decorator.
|
|
||||||
|
|
||||||
Let's take this very simple "light switch" state machine, which can be on or
|
|
||||||
off, and flipped to reverse its state:
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
class LightSwitch(object):
|
|
||||||
_machine = MethodicalMachine()
|
|
||||||
@_machine.state(serialized="on")
|
|
||||||
def on_state(self):
|
|
||||||
"the switch is on"
|
|
||||||
@_machine.state(serialized="off", initial=True)
|
|
||||||
def off_state(self):
|
|
||||||
"the switch is off"
|
|
||||||
@_machine.input()
|
|
||||||
def flip(self):
|
|
||||||
"flip the switch"
|
|
||||||
on_state.upon(flip, enter=off_state, outputs=[])
|
|
||||||
off_state.upon(flip, enter=on_state, outputs=[])
|
|
||||||
|
|
||||||
In this case, we've chosen a serialized representation for each state via the
|
|
||||||
``serialized`` argument. The on state is represented by the string ``"on"``\ , and
|
|
||||||
the off state is represented by the string ``"off"``.
|
|
||||||
|
|
||||||
Now, let's just add an input that lets us tell if the switch is on or not.
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
@_machine.input()
|
|
||||||
def query_power(self):
|
|
||||||
"return True if powered, False otherwise"
|
|
||||||
@_machine.output()
|
|
||||||
def _is_powered(self):
|
|
||||||
return True
|
|
||||||
@_machine.output()
|
|
||||||
def _not_powered(self):
|
|
||||||
return False
|
|
||||||
on_state.upon(query_power, enter=on_state, outputs=[_is_powered],
|
|
||||||
collector=next)
|
|
||||||
off_state.upon(query_power, enter=off_state, outputs=[_not_powered],
|
|
||||||
collector=next)
|
|
||||||
|
|
||||||
To save the state, we have the ``MethodicalMachine.serializer()`` method. A
|
|
||||||
method decorated with ``@serializer()`` gets an extra argument injected at the
|
|
||||||
beginning of its argument list: the serialized identifier for the state. In
|
|
||||||
this case, either ``"on"`` or ``"off"``. Since state machine output methods can
|
|
||||||
also affect other state on the object, a serializer method is expected to
|
|
||||||
return *all* relevant state for serialization.
|
|
||||||
|
|
||||||
For our simple light switch, such a method might look like this:
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
@_machine.serializer()
|
|
||||||
def save(self, state):
|
|
||||||
return {"is-it-on": state}
|
|
||||||
|
|
||||||
Serializers can be public methods, and they can return whatever you like. If
|
|
||||||
necessary, you can have different serializers - just multiple methods decorated
|
|
||||||
with ``@_machine.serializer()`` - for different formats; return one data-structure
|
|
||||||
for JSON, one for XML, one for a database row, and so on.
|
|
||||||
|
|
||||||
When it comes time to unserialize, though, you generally want a private method,
|
|
||||||
because an unserializer has to take a not-fully-initialized instance and
|
|
||||||
populate it with state. It is expected to *return* the serialized machine
|
|
||||||
state token that was passed to the serializer, but it can take whatever
|
|
||||||
arguments you like. Of course, in order to return that, it probably has to
|
|
||||||
take it somewhere in its arguments, so it will generally take whatever a paired
|
|
||||||
serializer has returned as an argument.
|
|
||||||
|
|
||||||
So our unserializer would look like this:
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
@_machine.unserializer()
|
|
||||||
def _restore(self, blob):
|
|
||||||
return blob["is-it-on"]
|
|
||||||
|
|
||||||
Generally you will want a classmethod deserialization constructor which you
|
|
||||||
write yourself to call this, so that you know how to create an instance of your
|
|
||||||
own object, like so:
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def from_blob(cls, blob):
|
|
||||||
self = cls()
|
|
||||||
self._restore(blob)
|
|
||||||
return self
|
|
||||||
|
|
||||||
Saving and loading our ``LightSwitch`` along with its state-machine state can now
|
|
||||||
be accomplished as follows:
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
>>> switch1 = LightSwitch()
|
|
||||||
>>> switch1.query_power()
|
|
||||||
False
|
|
||||||
>>> switch1.flip()
|
|
||||||
[]
|
|
||||||
>>> switch1.query_power()
|
|
||||||
True
|
|
||||||
>>> blob = switch1.save()
|
|
||||||
>>> switch2 = LightSwitch.from_blob(blob)
|
|
||||||
>>> switch2.query_power()
|
|
||||||
True
|
|
||||||
|
|
||||||
More comprehensive (tested, working) examples are present in ``docs/examples``.
|
|
||||||
|
|
||||||
Go forth and machine all the state!
|
|
||||||
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
|||||||
../../../bin/automat-visualize,sha256=iBI6lrDiWkdlyh-9r1DwssBnM8C5pNsehJvYRY-Wep0,268
|
|
||||||
Automat-20.2.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
|
||||||
Automat-20.2.0.dist-info/LICENSE,sha256=siATAWeNCpN9k4VDgnyhNgcS6zTiPejuPzv_-9TA43Y,1053
|
|
||||||
Automat-20.2.0.dist-info/METADATA,sha256=RlZub3EgNMk1YDCNYTDJ80ksrBRzPjgzVnYsLrS44nU,17919
|
|
||||||
Automat-20.2.0.dist-info/RECORD,,
|
|
||||||
Automat-20.2.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
||||||
Automat-20.2.0.dist-info/WHEEL,sha256=CihQvCnsGZQBGAHLEUMf0IdA4fRduS_NBUTMgCTtvPM,110
|
|
||||||
Automat-20.2.0.dist-info/entry_points.txt,sha256=i4tDM5qwy3v1KIN7ETS2XRVcHkThhkq7ZFTPuyP6BpA,63
|
|
||||||
Automat-20.2.0.dist-info/top_level.txt,sha256=vg4zAOyhP_3YCmpKZLNgFw1uMF3lC_b6TKsdz7jBSpI,8
|
|
||||||
automat/__init__.py,sha256=ec8PILBwt35xyzsstU9kx8p5ADi6KX9d1rBLZsocN_Y,169
|
|
||||||
automat/__pycache__/__init__.cpython-310.pyc,,
|
|
||||||
automat/__pycache__/_core.cpython-310.pyc,,
|
|
||||||
automat/__pycache__/_discover.cpython-310.pyc,,
|
|
||||||
automat/__pycache__/_introspection.cpython-310.pyc,,
|
|
||||||
automat/__pycache__/_methodical.cpython-310.pyc,,
|
|
||||||
automat/__pycache__/_visualize.cpython-310.pyc,,
|
|
||||||
automat/_core.py,sha256=IEtZHq3wsBZPX_VfMHMFy_uNjx1kfE11Qq-nmIXZe28,4819
|
|
||||||
automat/_discover.py,sha256=ye7NHLZkrwYsPmBpTIyJuJ-VRCmwkOUpA0is-A81z04,4367
|
|
||||||
automat/_introspection.py,sha256=i5UEGdj8lp2BnHnGeAyIwEyoN2gU1nXYg-ZPNX7oBbM,1274
|
|
||||||
automat/_methodical.py,sha256=tvIQLMzMM1d6h_jUCQOM9zPJoGYYQZg0J5IkRszgjB0,15930
|
|
||||||
automat/_test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
||||||
automat/_test/__pycache__/__init__.cpython-310.pyc,,
|
|
||||||
automat/_test/__pycache__/test_core.cpython-310.pyc,,
|
|
||||||
automat/_test/__pycache__/test_discover.cpython-310.pyc,,
|
|
||||||
automat/_test/__pycache__/test_methodical.cpython-310.pyc,,
|
|
||||||
automat/_test/__pycache__/test_trace.cpython-310.pyc,,
|
|
||||||
automat/_test/__pycache__/test_visualize.cpython-310.pyc,,
|
|
||||||
automat/_test/test_core.py,sha256=CDmGBQNi9Pr7ZktfBcOhBvwI7wjLLYRtWZ0P5baXONY,2833
|
|
||||||
automat/_test/test_discover.py,sha256=O9ndAdRAC8uO0uDhioz3e45EsJCF19jQZESj0RBC7ZM,21846
|
|
||||||
automat/_test/test_methodical.py,sha256=t1CAKtT1fs-FoKMQxXl4ky6_6pgpG7lGDbyQrb_vIeo,18856
|
|
||||||
automat/_test/test_trace.py,sha256=Mx1B8QgaE7QFk6blTie2j-Vx95hTV-zySnlxLalt8ek,3279
|
|
||||||
automat/_test/test_visualize.py,sha256=8ErNYxovTiDyZkYkoP1BcyEazU_s0YQ3NHdfH9OihAg,13744
|
|
||||||
automat/_visualize.py,sha256=jY8HkzaGdMoXB7LavvaneW4GdtBN6PRShl7-4OXDvss,6335
|
|
@ -1,6 +0,0 @@
|
|||||||
Wheel-Version: 1.0
|
|
||||||
Generator: bdist_wheel (0.32.2)
|
|
||||||
Root-Is-Purelib: true
|
|
||||||
Tag: py2-none-any
|
|
||||||
Tag: py3-none-any
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
[console_scripts]
|
|
||||||
automat-visualize = automat._visualize:tool
|
|
||||||
|
|
@ -1 +0,0 @@
|
|||||||
automat
|
|
File diff suppressed because it is too large
Load Diff
@ -1 +0,0 @@
|
|||||||
pip
|
|
@ -1,27 +0,0 @@
|
|||||||
Copyright (c) Django Software Foundation and individual contributors.
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
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 Django 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 OWNER 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.
|
|
@ -1,290 +0,0 @@
|
|||||||
Django is licensed under the three-clause BSD license; see the file
|
|
||||||
LICENSE for details.
|
|
||||||
|
|
||||||
Django includes code from the Python standard library, which is licensed under
|
|
||||||
the Python license, a permissive open source license. The copyright and license
|
|
||||||
is included below for compliance with Python's terms.
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
|
||||||
|
|
||||||
Copyright (c) 2001-present Python Software Foundation; All Rights Reserved
|
|
||||||
|
|
||||||
A. HISTORY OF THE SOFTWARE
|
|
||||||
==========================
|
|
||||||
|
|
||||||
Python was created in the early 1990s by Guido van Rossum at Stichting
|
|
||||||
Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands
|
|
||||||
as a successor of a language called ABC. Guido remains Python's
|
|
||||||
principal author, although it includes many contributions from others.
|
|
||||||
|
|
||||||
In 1995, Guido continued his work on Python at the Corporation for
|
|
||||||
National Research Initiatives (CNRI, see http://www.cnri.reston.va.us)
|
|
||||||
in Reston, Virginia where he released several versions of the
|
|
||||||
software.
|
|
||||||
|
|
||||||
In May 2000, Guido and the Python core development team moved to
|
|
||||||
BeOpen.com to form the BeOpen PythonLabs team. In October of the same
|
|
||||||
year, the PythonLabs team moved to Digital Creations, which became
|
|
||||||
Zope Corporation. In 2001, the Python Software Foundation (PSF, see
|
|
||||||
https://www.python.org/psf/) was formed, a non-profit organization
|
|
||||||
created specifically to own Python-related Intellectual Property.
|
|
||||||
Zope Corporation was a sponsoring member of the PSF.
|
|
||||||
|
|
||||||
All Python releases are Open Source (see http://www.opensource.org for
|
|
||||||
the Open Source Definition). Historically, most, but not all, Python
|
|
||||||
releases have also been GPL-compatible; the table below summarizes
|
|
||||||
the various releases.
|
|
||||||
|
|
||||||
Release Derived Year Owner GPL-
|
|
||||||
from compatible? (1)
|
|
||||||
|
|
||||||
0.9.0 thru 1.2 1991-1995 CWI yes
|
|
||||||
1.3 thru 1.5.2 1.2 1995-1999 CNRI yes
|
|
||||||
1.6 1.5.2 2000 CNRI no
|
|
||||||
2.0 1.6 2000 BeOpen.com no
|
|
||||||
1.6.1 1.6 2001 CNRI yes (2)
|
|
||||||
2.1 2.0+1.6.1 2001 PSF no
|
|
||||||
2.0.1 2.0+1.6.1 2001 PSF yes
|
|
||||||
2.1.1 2.1+2.0.1 2001 PSF yes
|
|
||||||
2.1.2 2.1.1 2002 PSF yes
|
|
||||||
2.1.3 2.1.2 2002 PSF yes
|
|
||||||
2.2 and above 2.1.1 2001-now PSF yes
|
|
||||||
|
|
||||||
Footnotes:
|
|
||||||
|
|
||||||
(1) GPL-compatible doesn't mean that we're distributing Python under
|
|
||||||
the GPL. All Python licenses, unlike the GPL, let you distribute
|
|
||||||
a modified version without making your changes open source. The
|
|
||||||
GPL-compatible licenses make it possible to combine Python with
|
|
||||||
other software that is released under the GPL; the others don't.
|
|
||||||
|
|
||||||
(2) According to Richard Stallman, 1.6.1 is not GPL-compatible,
|
|
||||||
because its license has a choice of law clause. According to
|
|
||||||
CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1
|
|
||||||
is "not incompatible" with the GPL.
|
|
||||||
|
|
||||||
Thanks to the many outside volunteers who have worked under Guido's
|
|
||||||
direction to make these releases possible.
|
|
||||||
|
|
||||||
|
|
||||||
B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON
|
|
||||||
===============================================================
|
|
||||||
|
|
||||||
Python software and documentation are licensed under the
|
|
||||||
Python Software Foundation License Version 2.
|
|
||||||
|
|
||||||
Starting with Python 3.8.6, examples, recipes, and other code in
|
|
||||||
the documentation are dual licensed under the PSF License Version 2
|
|
||||||
and the Zero-Clause BSD license.
|
|
||||||
|
|
||||||
Some software incorporated into Python is under different licenses.
|
|
||||||
The licenses are listed with code falling under that license.
|
|
||||||
|
|
||||||
|
|
||||||
PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
|
|
||||||
--------------------------------------------
|
|
||||||
|
|
||||||
1. This LICENSE AGREEMENT is between the Python Software Foundation
|
|
||||||
("PSF"), and the Individual or Organization ("Licensee") accessing and
|
|
||||||
otherwise using this software ("Python") in source or binary form and
|
|
||||||
its associated documentation.
|
|
||||||
|
|
||||||
2. Subject to the terms and conditions of this License Agreement, PSF hereby
|
|
||||||
grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
|
|
||||||
analyze, test, perform and/or display publicly, prepare derivative works,
|
|
||||||
distribute, and otherwise use Python alone or in any derivative version,
|
|
||||||
provided, however, that PSF's License Agreement and PSF's notice of copyright,
|
|
||||||
i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
|
||||||
2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Python Software Foundation;
|
|
||||||
All Rights Reserved" are retained in Python alone or in any derivative version
|
|
||||||
prepared by Licensee.
|
|
||||||
|
|
||||||
3. In the event Licensee prepares a derivative work that is based on
|
|
||||||
or incorporates Python or any part thereof, and wants to make
|
|
||||||
the derivative work available to others as provided herein, then
|
|
||||||
Licensee hereby agrees to include in any such work a brief summary of
|
|
||||||
the changes made to Python.
|
|
||||||
|
|
||||||
4. PSF is making Python available to Licensee on an "AS IS"
|
|
||||||
basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
|
||||||
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
|
|
||||||
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
|
|
||||||
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
|
|
||||||
INFRINGE ANY THIRD PARTY RIGHTS.
|
|
||||||
|
|
||||||
5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
|
|
||||||
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
|
|
||||||
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
|
|
||||||
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
|
|
||||||
|
|
||||||
6. This License Agreement will automatically terminate upon a material
|
|
||||||
breach of its terms and conditions.
|
|
||||||
|
|
||||||
7. Nothing in this License Agreement shall be deemed to create any
|
|
||||||
relationship of agency, partnership, or joint venture between PSF and
|
|
||||||
Licensee. This License Agreement does not grant permission to use PSF
|
|
||||||
trademarks or trade name in a trademark sense to endorse or promote
|
|
||||||
products or services of Licensee, or any third party.
|
|
||||||
|
|
||||||
8. By copying, installing or otherwise using Python, Licensee
|
|
||||||
agrees to be bound by the terms and conditions of this License
|
|
||||||
Agreement.
|
|
||||||
|
|
||||||
|
|
||||||
BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0
|
|
||||||
-------------------------------------------
|
|
||||||
|
|
||||||
BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1
|
|
||||||
|
|
||||||
1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an
|
|
||||||
office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the
|
|
||||||
Individual or Organization ("Licensee") accessing and otherwise using
|
|
||||||
this software in source or binary form and its associated
|
|
||||||
documentation ("the Software").
|
|
||||||
|
|
||||||
2. Subject to the terms and conditions of this BeOpen Python License
|
|
||||||
Agreement, BeOpen hereby grants Licensee a non-exclusive,
|
|
||||||
royalty-free, world-wide license to reproduce, analyze, test, perform
|
|
||||||
and/or display publicly, prepare derivative works, distribute, and
|
|
||||||
otherwise use the Software alone or in any derivative version,
|
|
||||||
provided, however, that the BeOpen Python License is retained in the
|
|
||||||
Software, alone or in any derivative version prepared by Licensee.
|
|
||||||
|
|
||||||
3. BeOpen is making the Software available to Licensee on an "AS IS"
|
|
||||||
basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
|
||||||
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND
|
|
||||||
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
|
|
||||||
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT
|
|
||||||
INFRINGE ANY THIRD PARTY RIGHTS.
|
|
||||||
|
|
||||||
4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE
|
|
||||||
SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
|
|
||||||
AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY
|
|
||||||
DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
|
|
||||||
|
|
||||||
5. This License Agreement will automatically terminate upon a material
|
|
||||||
breach of its terms and conditions.
|
|
||||||
|
|
||||||
6. This License Agreement shall be governed by and interpreted in all
|
|
||||||
respects by the law of the State of California, excluding conflict of
|
|
||||||
law provisions. Nothing in this License Agreement shall be deemed to
|
|
||||||
create any relationship of agency, partnership, or joint venture
|
|
||||||
between BeOpen and Licensee. This License Agreement does not grant
|
|
||||||
permission to use BeOpen trademarks or trade names in a trademark
|
|
||||||
sense to endorse or promote products or services of Licensee, or any
|
|
||||||
third party. As an exception, the "BeOpen Python" logos available at
|
|
||||||
http://www.pythonlabs.com/logos.html may be used according to the
|
|
||||||
permissions granted on that web page.
|
|
||||||
|
|
||||||
7. By copying, installing or otherwise using the software, Licensee
|
|
||||||
agrees to be bound by the terms and conditions of this License
|
|
||||||
Agreement.
|
|
||||||
|
|
||||||
|
|
||||||
CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1
|
|
||||||
---------------------------------------
|
|
||||||
|
|
||||||
1. This LICENSE AGREEMENT is between the Corporation for National
|
|
||||||
Research Initiatives, having an office at 1895 Preston White Drive,
|
|
||||||
Reston, VA 20191 ("CNRI"), and the Individual or Organization
|
|
||||||
("Licensee") accessing and otherwise using Python 1.6.1 software in
|
|
||||||
source or binary form and its associated documentation.
|
|
||||||
|
|
||||||
2. Subject to the terms and conditions of this License Agreement, CNRI
|
|
||||||
hereby grants Licensee a nonexclusive, royalty-free, world-wide
|
|
||||||
license to reproduce, analyze, test, perform and/or display publicly,
|
|
||||||
prepare derivative works, distribute, and otherwise use Python 1.6.1
|
|
||||||
alone or in any derivative version, provided, however, that CNRI's
|
|
||||||
License Agreement and CNRI's notice of copyright, i.e., "Copyright (c)
|
|
||||||
1995-2001 Corporation for National Research Initiatives; All Rights
|
|
||||||
Reserved" are retained in Python 1.6.1 alone or in any derivative
|
|
||||||
version prepared by Licensee. Alternately, in lieu of CNRI's License
|
|
||||||
Agreement, Licensee may substitute the following text (omitting the
|
|
||||||
quotes): "Python 1.6.1 is made available subject to the terms and
|
|
||||||
conditions in CNRI's License Agreement. This Agreement together with
|
|
||||||
Python 1.6.1 may be located on the internet using the following
|
|
||||||
unique, persistent identifier (known as a handle): 1895.22/1013. This
|
|
||||||
Agreement may also be obtained from a proxy server on the internet
|
|
||||||
using the following URL: http://hdl.handle.net/1895.22/1013".
|
|
||||||
|
|
||||||
3. In the event Licensee prepares a derivative work that is based on
|
|
||||||
or incorporates Python 1.6.1 or any part thereof, and wants to make
|
|
||||||
the derivative work available to others as provided herein, then
|
|
||||||
Licensee hereby agrees to include in any such work a brief summary of
|
|
||||||
the changes made to Python 1.6.1.
|
|
||||||
|
|
||||||
4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS"
|
|
||||||
basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
|
||||||
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND
|
|
||||||
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
|
|
||||||
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT
|
|
||||||
INFRINGE ANY THIRD PARTY RIGHTS.
|
|
||||||
|
|
||||||
5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
|
|
||||||
1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
|
|
||||||
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,
|
|
||||||
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
|
|
||||||
|
|
||||||
6. This License Agreement will automatically terminate upon a material
|
|
||||||
breach of its terms and conditions.
|
|
||||||
|
|
||||||
7. This License Agreement shall be governed by the federal
|
|
||||||
intellectual property law of the United States, including without
|
|
||||||
limitation the federal copyright law, and, to the extent such
|
|
||||||
U.S. federal law does not apply, by the law of the Commonwealth of
|
|
||||||
Virginia, excluding Virginia's conflict of law provisions.
|
|
||||||
Notwithstanding the foregoing, with regard to derivative works based
|
|
||||||
on Python 1.6.1 that incorporate non-separable material that was
|
|
||||||
previously distributed under the GNU General Public License (GPL), the
|
|
||||||
law of the Commonwealth of Virginia shall govern this License
|
|
||||||
Agreement only as to issues arising under or with respect to
|
|
||||||
Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this
|
|
||||||
License Agreement shall be deemed to create any relationship of
|
|
||||||
agency, partnership, or joint venture between CNRI and Licensee. This
|
|
||||||
License Agreement does not grant permission to use CNRI trademarks or
|
|
||||||
trade name in a trademark sense to endorse or promote products or
|
|
||||||
services of Licensee, or any third party.
|
|
||||||
|
|
||||||
8. By clicking on the "ACCEPT" button where indicated, or by copying,
|
|
||||||
installing or otherwise using Python 1.6.1, Licensee agrees to be
|
|
||||||
bound by the terms and conditions of this License Agreement.
|
|
||||||
|
|
||||||
ACCEPT
|
|
||||||
|
|
||||||
|
|
||||||
CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2
|
|
||||||
--------------------------------------------------
|
|
||||||
|
|
||||||
Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,
|
|
||||||
The Netherlands. All rights reserved.
|
|
||||||
|
|
||||||
Permission to use, copy, modify, and distribute this software and its
|
|
||||||
documentation for any purpose and without fee is hereby granted,
|
|
||||||
provided that the above copyright notice appear in all copies and that
|
|
||||||
both that copyright notice and this permission notice appear in
|
|
||||||
supporting documentation, and that the name of Stichting Mathematisch
|
|
||||||
Centrum or CWI not be used in advertising or publicity pertaining to
|
|
||||||
distribution of the software without specific, written prior
|
|
||||||
permission.
|
|
||||||
|
|
||||||
STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
|
|
||||||
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
|
|
||||||
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
||||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
||||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
|
||||||
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
|
|
||||||
ZERO-CLAUSE BSD LICENSE FOR CODE IN THE PYTHON DOCUMENTATION
|
|
||||||
----------------------------------------------------------------------
|
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for any
|
|
||||||
purpose with or without fee is hereby granted.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
||||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
||||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
||||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
||||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
||||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
PERFORMANCE OF THIS SOFTWARE.
|
|
@ -1,97 +0,0 @@
|
|||||||
Metadata-Version: 2.1
|
|
||||||
Name: Django
|
|
||||||
Version: 4.0
|
|
||||||
Summary: A high-level Python web framework that encourages rapid development and clean, pragmatic design.
|
|
||||||
Home-page: https://www.djangoproject.com/
|
|
||||||
Author: Django Software Foundation
|
|
||||||
Author-email: foundation@djangoproject.com
|
|
||||||
License: BSD-3-Clause
|
|
||||||
Project-URL: Documentation, https://docs.djangoproject.com/
|
|
||||||
Project-URL: Release notes, https://docs.djangoproject.com/en/stable/releases/
|
|
||||||
Project-URL: Funding, https://www.djangoproject.com/fundraising/
|
|
||||||
Project-URL: Source, https://github.com/django/django
|
|
||||||
Project-URL: Tracker, https://code.djangoproject.com/
|
|
||||||
Platform: UNKNOWN
|
|
||||||
Classifier: Development Status :: 5 - Production/Stable
|
|
||||||
Classifier: Environment :: Web Environment
|
|
||||||
Classifier: Framework :: Django
|
|
||||||
Classifier: Intended Audience :: Developers
|
|
||||||
Classifier: License :: OSI Approved :: BSD License
|
|
||||||
Classifier: Operating System :: OS Independent
|
|
||||||
Classifier: Programming Language :: Python
|
|
||||||
Classifier: Programming Language :: Python :: 3
|
|
||||||
Classifier: Programming Language :: Python :: 3 :: Only
|
|
||||||
Classifier: Programming Language :: Python :: 3.8
|
|
||||||
Classifier: Programming Language :: Python :: 3.9
|
|
||||||
Classifier: Programming Language :: Python :: 3.10
|
|
||||||
Classifier: Topic :: Internet :: WWW/HTTP
|
|
||||||
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
|
|
||||||
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI
|
|
||||||
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
|
||||||
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
||||||
Requires-Python: >=3.8
|
|
||||||
Requires-Dist: asgiref (<4,>=3.4.1)
|
|
||||||
Requires-Dist: sqlparse (>=0.2.2)
|
|
||||||
Requires-Dist: backports.zoneinfo ; python_version < "3.9"
|
|
||||||
Requires-Dist: tzdata ; sys_platform == "win32"
|
|
||||||
Provides-Extra: argon2
|
|
||||||
Requires-Dist: argon2-cffi (>=19.1.0) ; extra == 'argon2'
|
|
||||||
Provides-Extra: bcrypt
|
|
||||||
Requires-Dist: bcrypt ; extra == 'bcrypt'
|
|
||||||
|
|
||||||
======
|
|
||||||
Django
|
|
||||||
======
|
|
||||||
|
|
||||||
Django is a high-level Python web framework that encourages rapid development
|
|
||||||
and clean, pragmatic design. Thanks for checking it out.
|
|
||||||
|
|
||||||
All documentation is in the "``docs``" directory and online at
|
|
||||||
https://docs.djangoproject.com/en/stable/. If you're just getting started,
|
|
||||||
here's how we recommend you read the docs:
|
|
||||||
|
|
||||||
* First, read ``docs/intro/install.txt`` for instructions on installing Django.
|
|
||||||
|
|
||||||
* Next, work through the tutorials in order (``docs/intro/tutorial01.txt``,
|
|
||||||
``docs/intro/tutorial02.txt``, etc.).
|
|
||||||
|
|
||||||
* If you want to set up an actual deployment server, read
|
|
||||||
``docs/howto/deployment/index.txt`` for instructions.
|
|
||||||
|
|
||||||
* You'll probably want to read through the topical guides (in ``docs/topics``)
|
|
||||||
next; from there you can jump to the HOWTOs (in ``docs/howto``) for specific
|
|
||||||
problems, and check out the reference (``docs/ref``) for gory details.
|
|
||||||
|
|
||||||
* See ``docs/README`` for instructions on building an HTML version of the docs.
|
|
||||||
|
|
||||||
Docs are updated rigorously. If you find any problems in the docs, or think
|
|
||||||
they should be clarified in any way, please take 30 seconds to fill out a
|
|
||||||
ticket here: https://code.djangoproject.com/newticket
|
|
||||||
|
|
||||||
To get more help:
|
|
||||||
|
|
||||||
* Join the ``#django`` channel on ``irc.libera.chat``. Lots of helpful people
|
|
||||||
hang out there. See https://web.libera.chat if you're new to IRC.
|
|
||||||
|
|
||||||
* Join the django-users mailing list, or read the archives, at
|
|
||||||
https://groups.google.com/group/django-users.
|
|
||||||
|
|
||||||
To contribute to Django:
|
|
||||||
|
|
||||||
* Check out https://docs.djangoproject.com/en/dev/internals/contributing/ for
|
|
||||||
information about getting involved.
|
|
||||||
|
|
||||||
To run Django's test suite:
|
|
||||||
|
|
||||||
* Follow the instructions in the "Unit tests" section of
|
|
||||||
``docs/internals/contributing/writing-code/unit-tests.txt``, published online at
|
|
||||||
https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/#running-the-unit-tests
|
|
||||||
|
|
||||||
Supporting the Development of Django
|
|
||||||
====================================
|
|
||||||
|
|
||||||
Django's development depends on your contributions.
|
|
||||||
|
|
||||||
If you depend on Django, remember to support the Django Software Foundation: https://www.djangoproject.com/fundraising/
|
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +0,0 @@
|
|||||||
Wheel-Version: 1.0
|
|
||||||
Generator: bdist_wheel (0.34.2)
|
|
||||||
Root-Is-Purelib: true
|
|
||||||
Tag: py3-none-any
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
[console_scripts]
|
|
||||||
django-admin = django.core.management:execute_from_command_line
|
|
||||||
|
|
@ -1 +0,0 @@
|
|||||||
django
|
|
@ -1 +0,0 @@
|
|||||||
pip
|
|
@ -1,19 +0,0 @@
|
|||||||
Copyright (c) 2012 Daniele Faraglia
|
|
||||||
|
|
||||||
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.
|
|
@ -1,513 +0,0 @@
|
|||||||
Metadata-Version: 2.1
|
|
||||||
Name: Faker
|
|
||||||
Version: 13.13.0
|
|
||||||
Summary: Faker is a Python package that generates fake data for you.
|
|
||||||
Home-page: https://github.com/joke2k/faker
|
|
||||||
Author: joke2k
|
|
||||||
Author-email: joke2k@gmail.com
|
|
||||||
License: MIT License
|
|
||||||
Keywords: faker fixtures data test mock generator
|
|
||||||
Platform: any
|
|
||||||
Classifier: Development Status :: 5 - Production/Stable
|
|
||||||
Classifier: Environment :: Console
|
|
||||||
Classifier: Intended Audience :: Developers
|
|
||||||
Classifier: Programming Language :: Python
|
|
||||||
Classifier: Programming Language :: Python :: 3
|
|
||||||
Classifier: Programming Language :: Python :: 3 :: Only
|
|
||||||
Classifier: Programming Language :: Python :: 3.6
|
|
||||||
Classifier: Programming Language :: Python :: 3.7
|
|
||||||
Classifier: Programming Language :: Python :: 3.8
|
|
||||||
Classifier: Programming Language :: Python :: 3.9
|
|
||||||
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
||||||
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
||||||
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
||||||
Classifier: Topic :: Software Development :: Testing
|
|
||||||
Classifier: Topic :: Utilities
|
|
||||||
Classifier: License :: OSI Approved :: MIT License
|
|
||||||
Requires-Python: >=3.6
|
|
||||||
Requires-Dist: python-dateutil (>=2.4)
|
|
||||||
Requires-Dist: typing-extensions (>=3.10.0.2) ; python_version < "3.8"
|
|
||||||
|
|
||||||
*Faker* is a Python package that generates fake data for you. Whether
|
|
||||||
you need to bootstrap your database, create good-looking XML documents,
|
|
||||||
fill-in your persistence to stress test it, or anonymize data taken from
|
|
||||||
a production service, Faker is for you.
|
|
||||||
|
|
||||||
Faker is heavily inspired by `PHP Faker`_, `Perl Faker`_, and by `Ruby Faker`_.
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
::
|
|
||||||
|
|
||||||
_|_|_|_| _|
|
|
||||||
_| _|_|_| _| _| _|_| _| _|_|
|
|
||||||
_|_|_| _| _| _|_| _|_|_|_| _|_|
|
|
||||||
_| _| _| _| _| _| _|
|
|
||||||
_| _|_|_| _| _| _|_|_| _|
|
|
||||||
|
|
||||||
|pypi| |build| |coverage| |license|
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
Compatibility
|
|
||||||
-------------
|
|
||||||
|
|
||||||
Starting from version ``4.0.0``, ``Faker`` dropped support for Python 2 and from version ``5.0.0``
|
|
||||||
only supports Python 3.6 and above. If you still need Python 2 compatibility, please install version ``3.0.1`` in the
|
|
||||||
meantime, and please consider updating your codebase to support Python 3 so you can enjoy the
|
|
||||||
latest features ``Faker`` has to offer. Please see the `extended docs`_ for more details, especially
|
|
||||||
if you are upgrading from version ``2.0.4`` and below as there might be breaking changes.
|
|
||||||
|
|
||||||
This package was also previously called ``fake-factory`` which was already deprecated by the end
|
|
||||||
of 2016, and much has changed since then, so please ensure that your project and its dependencies
|
|
||||||
do not depend on the old package.
|
|
||||||
|
|
||||||
Basic Usage
|
|
||||||
-----------
|
|
||||||
|
|
||||||
Install with pip:
|
|
||||||
|
|
||||||
.. code:: bash
|
|
||||||
|
|
||||||
pip install Faker
|
|
||||||
|
|
||||||
Use ``faker.Faker()`` to create and initialize a faker
|
|
||||||
generator, which can generate data by accessing properties named after
|
|
||||||
the type of data you want.
|
|
||||||
|
|
||||||
.. code:: python
|
|
||||||
|
|
||||||
from faker import Faker
|
|
||||||
fake = Faker()
|
|
||||||
|
|
||||||
fake.name()
|
|
||||||
# 'Lucy Cechtelar'
|
|
||||||
|
|
||||||
fake.address()
|
|
||||||
# '426 Jordy Lodge
|
|
||||||
# Cartwrightshire, SC 88120-6700'
|
|
||||||
|
|
||||||
fake.text()
|
|
||||||
# 'Sint velit eveniet. Rerum atque repellat voluptatem quia rerum. Numquam excepturi
|
|
||||||
# beatae sint laudantium consequatur. Magni occaecati itaque sint et sit tempore. Nesciunt
|
|
||||||
# amet quidem. Iusto deleniti cum autem ad quia aperiam.
|
|
||||||
# A consectetur quos aliquam. In iste aliquid et aut similique suscipit. Consequatur qui
|
|
||||||
# quaerat iste minus hic expedita. Consequuntur error magni et laboriosam. Aut aspernatur
|
|
||||||
# voluptatem sit aliquam. Dolores voluptatum est.
|
|
||||||
# Aut molestias et maxime. Fugit autem facilis quos vero. Eius quibusdam possimus est.
|
|
||||||
# Ea quaerat et quisquam. Deleniti sunt quam. Adipisci consequatur id in occaecati.
|
|
||||||
# Et sint et. Ut ducimus quod nemo ab voluptatum.'
|
|
||||||
|
|
||||||
Each call to method ``fake.name()`` yields a different (random) result.
|
|
||||||
This is because faker forwards ``faker.Generator.method_name()`` calls
|
|
||||||
to ``faker.Generator.format(method_name)``.
|
|
||||||
|
|
||||||
.. code:: python
|
|
||||||
|
|
||||||
for _ in range(10):
|
|
||||||
print(fake.name())
|
|
||||||
|
|
||||||
# 'Adaline Reichel'
|
|
||||||
# 'Dr. Santa Prosacco DVM'
|
|
||||||
# 'Noemy Vandervort V'
|
|
||||||
# 'Lexi O'Conner'
|
|
||||||
# 'Gracie Weber'
|
|
||||||
# 'Roscoe Johns'
|
|
||||||
# 'Emmett Lebsack'
|
|
||||||
# 'Keegan Thiel'
|
|
||||||
# 'Wellington Koelpin II'
|
|
||||||
# 'Ms. Karley Kiehn V'
|
|
||||||
|
|
||||||
Pytest fixtures
|
|
||||||
---------------
|
|
||||||
|
|
||||||
``Faker`` also has its own ``pytest`` plugin which provides a ``faker`` fixture you can use in your
|
|
||||||
tests. Please check out the `pytest fixture docs` to learn more.
|
|
||||||
|
|
||||||
Providers
|
|
||||||
---------
|
|
||||||
|
|
||||||
Each of the generator properties (like ``name``, ``address``, and
|
|
||||||
``lorem``) are called "fake". A faker generator has many of them,
|
|
||||||
packaged in "providers".
|
|
||||||
|
|
||||||
.. code:: python
|
|
||||||
|
|
||||||
from faker import Faker
|
|
||||||
from faker.providers import internet
|
|
||||||
|
|
||||||
fake = Faker()
|
|
||||||
fake.add_provider(internet)
|
|
||||||
|
|
||||||
print(fake.ipv4_private())
|
|
||||||
|
|
||||||
|
|
||||||
Check the `extended docs`_ for a list of `bundled providers`_ and a list of
|
|
||||||
`community providers`_.
|
|
||||||
|
|
||||||
Localization
|
|
||||||
------------
|
|
||||||
|
|
||||||
``faker.Faker`` can take a locale as an argument, to return localized
|
|
||||||
data. If no localized provider is found, the factory falls back to the
|
|
||||||
default LCID string for US english, ie: ``en_US``.
|
|
||||||
|
|
||||||
.. code:: python
|
|
||||||
|
|
||||||
from faker import Faker
|
|
||||||
fake = Faker('it_IT')
|
|
||||||
for _ in range(10):
|
|
||||||
print(fake.name())
|
|
||||||
|
|
||||||
# 'Elda Palumbo'
|
|
||||||
# 'Pacifico Giordano'
|
|
||||||
# 'Sig. Avide Guerra'
|
|
||||||
# 'Yago Amato'
|
|
||||||
# 'Eustachio Messina'
|
|
||||||
# 'Dott. Violante Lombardo'
|
|
||||||
# 'Sig. Alighieri Monti'
|
|
||||||
# 'Costanzo Costa'
|
|
||||||
# 'Nazzareno Barbieri'
|
|
||||||
# 'Max Coppola'
|
|
||||||
|
|
||||||
``faker.Faker`` also supports multiple locales. New in v3.0.0.
|
|
||||||
|
|
||||||
.. code:: python
|
|
||||||
|
|
||||||
from faker import Faker
|
|
||||||
fake = Faker(['it_IT', 'en_US', 'ja_JP'])
|
|
||||||
for _ in range(10):
|
|
||||||
print(fake.name())
|
|
||||||
|
|
||||||
# 鈴木 陽一
|
|
||||||
# Leslie Moreno
|
|
||||||
# Emma Williams
|
|
||||||
# 渡辺 裕美子
|
|
||||||
# Marcantonio Galuppi
|
|
||||||
# Martha Davis
|
|
||||||
# Kristen Turner
|
|
||||||
# 中津川 春香
|
|
||||||
# Ashley Castillo
|
|
||||||
# 山田 桃子
|
|
||||||
|
|
||||||
You can check available Faker locales in the source code, under the
|
|
||||||
providers package. The localization of Faker is an ongoing process, for
|
|
||||||
which we need your help. Please don't hesitate to create a localized
|
|
||||||
provider for your own locale and submit a Pull Request (PR).
|
|
||||||
|
|
||||||
Optimizations
|
|
||||||
-------------
|
|
||||||
The Faker constructor takes a performance-related argument called
|
|
||||||
``use_weighting``. It specifies whether to attempt to have the frequency
|
|
||||||
of values match real-world frequencies (e.g. the English name Gary would
|
|
||||||
be much more frequent than the name Lorimer). If ``use_weighting`` is ``False``,
|
|
||||||
then all items have an equal chance of being selected, and the selection
|
|
||||||
process is much faster. The default is ``True``.
|
|
||||||
|
|
||||||
Command line usage
|
|
||||||
------------------
|
|
||||||
|
|
||||||
When installed, you can invoke faker from the command-line:
|
|
||||||
|
|
||||||
.. code:: console
|
|
||||||
|
|
||||||
faker [-h] [--version] [-o output]
|
|
||||||
[-l {bg_BG,cs_CZ,...,zh_CN,zh_TW}]
|
|
||||||
[-r REPEAT] [-s SEP]
|
|
||||||
[-i {package.containing.custom_provider otherpkg.containing.custom_provider}]
|
|
||||||
[fake] [fake argument [fake argument ...]]
|
|
||||||
|
|
||||||
Where:
|
|
||||||
|
|
||||||
- ``faker``: is the script when installed in your environment, in
|
|
||||||
development you could use ``python -m faker`` instead
|
|
||||||
|
|
||||||
- ``-h``, ``--help``: shows a help message
|
|
||||||
|
|
||||||
- ``--version``: shows the program's version number
|
|
||||||
|
|
||||||
- ``-o FILENAME``: redirects the output to the specified filename
|
|
||||||
|
|
||||||
- ``-l {bg_BG,cs_CZ,...,zh_CN,zh_TW}``: allows use of a localized
|
|
||||||
provider
|
|
||||||
|
|
||||||
- ``-r REPEAT``: will generate a specified number of outputs
|
|
||||||
|
|
||||||
- ``-s SEP``: will generate the specified separator after each
|
|
||||||
generated output
|
|
||||||
|
|
||||||
- ``-i {my.custom_provider other.custom_provider}`` list of additional custom
|
|
||||||
providers to use. Note that is the import path of the package containing
|
|
||||||
your Provider class, not the custom Provider class itself.
|
|
||||||
|
|
||||||
- ``fake``: is the name of the fake to generate an output for, such as
|
|
||||||
``name``, ``address``, or ``text``
|
|
||||||
|
|
||||||
- ``[fake argument ...]``: optional arguments to pass to the fake (e.g. the
|
|
||||||
profile fake takes an optional list of comma separated field names as the
|
|
||||||
first argument)
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
.. code:: console
|
|
||||||
|
|
||||||
$ faker address
|
|
||||||
968 Bahringer Garden Apt. 722
|
|
||||||
Kristinaland, NJ 09890
|
|
||||||
|
|
||||||
$ faker -l de_DE address
|
|
||||||
Samira-Niemeier-Allee 56
|
|
||||||
94812 Biedenkopf
|
|
||||||
|
|
||||||
$ faker profile ssn,birthdate
|
|
||||||
{'ssn': '628-10-1085', 'birthdate': '2008-03-29'}
|
|
||||||
|
|
||||||
$ faker -r=3 -s=";" name
|
|
||||||
Willam Kertzmann;
|
|
||||||
Josiah Maggio;
|
|
||||||
Gayla Schmitt;
|
|
||||||
|
|
||||||
How to create a Provider
|
|
||||||
------------------------
|
|
||||||
|
|
||||||
.. code:: python
|
|
||||||
|
|
||||||
from faker import Faker
|
|
||||||
fake = Faker()
|
|
||||||
|
|
||||||
# first, import a similar Provider or use the default one
|
|
||||||
from faker.providers import BaseProvider
|
|
||||||
|
|
||||||
# create new provider class
|
|
||||||
class MyProvider(BaseProvider):
|
|
||||||
def foo(self) -> str:
|
|
||||||
return 'bar'
|
|
||||||
|
|
||||||
# then add new provider to faker instance
|
|
||||||
fake.add_provider(MyProvider)
|
|
||||||
|
|
||||||
# now you can use:
|
|
||||||
fake.foo()
|
|
||||||
# 'bar'
|
|
||||||
|
|
||||||
|
|
||||||
How to create a Dynamic Provider
|
|
||||||
--------------------------------
|
|
||||||
|
|
||||||
Dynamic providers can read elements from an external source.
|
|
||||||
|
|
||||||
.. code:: python
|
|
||||||
|
|
||||||
from faker import Faker
|
|
||||||
from faker.providers import DynamicProvider
|
|
||||||
|
|
||||||
medical_professions_provider = DynamicProvider(
|
|
||||||
provider_name="medical_profession",
|
|
||||||
elements=["dr.", "doctor", "nurse", "surgeon", "clerk"],
|
|
||||||
)
|
|
||||||
|
|
||||||
fake = Faker()
|
|
||||||
|
|
||||||
# then add new provider to faker instance
|
|
||||||
fake.add_provider(medical_professions_provider)
|
|
||||||
|
|
||||||
# now you can use:
|
|
||||||
fake.medical_profession()
|
|
||||||
# 'dr.'
|
|
||||||
|
|
||||||
How to customize the Lorem Provider
|
|
||||||
-----------------------------------
|
|
||||||
|
|
||||||
You can provide your own sets of words if you don't want to use the
|
|
||||||
default lorem ipsum one. The following example shows how to do it with a list of words picked from `cakeipsum <http://www.cupcakeipsum.com/>`__ :
|
|
||||||
|
|
||||||
.. code:: python
|
|
||||||
|
|
||||||
from faker import Faker
|
|
||||||
fake = Faker()
|
|
||||||
|
|
||||||
my_word_list = [
|
|
||||||
'danish','cheesecake','sugar',
|
|
||||||
'Lollipop','wafer','Gummies',
|
|
||||||
'sesame','Jelly','beans',
|
|
||||||
'pie','bar','Ice','oat' ]
|
|
||||||
|
|
||||||
fake.sentence()
|
|
||||||
# 'Expedita at beatae voluptatibus nulla omnis.'
|
|
||||||
|
|
||||||
fake.sentence(ext_word_list=my_word_list)
|
|
||||||
# 'Oat beans oat Lollipop bar cheesecake.'
|
|
||||||
|
|
||||||
|
|
||||||
How to use with Factory Boy
|
|
||||||
---------------------------
|
|
||||||
|
|
||||||
`Factory Boy` already ships with integration with ``Faker``. Simply use the
|
|
||||||
``factory.Faker`` method of ``factory_boy``:
|
|
||||||
|
|
||||||
.. code:: python
|
|
||||||
|
|
||||||
import factory
|
|
||||||
from myapp.models import Book
|
|
||||||
|
|
||||||
class BookFactory(factory.Factory):
|
|
||||||
class Meta:
|
|
||||||
model = Book
|
|
||||||
|
|
||||||
title = factory.Faker('sentence', nb_words=4)
|
|
||||||
author_name = factory.Faker('name')
|
|
||||||
|
|
||||||
Accessing the `random` instance
|
|
||||||
-------------------------------
|
|
||||||
|
|
||||||
The ``.random`` property on the generator returns the instance of
|
|
||||||
``random.Random`` used to generate the values:
|
|
||||||
|
|
||||||
.. code:: python
|
|
||||||
|
|
||||||
from faker import Faker
|
|
||||||
fake = Faker()
|
|
||||||
fake.random
|
|
||||||
fake.random.getstate()
|
|
||||||
|
|
||||||
By default all generators share the same instance of ``random.Random``, which
|
|
||||||
can be accessed with ``from faker.generator import random``. Using this may
|
|
||||||
be useful for plugins that want to affect all faker instances.
|
|
||||||
|
|
||||||
Unique values
|
|
||||||
-------------
|
|
||||||
|
|
||||||
Through use of the ``.unique`` property on the generator, you can guarantee
|
|
||||||
that any generated values are unique for this specific instance.
|
|
||||||
|
|
||||||
.. code:: python
|
|
||||||
|
|
||||||
from faker import Faker
|
|
||||||
fake = Faker()
|
|
||||||
names = [fake.unique.first_name() for i in range(500)]
|
|
||||||
assert len(set(names)) == len(names)
|
|
||||||
|
|
||||||
Calling ``fake.unique.clear()`` clears the already seen values.
|
|
||||||
Note, to avoid infinite loops, after a number of attempts to find a unique
|
|
||||||
value, Faker will throw a ``UniquenessException``. Beware of the `birthday
|
|
||||||
paradox <https://en.wikipedia.org/wiki/Birthday_problem>`_, collisions
|
|
||||||
are more likely than you'd think.
|
|
||||||
|
|
||||||
|
|
||||||
.. code:: python
|
|
||||||
|
|
||||||
from faker import Faker
|
|
||||||
|
|
||||||
fake = Faker()
|
|
||||||
for i in range(3):
|
|
||||||
# Raises a UniquenessException
|
|
||||||
fake.unique.boolean()
|
|
||||||
|
|
||||||
In addition, only hashable arguments and return values can be used
|
|
||||||
with ``.unique``.
|
|
||||||
|
|
||||||
Seeding the Generator
|
|
||||||
---------------------
|
|
||||||
|
|
||||||
When using Faker for unit testing, you will often want to generate the same
|
|
||||||
data set. For convenience, the generator also provide a ``seed()`` method,
|
|
||||||
which seeds the shared random number generator. Calling the same methods with
|
|
||||||
the same version of faker and seed produces the same results.
|
|
||||||
|
|
||||||
.. code:: python
|
|
||||||
|
|
||||||
from faker import Faker
|
|
||||||
fake = Faker()
|
|
||||||
Faker.seed(4321)
|
|
||||||
|
|
||||||
print(fake.name())
|
|
||||||
# 'Margaret Boehm'
|
|
||||||
|
|
||||||
Each generator can also be switched to its own instance of ``random.Random``,
|
|
||||||
separate to the shared one, by using the ``seed_instance()`` method, which acts
|
|
||||||
the same way. For example:
|
|
||||||
|
|
||||||
.. code:: python
|
|
||||||
|
|
||||||
from faker import Faker
|
|
||||||
fake = Faker()
|
|
||||||
fake.seed_instance(4321)
|
|
||||||
|
|
||||||
print(fake.name())
|
|
||||||
# 'Margaret Boehm'
|
|
||||||
|
|
||||||
Please note that as we keep updating datasets, results are not guaranteed to be
|
|
||||||
consistent across patch versions. If you hardcode results in your test, make sure
|
|
||||||
you pinned the version of ``Faker`` down to the patch number.
|
|
||||||
|
|
||||||
If you are using ``pytest``, you can seed the ``faker`` fixture by defining a ``faker_seed``
|
|
||||||
fixture. Please check out the `pytest fixture docs` to learn more.
|
|
||||||
|
|
||||||
Tests
|
|
||||||
-----
|
|
||||||
|
|
||||||
Run tests:
|
|
||||||
|
|
||||||
.. code:: bash
|
|
||||||
|
|
||||||
$ tox
|
|
||||||
|
|
||||||
Write documentation for providers:
|
|
||||||
|
|
||||||
.. code:: bash
|
|
||||||
|
|
||||||
$ python -m faker > docs.txt
|
|
||||||
|
|
||||||
|
|
||||||
Contribute
|
|
||||||
----------
|
|
||||||
|
|
||||||
Please see `CONTRIBUTING`_.
|
|
||||||
|
|
||||||
License
|
|
||||||
-------
|
|
||||||
|
|
||||||
Faker is released under the MIT License. See the bundled `LICENSE`_ file
|
|
||||||
for details.
|
|
||||||
|
|
||||||
Credits
|
|
||||||
-------
|
|
||||||
|
|
||||||
- `FZaninotto`_ / `PHP Faker`_
|
|
||||||
- `Distribute`_
|
|
||||||
- `Buildout`_
|
|
||||||
- `modern-package-template`_
|
|
||||||
|
|
||||||
|
|
||||||
.. _FZaninotto: https://github.com/fzaninotto
|
|
||||||
.. _PHP Faker: https://github.com/fzaninotto/Faker
|
|
||||||
.. _Perl Faker: http://search.cpan.org/~jasonk/Data-Faker-0.07/
|
|
||||||
.. _Ruby Faker: https://github.com/stympy/faker
|
|
||||||
.. _Distribute: https://pypi.org/project/distribute/
|
|
||||||
.. _Buildout: http://www.buildout.org/
|
|
||||||
.. _modern-package-template: https://pypi.org/project/modern-package-template/
|
|
||||||
.. _extended docs: https://faker.readthedocs.io/en/stable/
|
|
||||||
.. _bundled providers: https://faker.readthedocs.io/en/stable/providers.html
|
|
||||||
.. _community providers: https://faker.readthedocs.io/en/stable/communityproviders.html
|
|
||||||
.. _pytest fixture docs: https://faker.readthedocs.io/en/master/pytest-fixtures.html
|
|
||||||
.. _LICENSE: https://github.com/joke2k/faker/blob/master/LICENSE.txt
|
|
||||||
.. _CONTRIBUTING: https://github.com/joke2k/faker/blob/master/CONTRIBUTING.rst
|
|
||||||
.. _Factory Boy: https://github.com/FactoryBoy/factory_boy
|
|
||||||
|
|
||||||
.. |pypi| image:: https://img.shields.io/pypi/v/Faker.svg?style=flat-square&label=version
|
|
||||||
:target: https://pypi.org/project/Faker/
|
|
||||||
:alt: Latest version released on PyPI
|
|
||||||
|
|
||||||
.. |coverage| image:: https://img.shields.io/coveralls/joke2k/faker/master.svg?style=flat-square
|
|
||||||
:target: https://coveralls.io/r/joke2k/faker?branch=master
|
|
||||||
:alt: Test coverage
|
|
||||||
|
|
||||||
.. |build| image:: https://github.com/joke2k/faker/workflows/Python%20Tests/badge.svg?branch=master&event=push
|
|
||||||
:target: https://github.com/joke2k/faker/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Apush
|
|
||||||
:alt: Build status of the master branch on Mac/Linux
|
|
||||||
|
|
||||||
.. |license| image:: https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square
|
|
||||||
:target: https://raw.githubusercontent.com/joke2k/faker/master/LICENSE.txt
|
|
||||||
:alt: Package license
|
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +0,0 @@
|
|||||||
Wheel-Version: 1.0
|
|
||||||
Generator: bdist_wheel (0.36.2)
|
|
||||||
Root-Is-Purelib: true
|
|
||||||
Tag: py3-none-any
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
|||||||
[console_scripts]
|
|
||||||
faker = faker.cli:execute_from_command_line
|
|
||||||
|
|
||||||
[pytest11]
|
|
||||||
faker = faker.contrib.pytest.plugin
|
|
||||||
|
|
@ -1 +0,0 @@
|
|||||||
faker
|
|
@ -1 +0,0 @@
|
|||||||
|
|
@ -1 +0,0 @@
|
|||||||
pip
|
|
@ -1,28 +0,0 @@
|
|||||||
Copyright 2007 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.
|
|
@ -1,113 +0,0 @@
|
|||||||
Metadata-Version: 2.1
|
|
||||||
Name: Jinja2
|
|
||||||
Version: 3.0.3
|
|
||||||
Summary: A very fast and expressive template engine.
|
|
||||||
Home-page: https://palletsprojects.com/p/jinja/
|
|
||||||
Author: Armin Ronacher
|
|
||||||
Author-email: armin.ronacher@active-4.com
|
|
||||||
Maintainer: Pallets
|
|
||||||
Maintainer-email: contact@palletsprojects.com
|
|
||||||
License: BSD-3-Clause
|
|
||||||
Project-URL: Donate, https://palletsprojects.com/donate
|
|
||||||
Project-URL: Documentation, https://jinja.palletsprojects.com/
|
|
||||||
Project-URL: Changes, https://jinja.palletsprojects.com/changes/
|
|
||||||
Project-URL: Source Code, https://github.com/pallets/jinja/
|
|
||||||
Project-URL: Issue Tracker, https://github.com/pallets/jinja/issues/
|
|
||||||
Project-URL: Twitter, https://twitter.com/PalletsTeam
|
|
||||||
Project-URL: Chat, https://discord.gg/pallets
|
|
||||||
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: Topic :: Internet :: WWW/HTTP :: Dynamic Content
|
|
||||||
Classifier: Topic :: Text Processing :: Markup :: HTML
|
|
||||||
Requires-Python: >=3.6
|
|
||||||
Description-Content-Type: text/x-rst
|
|
||||||
License-File: LICENSE.rst
|
|
||||||
Requires-Dist: MarkupSafe (>=2.0)
|
|
||||||
Provides-Extra: i18n
|
|
||||||
Requires-Dist: Babel (>=2.7) ; extra == 'i18n'
|
|
||||||
|
|
||||||
Jinja
|
|
||||||
=====
|
|
||||||
|
|
||||||
Jinja is a fast, expressive, extensible templating engine. Special
|
|
||||||
placeholders in the template allow writing code similar to Python
|
|
||||||
syntax. Then the template is passed data to render the final document.
|
|
||||||
|
|
||||||
It includes:
|
|
||||||
|
|
||||||
- Template inheritance and inclusion.
|
|
||||||
- Define and import macros within templates.
|
|
||||||
- HTML templates can use autoescaping to prevent XSS from untrusted
|
|
||||||
user input.
|
|
||||||
- A sandboxed environment can safely render untrusted templates.
|
|
||||||
- AsyncIO support for generating templates and calling async
|
|
||||||
functions.
|
|
||||||
- I18N support with Babel.
|
|
||||||
- Templates are compiled to optimized Python code just-in-time and
|
|
||||||
cached, or can be compiled ahead-of-time.
|
|
||||||
- Exceptions point to the correct line in templates to make debugging
|
|
||||||
easier.
|
|
||||||
- Extensible filters, tests, functions, and even syntax.
|
|
||||||
|
|
||||||
Jinja's philosophy is that while application logic belongs in Python if
|
|
||||||
possible, it shouldn't make the template designer's job difficult by
|
|
||||||
restricting functionality too much.
|
|
||||||
|
|
||||||
|
|
||||||
Installing
|
|
||||||
----------
|
|
||||||
|
|
||||||
Install and update using `pip`_:
|
|
||||||
|
|
||||||
.. code-block:: text
|
|
||||||
|
|
||||||
$ pip install -U Jinja2
|
|
||||||
|
|
||||||
.. _pip: https://pip.pypa.io/en/stable/getting-started/
|
|
||||||
|
|
||||||
|
|
||||||
In A Nutshell
|
|
||||||
-------------
|
|
||||||
|
|
||||||
.. code-block:: jinja
|
|
||||||
|
|
||||||
{% extends "base.html" %}
|
|
||||||
{% block title %}Members{% endblock %}
|
|
||||||
{% block content %}
|
|
||||||
<ul>
|
|
||||||
{% for user in users %}
|
|
||||||
<li><a href="{{ user.url }}">{{ user.username }}</a></li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
|
|
||||||
Donate
|
|
||||||
------
|
|
||||||
|
|
||||||
The Pallets organization develops and supports Jinja and other popular
|
|
||||||
packages. 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://palletsprojects.com/donate
|
|
||||||
|
|
||||||
|
|
||||||
Links
|
|
||||||
-----
|
|
||||||
|
|
||||||
- Documentation: https://jinja.palletsprojects.com/
|
|
||||||
- Changes: https://jinja.palletsprojects.com/changes/
|
|
||||||
- PyPI Releases: https://pypi.org/project/Jinja2/
|
|
||||||
- Source Code: https://github.com/pallets/jinja/
|
|
||||||
- Issue Tracker: https://github.com/pallets/jinja/issues/
|
|
||||||
- Website: https://palletsprojects.com/p/jinja/
|
|
||||||
- Twitter: https://twitter.com/PalletsTeam
|
|
||||||
- Chat: https://discord.gg/pallets
|
|
||||||
|
|
||||||
|
|
@ -1,59 +0,0 @@
|
|||||||
Jinja2-3.0.3.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
|
||||||
Jinja2-3.0.3.dist-info/LICENSE.rst,sha256=O0nc7kEF6ze6wQ-vG-JgQI_oXSUrjp3y4JefweCUQ3s,1475
|
|
||||||
Jinja2-3.0.3.dist-info/METADATA,sha256=uvKoBSMLvh0qHK-6khEqSe1yOV4jxFzbPSREOp-3BXk,3539
|
|
||||||
Jinja2-3.0.3.dist-info/RECORD,,
|
|
||||||
Jinja2-3.0.3.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
||||||
Jinja2-3.0.3.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
|
|
||||||
Jinja2-3.0.3.dist-info/entry_points.txt,sha256=Qy_DkVo6Xj_zzOtmErrATe8lHZhOqdjpt3e4JJAGyi8,61
|
|
||||||
Jinja2-3.0.3.dist-info/top_level.txt,sha256=PkeVWtLb3-CqjWi1fO29OCbj55EhX_chhKrCdrVe_zs,7
|
|
||||||
jinja2/__init__.py,sha256=V3JjnTV-nyIHN6rwj03N1M11fegjGvv-weiHMQwH1pk,2205
|
|
||||||
jinja2/__pycache__/__init__.cpython-310.pyc,,
|
|
||||||
jinja2/__pycache__/_identifier.cpython-310.pyc,,
|
|
||||||
jinja2/__pycache__/async_utils.cpython-310.pyc,,
|
|
||||||
jinja2/__pycache__/bccache.cpython-310.pyc,,
|
|
||||||
jinja2/__pycache__/compiler.cpython-310.pyc,,
|
|
||||||
jinja2/__pycache__/constants.cpython-310.pyc,,
|
|
||||||
jinja2/__pycache__/debug.cpython-310.pyc,,
|
|
||||||
jinja2/__pycache__/defaults.cpython-310.pyc,,
|
|
||||||
jinja2/__pycache__/environment.cpython-310.pyc,,
|
|
||||||
jinja2/__pycache__/exceptions.cpython-310.pyc,,
|
|
||||||
jinja2/__pycache__/ext.cpython-310.pyc,,
|
|
||||||
jinja2/__pycache__/filters.cpython-310.pyc,,
|
|
||||||
jinja2/__pycache__/idtracking.cpython-310.pyc,,
|
|
||||||
jinja2/__pycache__/lexer.cpython-310.pyc,,
|
|
||||||
jinja2/__pycache__/loaders.cpython-310.pyc,,
|
|
||||||
jinja2/__pycache__/meta.cpython-310.pyc,,
|
|
||||||
jinja2/__pycache__/nativetypes.cpython-310.pyc,,
|
|
||||||
jinja2/__pycache__/nodes.cpython-310.pyc,,
|
|
||||||
jinja2/__pycache__/optimizer.cpython-310.pyc,,
|
|
||||||
jinja2/__pycache__/parser.cpython-310.pyc,,
|
|
||||||
jinja2/__pycache__/runtime.cpython-310.pyc,,
|
|
||||||
jinja2/__pycache__/sandbox.cpython-310.pyc,,
|
|
||||||
jinja2/__pycache__/tests.cpython-310.pyc,,
|
|
||||||
jinja2/__pycache__/utils.cpython-310.pyc,,
|
|
||||||
jinja2/__pycache__/visitor.cpython-310.pyc,,
|
|
||||||
jinja2/_identifier.py,sha256=EdgGJKi7O1yvr4yFlvqPNEqV6M1qHyQr8Gt8GmVTKVM,1775
|
|
||||||
jinja2/async_utils.py,sha256=jBcJSmLoQa2PjJdNcOpwaUmBxFNE9rZNwMF7Ob3dP9I,1947
|
|
||||||
jinja2/bccache.py,sha256=v5rKAlYxIvfJEa0uGzAC6yCYSS3KuXT5Eqi-n9qvNi8,12670
|
|
||||||
jinja2/compiler.py,sha256=v7zKz-mgSYXmfXD9mRmi2BU0B6Z-1RGZmOXCrsPKzc0,72209
|
|
||||||
jinja2/constants.py,sha256=GMoFydBF_kdpaRKPoM5cl5MviquVRLVyZtfp5-16jg0,1433
|
|
||||||
jinja2/debug.py,sha256=r0JL0vfO7HPlyKZEdr6eVlg7HoIg2OQGmJ7SeUEyAeI,8494
|
|
||||||
jinja2/defaults.py,sha256=boBcSw78h-lp20YbaXSJsqkAI2uN_mD_TtCydpeq5wU,1267
|
|
||||||
jinja2/environment.py,sha256=Vz20npBX5-SUH_eguQuxrSQDEsLFjho0qcHLdMhY3hA,60983
|
|
||||||
jinja2/exceptions.py,sha256=ioHeHrWwCWNaXX1inHmHVblvc4haO7AXsjCp3GfWvx0,5071
|
|
||||||
jinja2/ext.py,sha256=44SjDjeYkkxQTpmC2BetOTxEFMgQ42p2dfSwXmPFcSo,32122
|
|
||||||
jinja2/filters.py,sha256=jusKTZbd0ddZMaibZkxMUVKNsOsaYtOq_Il8Imtx4BE,52609
|
|
||||||
jinja2/idtracking.py,sha256=WekexMql3u5n3vDxFsQ_i8HW0j24AtjWTjrPBLWrHww,10721
|
|
||||||
jinja2/lexer.py,sha256=qNEQqDQw_zO5EaH6rFQsER7Qwn2du0o22prB-TR11HE,29930
|
|
||||||
jinja2/loaders.py,sha256=1MjXJOU6p4VywFqtpDZhtvtT_vIlmHnZKMKHHw4SZzA,22754
|
|
||||||
jinja2/meta.py,sha256=GNPEvifmSaU3CMxlbheBOZjeZ277HThOPUTf1RkppKQ,4396
|
|
||||||
jinja2/nativetypes.py,sha256=KCJl71MogrDih_BHBu6xV5p7Cr_jggAgu-shKTg6L28,3969
|
|
||||||
jinja2/nodes.py,sha256=i34GPRAZexXMT6bwuf5SEyvdmS-bRCy9KMjwN5O6pjk,34550
|
|
||||||
jinja2/optimizer.py,sha256=tHkMwXxfZkbfA1KmLcqmBMSaz7RLIvvItrJcPoXTyD8,1650
|
|
||||||
jinja2/parser.py,sha256=kHnU8v92GwMYkfr0MVakWv8UlSf_kJPx8LUsgQMof70,39767
|
|
||||||
jinja2/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
||||||
jinja2/runtime.py,sha256=wVRlkEmAgNU67AIQDqLvI6UkNLkzDqpLA-z4Mi3vl3g,35054
|
|
||||||
jinja2/sandbox.py,sha256=-8zxR6TO9kUkciAVFsIKu8Oq-C7PTeYEdZ5TtA55-gw,14600
|
|
||||||
jinja2/tests.py,sha256=Am5Z6Lmfr2XaH_npIfJJ8MdXtWsbLjMULZJulTAj30E,5905
|
|
||||||
jinja2/utils.py,sha256=udQxWIKaq4QDCZiXN31ngKOaGGdaMA5fl0JMaM-F6fg,26971
|
|
||||||
jinja2/visitor.py,sha256=ZmeLuTj66ic35-uFH-1m0EKXiw4ObDDb_WuE6h5vPFg,3572
|
|
@ -1,5 +0,0 @@
|
|||||||
Wheel-Version: 1.0
|
|
||||||
Generator: bdist_wheel (0.37.0)
|
|
||||||
Root-Is-Purelib: true
|
|
||||||
Tag: py3-none-any
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
[babel.extractors]
|
|
||||||
jinja2 = jinja2.ext:babel_extract [i18n]
|
|
||||||
|
|
@ -1 +0,0 @@
|
|||||||
jinja2
|
|
@ -1 +0,0 @@
|
|||||||
pip
|
|
@ -1,29 +0,0 @@
|
|||||||
Copyright 2007, 2008 The Python Markdown Project (v. 1.7 and later)
|
|
||||||
Copyright 2004, 2005, 2006 Yuri Takhteyev (v. 0.2-1.6b)
|
|
||||||
Copyright 2004 Manfred Stienstra (the original version)
|
|
||||||
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright
|
|
||||||
notice, this list of conditions and the following disclaimer.
|
|
||||||
* 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.
|
|
||||||
* Neither the name of the Python Markdown Project 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 PYTHON MARKDOWN PROJECT ''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 ANY CONTRIBUTORS TO THE PYTHON MARKDOWN PROJECT
|
|
||||||
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.
|
|
@ -1,110 +0,0 @@
|
|||||||
Metadata-Version: 2.1
|
|
||||||
Name: Markdown
|
|
||||||
Version: 3.3.6
|
|
||||||
Summary: Python implementation of Markdown.
|
|
||||||
Home-page: https://Python-Markdown.github.io/
|
|
||||||
Author: Manfred Stienstra, Yuri takhteyev and Waylan limberg
|
|
||||||
Author-email: python.markdown@gmail.com
|
|
||||||
Maintainer: Waylan Limberg
|
|
||||||
Maintainer-email: python.markdown@gmail.com
|
|
||||||
License: BSD License
|
|
||||||
Project-URL: Documentation, https://Python-Markdown.github.io/
|
|
||||||
Project-URL: GitHub Project, https://github.com/Python-Markdown/markdown
|
|
||||||
Project-URL: Issue Tracker, https://github.com/Python-Markdown/markdown/issues
|
|
||||||
Platform: UNKNOWN
|
|
||||||
Classifier: Development Status :: 5 - Production/Stable
|
|
||||||
Classifier: License :: OSI Approved :: BSD License
|
|
||||||
Classifier: Operating System :: OS Independent
|
|
||||||
Classifier: Programming Language :: Python
|
|
||||||
Classifier: Programming Language :: Python :: 3
|
|
||||||
Classifier: Programming Language :: Python :: 3.6
|
|
||||||
Classifier: Programming Language :: Python :: 3.7
|
|
||||||
Classifier: Programming Language :: Python :: 3.8
|
|
||||||
Classifier: Programming Language :: Python :: 3.9
|
|
||||||
Classifier: Programming Language :: Python :: 3.10
|
|
||||||
Classifier: Programming Language :: Python :: 3 :: Only
|
|
||||||
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
||||||
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
||||||
Classifier: Topic :: Communications :: Email :: Filters
|
|
||||||
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries
|
|
||||||
Classifier: Topic :: Internet :: WWW/HTTP :: Site Management
|
|
||||||
Classifier: Topic :: Software Development :: Documentation
|
|
||||||
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
||||||
Classifier: Topic :: Text Processing :: Filters
|
|
||||||
Classifier: Topic :: Text Processing :: Markup :: HTML
|
|
||||||
Classifier: Topic :: Text Processing :: Markup :: Markdown
|
|
||||||
Requires-Python: >=3.6
|
|
||||||
Description-Content-Type: text/markdown
|
|
||||||
License-File: LICENSE.md
|
|
||||||
Requires-Dist: importlib-metadata (>=4.4) ; python_version < "3.10"
|
|
||||||
Provides-Extra: testing
|
|
||||||
Requires-Dist: coverage ; extra == 'testing'
|
|
||||||
Requires-Dist: pyyaml ; extra == 'testing'
|
|
||||||
|
|
||||||
[Python-Markdown][]
|
|
||||||
===================
|
|
||||||
|
|
||||||
[![Build Status][build-button]][build]
|
|
||||||
[![Coverage Status][codecov-button]][codecov]
|
|
||||||
[![Latest Version][mdversion-button]][md-pypi]
|
|
||||||
[![Python Versions][pyversion-button]][md-pypi]
|
|
||||||
[![BSD License][bsdlicense-button]][bsdlicense]
|
|
||||||
[![Code of Conduct][codeofconduct-button]][Code of Conduct]
|
|
||||||
|
|
||||||
[build-button]: https://github.com/Python-Markdown/markdown/workflows/CI/badge.svg?event=push
|
|
||||||
[build]: https://github.com/Python-Markdown/markdown/actions?query=workflow%3ACI+event%3Apush
|
|
||||||
[codecov-button]: https://codecov.io/gh/Python-Markdown/markdown/branch/master/graph/badge.svg
|
|
||||||
[codecov]: https://codecov.io/gh/Python-Markdown/markdown
|
|
||||||
[mdversion-button]: https://img.shields.io/pypi/v/Markdown.svg
|
|
||||||
[md-pypi]: https://pypi.org/project/Markdown/
|
|
||||||
[pyversion-button]: https://img.shields.io/pypi/pyversions/Markdown.svg
|
|
||||||
[bsdlicense-button]: https://img.shields.io/badge/license-BSD-yellow.svg
|
|
||||||
[bsdlicense]: https://opensource.org/licenses/BSD-3-Clause
|
|
||||||
[codeofconduct-button]: https://img.shields.io/badge/code%20of%20conduct-contributor%20covenant-green.svg?style=flat-square
|
|
||||||
[Code of Conduct]: https://github.com/Python-Markdown/markdown/blob/master/CODE_OF_CONDUCT.md
|
|
||||||
|
|
||||||
This is a Python implementation of John Gruber's [Markdown][].
|
|
||||||
It is almost completely compliant with the reference implementation,
|
|
||||||
though there are a few known issues. See [Features][] for information
|
|
||||||
on what exactly is supported and what is not. Additional features are
|
|
||||||
supported by the [Available Extensions][].
|
|
||||||
|
|
||||||
[Python-Markdown]: https://Python-Markdown.github.io/
|
|
||||||
[Markdown]: https://daringfireball.net/projects/markdown/
|
|
||||||
[Features]: https://Python-Markdown.github.io#Features
|
|
||||||
[Available Extensions]: https://Python-Markdown.github.io/extensions
|
|
||||||
|
|
||||||
Documentation
|
|
||||||
-------------
|
|
||||||
|
|
||||||
```bash
|
|
||||||
pip install markdown
|
|
||||||
```
|
|
||||||
```python
|
|
||||||
import markdown
|
|
||||||
html = markdown.markdown(your_text_string)
|
|
||||||
```
|
|
||||||
|
|
||||||
For more advanced [installation] and [usage] documentation, see the `docs/` directory
|
|
||||||
of the distribution or the project website at <https://Python-Markdown.github.io/>.
|
|
||||||
|
|
||||||
[installation]: https://python-markdown.github.io/install/
|
|
||||||
[usage]: https://python-markdown.github.io/reference/
|
|
||||||
|
|
||||||
See the change log at <https://Python-Markdown.github.io/change_log>.
|
|
||||||
|
|
||||||
Support
|
|
||||||
-------
|
|
||||||
|
|
||||||
You may report bugs, ask for help, and discuss various other issues on the [bug tracker][].
|
|
||||||
|
|
||||||
[bug tracker]: https://github.com/Python-Markdown/markdown/issues
|
|
||||||
|
|
||||||
Code of Conduct
|
|
||||||
---------------
|
|
||||||
|
|
||||||
Everyone interacting in the Python-Markdown project's codebases, issue trackers,
|
|
||||||
and mailing lists is expected to follow the [Code of Conduct].
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,77 +0,0 @@
|
|||||||
../../../bin/markdown_py,sha256=fSPa3oYa6Akye7c2VssGgtrJuYQ2DI2PkrNhh8dCtTY,265
|
|
||||||
Markdown-3.3.6.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
|
||||||
Markdown-3.3.6.dist-info/LICENSE.md,sha256=bxGTy2NHGOZcOlN9biXr1hSCDsDvaTz8EiSBEmONZNo,1645
|
|
||||||
Markdown-3.3.6.dist-info/METADATA,sha256=5gK5efFze8GvYs5GX7G5M597OXkRKG5DtqP8CvscZVQ,4630
|
|
||||||
Markdown-3.3.6.dist-info/RECORD,,
|
|
||||||
Markdown-3.3.6.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
||||||
Markdown-3.3.6.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
|
|
||||||
Markdown-3.3.6.dist-info/entry_points.txt,sha256=j4jiKg-iwZGImvi8OzotZePWoFbJJ4GrfzDqH03u3SQ,1103
|
|
||||||
Markdown-3.3.6.dist-info/top_level.txt,sha256=IAxs8x618RXoH1uCqeLLxXsDefJvE_mIibr_M4sOlyk,9
|
|
||||||
markdown/__init__.py,sha256=002-LuHviYzROW2rg_gBGai81nMouUNO9UFj5nSsTSk,2065
|
|
||||||
markdown/__main__.py,sha256=JX1057VoovH3NA5uH5nQdQE8b0kXoeT79ZxCzFoL_kg,5803
|
|
||||||
markdown/__meta__.py,sha256=IDpR5cdETCEXvY2YxKlRPnIQvdyf5vHJolJNDD4Um9w,1630
|
|
||||||
markdown/__pycache__/__init__.cpython-310.pyc,,
|
|
||||||
markdown/__pycache__/__main__.cpython-310.pyc,,
|
|
||||||
markdown/__pycache__/__meta__.cpython-310.pyc,,
|
|
||||||
markdown/__pycache__/blockparser.cpython-310.pyc,,
|
|
||||||
markdown/__pycache__/blockprocessors.cpython-310.pyc,,
|
|
||||||
markdown/__pycache__/core.cpython-310.pyc,,
|
|
||||||
markdown/__pycache__/htmlparser.cpython-310.pyc,,
|
|
||||||
markdown/__pycache__/inlinepatterns.cpython-310.pyc,,
|
|
||||||
markdown/__pycache__/pep562.cpython-310.pyc,,
|
|
||||||
markdown/__pycache__/postprocessors.cpython-310.pyc,,
|
|
||||||
markdown/__pycache__/preprocessors.cpython-310.pyc,,
|
|
||||||
markdown/__pycache__/serializers.cpython-310.pyc,,
|
|
||||||
markdown/__pycache__/test_tools.cpython-310.pyc,,
|
|
||||||
markdown/__pycache__/treeprocessors.cpython-310.pyc,,
|
|
||||||
markdown/__pycache__/util.cpython-310.pyc,,
|
|
||||||
markdown/blockparser.py,sha256=JpBhOokOoBUGCXolftOc5m1hPcR2y9s9hVd9WSuhHzo,4285
|
|
||||||
markdown/blockprocessors.py,sha256=LK4mfcgjH8rk3zsyxBzxisxdQjpFj0xkg1LxBtlpLUs,24890
|
|
||||||
markdown/core.py,sha256=ZHtqvLdVHOKWIuX_UzdL3rIcxMwji5TC5ZCkV19iM4U,15401
|
|
||||||
markdown/extensions/__init__.py,sha256=nw2VtafIf5zHjAcUuykQbaNY6taOmNn7ARn11-Pe080,3661
|
|
||||||
markdown/extensions/__pycache__/__init__.cpython-310.pyc,,
|
|
||||||
markdown/extensions/__pycache__/abbr.cpython-310.pyc,,
|
|
||||||
markdown/extensions/__pycache__/admonition.cpython-310.pyc,,
|
|
||||||
markdown/extensions/__pycache__/attr_list.cpython-310.pyc,,
|
|
||||||
markdown/extensions/__pycache__/codehilite.cpython-310.pyc,,
|
|
||||||
markdown/extensions/__pycache__/def_list.cpython-310.pyc,,
|
|
||||||
markdown/extensions/__pycache__/extra.cpython-310.pyc,,
|
|
||||||
markdown/extensions/__pycache__/fenced_code.cpython-310.pyc,,
|
|
||||||
markdown/extensions/__pycache__/footnotes.cpython-310.pyc,,
|
|
||||||
markdown/extensions/__pycache__/legacy_attrs.cpython-310.pyc,,
|
|
||||||
markdown/extensions/__pycache__/legacy_em.cpython-310.pyc,,
|
|
||||||
markdown/extensions/__pycache__/md_in_html.cpython-310.pyc,,
|
|
||||||
markdown/extensions/__pycache__/meta.cpython-310.pyc,,
|
|
||||||
markdown/extensions/__pycache__/nl2br.cpython-310.pyc,,
|
|
||||||
markdown/extensions/__pycache__/sane_lists.cpython-310.pyc,,
|
|
||||||
markdown/extensions/__pycache__/smarty.cpython-310.pyc,,
|
|
||||||
markdown/extensions/__pycache__/tables.cpython-310.pyc,,
|
|
||||||
markdown/extensions/__pycache__/toc.cpython-310.pyc,,
|
|
||||||
markdown/extensions/__pycache__/wikilinks.cpython-310.pyc,,
|
|
||||||
markdown/extensions/abbr.py,sha256=5TNU5ml6-H1n-fztEkgUphSTvp5yKCXaiPZMrVuRFvo,3186
|
|
||||||
markdown/extensions/admonition.py,sha256=INIecvdzQ7RLmgP8M-N6AZJ5uMd6dBfh9Uj6YibgNLk,5847
|
|
||||||
markdown/extensions/attr_list.py,sha256=nhKFY_u6BVyKW2oMUeC4wEjqFNGpDSnNXqaohuF6M7I,5988
|
|
||||||
markdown/extensions/codehilite.py,sha256=aEorLnWkEA_zwC2gAoqlR5nb8ZwjiUUFe0bA8bVP0Co,11654
|
|
||||||
markdown/extensions/def_list.py,sha256=p-JT64hKqMkfxlmhETMVRPxjrdnBIPDW8k3S05S-qNM,3634
|
|
||||||
markdown/extensions/extra.py,sha256=udRN8OvSWcq3UwkPygvsFl1RlCVtCJ-ARVg2IwVH6VY,1831
|
|
||||||
markdown/extensions/fenced_code.py,sha256=pRZjVaEh8JZdhyLb2Vy7alfqIQNuPtN2Mzt_Imj2Vm0,7346
|
|
||||||
markdown/extensions/footnotes.py,sha256=xvT6etWuTWTHLNHXYQWQGV-35RHTCvH9kBp2xJA6Jdg,15481
|
|
||||||
markdown/extensions/legacy_attrs.py,sha256=2EaVQkxQoNnP8_lMPvGRBdNda8L4weUQroiyEuVdS-w,2547
|
|
||||||
markdown/extensions/legacy_em.py,sha256=18j4L6zdScy9k18y-U2zaIhYsKVTxCaPurjqLFZmWkI,1582
|
|
||||||
markdown/extensions/md_in_html.py,sha256=17w2s-YvjzKPWmng9La6J9-1-h1TWNEFBhVd0pF-j9U,15830
|
|
||||||
markdown/extensions/meta.py,sha256=EUfkzM7l7UpH__Or9K3pl8ldVddwndlCZWA3d712RAE,2331
|
|
||||||
markdown/extensions/nl2br.py,sha256=wAqTNOuf2L1NzlEvEqoID70n9y-aiYaGLkuyQk3CD0w,783
|
|
||||||
markdown/extensions/sane_lists.py,sha256=ZQmCf-247KBexVG0fc62nDvokGkV6W1uavYbieNKSG4,1505
|
|
||||||
markdown/extensions/smarty.py,sha256=0padzkVCNACainKw-Xj1S5UfT0125VCTfNejmrCZItA,10238
|
|
||||||
markdown/extensions/tables.py,sha256=bicFx_wqhnEx6Y_8MJqA56rh71pt5fOe94oiWbvcobY,7685
|
|
||||||
markdown/extensions/toc.py,sha256=Q8YP0DIuyl_B0GfUASYbE4q_B7zFsHS93t5fjiZyJWE,14136
|
|
||||||
markdown/extensions/wikilinks.py,sha256=GkgT9BY7b1-qW--dIwFAhC9V20RoeF13b7CFdw_V21Q,2812
|
|
||||||
markdown/htmlparser.py,sha256=K3OMq-OU2CTWCMNGPbMGqMmiwZAIrG2lQxuDOJxDjYo,13032
|
|
||||||
markdown/inlinepatterns.py,sha256=csrxrPIET_nltn-phz80ObXu5i5oibK68h9ZCWT5eAo,29775
|
|
||||||
markdown/pep562.py,sha256=5UkqT7sb-cQufgbOl_jF-RYUVVHS7VThzlMzR9vrd3I,8917
|
|
||||||
markdown/postprocessors.py,sha256=NeJyWBqPeDuBBJLTGs5Bfm5oTkUBXk9HWBeQy2_OldI,4262
|
|
||||||
markdown/preprocessors.py,sha256=-s8QGHGlX7JAIJTfCivuc-CVwTLWs0IyEU94YUT2IvQ,2742
|
|
||||||
markdown/serializers.py,sha256=_wQl-iJrPSUEQ4Q1owWYqN9qceVh6TOlAOH_i44BKAQ,6540
|
|
||||||
markdown/test_tools.py,sha256=svokrqFAHJ1H_BiYhEY9kilmk4dZIO3jYJTJcOsphCg,8361
|
|
||||||
markdown/treeprocessors.py,sha256=S91w6byWeyBF96q9w8SJ_8UQV8p0UuFJ7Brj6Rw0-y4,15433
|
|
||||||
markdown/util.py,sha256=1BKofVbYfqmgAK982UJATA22pj-ee9BcwxaHxB_bOZg,16063
|
|
@ -1,5 +0,0 @@
|
|||||||
Wheel-Version: 1.0
|
|
||||||
Generator: bdist_wheel (0.37.0)
|
|
||||||
Root-Is-Purelib: true
|
|
||||||
Tag: py3-none-any
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
|||||||
[console_scripts]
|
|
||||||
markdown_py = markdown.__main__:run
|
|
||||||
|
|
||||||
[markdown.extensions]
|
|
||||||
abbr = markdown.extensions.abbr:AbbrExtension
|
|
||||||
admonition = markdown.extensions.admonition:AdmonitionExtension
|
|
||||||
attr_list = markdown.extensions.attr_list:AttrListExtension
|
|
||||||
codehilite = markdown.extensions.codehilite:CodeHiliteExtension
|
|
||||||
def_list = markdown.extensions.def_list:DefListExtension
|
|
||||||
extra = markdown.extensions.extra:ExtraExtension
|
|
||||||
fenced_code = markdown.extensions.fenced_code:FencedCodeExtension
|
|
||||||
footnotes = markdown.extensions.footnotes:FootnoteExtension
|
|
||||||
legacy_attrs = markdown.extensions.legacy_attrs:LegacyAttrExtension
|
|
||||||
legacy_em = markdown.extensions.legacy_em:LegacyEmExtension
|
|
||||||
md_in_html = markdown.extensions.md_in_html:MarkdownInHtmlExtension
|
|
||||||
meta = markdown.extensions.meta:MetaExtension
|
|
||||||
nl2br = markdown.extensions.nl2br:Nl2BrExtension
|
|
||||||
sane_lists = markdown.extensions.sane_lists:SaneListExtension
|
|
||||||
smarty = markdown.extensions.smarty:SmartyExtension
|
|
||||||
tables = markdown.extensions.tables:TableExtension
|
|
||||||
toc = markdown.extensions.toc:TocExtension
|
|
||||||
wikilinks = markdown.extensions.wikilinks:WikiLinkExtension
|
|
||||||
|
|
@ -1 +0,0 @@
|
|||||||
markdown
|
|
@ -1 +0,0 @@
|
|||||||
pip
|
|
@ -1,28 +0,0 @@
|
|||||||
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.
|
|
@ -1,101 +0,0 @@
|
|||||||
Metadata-Version: 2.1
|
|
||||||
Name: MarkupSafe
|
|
||||||
Version: 2.1.0
|
|
||||||
Summary: Safely add untrusted strings to HTML/XML markup.
|
|
||||||
Home-page: https://palletsprojects.com/p/markupsafe/
|
|
||||||
Author: Armin Ronacher
|
|
||||||
Author-email: armin.ronacher@active-4.com
|
|
||||||
Maintainer: Pallets
|
|
||||||
Maintainer-email: contact@palletsprojects.com
|
|
||||||
License: BSD-3-Clause
|
|
||||||
Project-URL: Donate, https://palletsprojects.com/donate
|
|
||||||
Project-URL: Documentation, https://markupsafe.palletsprojects.com/
|
|
||||||
Project-URL: Changes, https://markupsafe.palletsprojects.com/changes/
|
|
||||||
Project-URL: Source Code, https://github.com/pallets/markupsafe/
|
|
||||||
Project-URL: Issue Tracker, https://github.com/pallets/markupsafe/issues/
|
|
||||||
Project-URL: Twitter, https://twitter.com/PalletsTeam
|
|
||||||
Project-URL: Chat, https://discord.gg/pallets
|
|
||||||
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: Topic :: Internet :: WWW/HTTP :: Dynamic Content
|
|
||||||
Classifier: Topic :: Text Processing :: Markup :: HTML
|
|
||||||
Requires-Python: >=3.7
|
|
||||||
Description-Content-Type: text/x-rst
|
|
||||||
License-File: LICENSE.rst
|
|
||||||
|
|
||||||
MarkupSafe
|
|
||||||
==========
|
|
||||||
|
|
||||||
MarkupSafe implements a text object that escapes characters so it is
|
|
||||||
safe to use in HTML and XML. Characters that have special meanings are
|
|
||||||
replaced so that they display as the actual characters. This mitigates
|
|
||||||
injection attacks, meaning untrusted user input can safely be displayed
|
|
||||||
on a page.
|
|
||||||
|
|
||||||
|
|
||||||
Installing
|
|
||||||
----------
|
|
||||||
|
|
||||||
Install and update using `pip`_:
|
|
||||||
|
|
||||||
.. code-block:: text
|
|
||||||
|
|
||||||
pip install -U MarkupSafe
|
|
||||||
|
|
||||||
.. _pip: https://pip.pypa.io/en/stable/getting-started/
|
|
||||||
|
|
||||||
|
|
||||||
Examples
|
|
||||||
--------
|
|
||||||
|
|
||||||
.. code-block:: pycon
|
|
||||||
|
|
||||||
>>> from markupsafe import Markup, escape
|
|
||||||
|
|
||||||
>>> # escape replaces special characters and wraps in Markup
|
|
||||||
>>> escape("<script>alert(document.cookie);</script>")
|
|
||||||
Markup('<script>alert(document.cookie);</script>')
|
|
||||||
|
|
||||||
>>> # wrap in Markup to mark text "safe" and prevent escaping
|
|
||||||
>>> Markup("<strong>Hello</strong>")
|
|
||||||
Markup('<strong>hello</strong>')
|
|
||||||
|
|
||||||
>>> escape(Markup("<strong>Hello</strong>"))
|
|
||||||
Markup('<strong>hello</strong>')
|
|
||||||
|
|
||||||
>>> # Markup is a str subclass
|
|
||||||
>>> # methods and operators escape their arguments
|
|
||||||
>>> template = Markup("Hello <em>{name}</em>")
|
|
||||||
>>> template.format(name='"World"')
|
|
||||||
Markup('Hello <em>"World"</em>')
|
|
||||||
|
|
||||||
|
|
||||||
Donate
|
|
||||||
------
|
|
||||||
|
|
||||||
The Pallets organization develops and supports MarkupSafe and other
|
|
||||||
popular packages. 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://palletsprojects.com/donate
|
|
||||||
|
|
||||||
|
|
||||||
Links
|
|
||||||
-----
|
|
||||||
|
|
||||||
- Documentation: https://markupsafe.palletsprojects.com/
|
|
||||||
- Changes: https://markupsafe.palletsprojects.com/changes/
|
|
||||||
- PyPI Releases: https://pypi.org/project/MarkupSafe/
|
|
||||||
- Source Code: https://github.com/pallets/markupsafe/
|
|
||||||
- Issue Tracker: https://github.com/pallets/markupsafe/issues/
|
|
||||||
- Website: https://palletsprojects.com/p/markupsafe/
|
|
||||||
- Twitter: https://twitter.com/PalletsTeam
|
|
||||||
- Chat: https://discord.gg/pallets
|
|
||||||
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
|||||||
MarkupSafe-2.1.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
|
||||||
MarkupSafe-2.1.0.dist-info/LICENSE.rst,sha256=SJqOEQhQntmKN7uYPhHg9-HTHwvY-Zp5yESOf_N9B-o,1475
|
|
||||||
MarkupSafe-2.1.0.dist-info/METADATA,sha256=585PQ3HNHmJeHpbdXckhscUSR9AaQnh5RWaaMtCB4_8,3242
|
|
||||||
MarkupSafe-2.1.0.dist-info/RECORD,,
|
|
||||||
MarkupSafe-2.1.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
||||||
MarkupSafe-2.1.0.dist-info/WHEEL,sha256=6B0vZ-Dd34LpGZN_4Y_GbBSl1fSb7keGXRzuHUFcOBA,152
|
|
||||||
MarkupSafe-2.1.0.dist-info/top_level.txt,sha256=qy0Plje5IJuvsCBjejJyhDCjEAdcDLK_2agVcex8Z6U,11
|
|
||||||
markupsafe/__init__.py,sha256=7p5vza0YNtAtfancH4eGnJLe9V4uEFATInoX7Ko7aig,9130
|
|
||||||
markupsafe/__pycache__/__init__.cpython-310.pyc,,
|
|
||||||
markupsafe/__pycache__/_native.cpython-310.pyc,,
|
|
||||||
markupsafe/_native.py,sha256=GR86Qvo_GcgKmKreA1WmYN9ud17OFwkww8E-fiW-57s,1713
|
|
||||||
markupsafe/_speedups.c,sha256=X2XvQVtIdcK4Usz70BvkzoOfjTCmQlDkkjYSn-swE0g,7083
|
|
||||||
markupsafe/_speedups.cpython-310-x86_64-linux-gnu.so,sha256=MK7Cz4YNHiq95odgpldQy_64gBMHWU12vH7ZlN8KikE,44224
|
|
||||||
markupsafe/_speedups.pyi,sha256=vfMCsOgbAXRNLUXkyuyonG8uEWKYU4PDqNuMaDELAYw,229
|
|
||||||
markupsafe/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@ -1,6 +0,0 @@
|
|||||||
Wheel-Version: 1.0
|
|
||||||
Generator: bdist_wheel (0.37.0)
|
|
||||||
Root-Is-Purelib: false
|
|
||||||
Tag: cp310-cp310-manylinux_2_17_x86_64
|
|
||||||
Tag: cp310-cp310-manylinux2014_x86_64
|
|
||||||
|
|
@ -1 +0,0 @@
|
|||||||
markupsafe
|
|
2634
backend/env/lib/python3.10/site-packages/OpenSSL/SSL.py
vendored
2634
backend/env/lib/python3.10/site-packages/OpenSSL/SSL.py
vendored
File diff suppressed because it is too large
Load Diff
@ -1,32 +0,0 @@
|
|||||||
# Copyright (C) AB Strakt
|
|
||||||
# See LICENSE for details.
|
|
||||||
|
|
||||||
"""
|
|
||||||
pyOpenSSL - A simple wrapper around the OpenSSL library
|
|
||||||
"""
|
|
||||||
|
|
||||||
from OpenSSL import crypto, SSL
|
|
||||||
from OpenSSL.version import (
|
|
||||||
__author__,
|
|
||||||
__copyright__,
|
|
||||||
__email__,
|
|
||||||
__license__,
|
|
||||||
__summary__,
|
|
||||||
__title__,
|
|
||||||
__uri__,
|
|
||||||
__version__,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
__all__ = [
|
|
||||||
"SSL",
|
|
||||||
"crypto",
|
|
||||||
"__author__",
|
|
||||||
"__copyright__",
|
|
||||||
"__email__",
|
|
||||||
"__license__",
|
|
||||||
"__summary__",
|
|
||||||
"__title__",
|
|
||||||
"__uri__",
|
|
||||||
"__version__",
|
|
||||||
]
|
|
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.
@ -1,122 +0,0 @@
|
|||||||
import os
|
|
||||||
import sys
|
|
||||||
import warnings
|
|
||||||
|
|
||||||
from cryptography.hazmat.bindings.openssl.binding import Binding
|
|
||||||
|
|
||||||
|
|
||||||
binding = Binding()
|
|
||||||
ffi = binding.ffi
|
|
||||||
lib = binding.lib
|
|
||||||
|
|
||||||
|
|
||||||
# This is a special CFFI allocator that does not bother to zero its memory
|
|
||||||
# after allocation. This has vastly better performance on large allocations and
|
|
||||||
# so should be used whenever we don't need the memory zeroed out.
|
|
||||||
no_zero_allocator = ffi.new_allocator(should_clear_after_alloc=False)
|
|
||||||
|
|
||||||
|
|
||||||
def text(charp):
|
|
||||||
"""
|
|
||||||
Get a native string type representing of the given CFFI ``char*`` object.
|
|
||||||
|
|
||||||
:param charp: A C-style string represented using CFFI.
|
|
||||||
|
|
||||||
:return: :class:`str`
|
|
||||||
"""
|
|
||||||
if not charp:
|
|
||||||
return ""
|
|
||||||
return ffi.string(charp).decode("utf-8")
|
|
||||||
|
|
||||||
|
|
||||||
def exception_from_error_queue(exception_type):
|
|
||||||
"""
|
|
||||||
Convert an OpenSSL library failure into a Python exception.
|
|
||||||
|
|
||||||
When a call to the native OpenSSL library fails, this is usually signalled
|
|
||||||
by the return value, and an error code is stored in an error queue
|
|
||||||
associated with the current thread. The err library provides functions to
|
|
||||||
obtain these error codes and textual error messages.
|
|
||||||
"""
|
|
||||||
errors = []
|
|
||||||
|
|
||||||
while True:
|
|
||||||
error = lib.ERR_get_error()
|
|
||||||
if error == 0:
|
|
||||||
break
|
|
||||||
errors.append(
|
|
||||||
(
|
|
||||||
text(lib.ERR_lib_error_string(error)),
|
|
||||||
text(lib.ERR_func_error_string(error)),
|
|
||||||
text(lib.ERR_reason_error_string(error)),
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
raise exception_type(errors)
|
|
||||||
|
|
||||||
|
|
||||||
def make_assert(error):
|
|
||||||
"""
|
|
||||||
Create an assert function that uses :func:`exception_from_error_queue` to
|
|
||||||
raise an exception wrapped by *error*.
|
|
||||||
"""
|
|
||||||
|
|
||||||
def openssl_assert(ok):
|
|
||||||
"""
|
|
||||||
If *ok* is not True, retrieve the error from OpenSSL and raise it.
|
|
||||||
"""
|
|
||||||
if ok is not True:
|
|
||||||
exception_from_error_queue(error)
|
|
||||||
|
|
||||||
return openssl_assert
|
|
||||||
|
|
||||||
|
|
||||||
def path_bytes(s):
|
|
||||||
"""
|
|
||||||
Convert a Python path to a :py:class:`bytes` for the path which can be
|
|
||||||
passed into an OpenSSL API accepting a filename.
|
|
||||||
|
|
||||||
:param s: A path (valid for os.fspath).
|
|
||||||
|
|
||||||
:return: An instance of :py:class:`bytes`.
|
|
||||||
"""
|
|
||||||
b = os.fspath(s)
|
|
||||||
|
|
||||||
if isinstance(b, str):
|
|
||||||
return b.encode(sys.getfilesystemencoding())
|
|
||||||
else:
|
|
||||||
return b
|
|
||||||
|
|
||||||
|
|
||||||
def byte_string(s):
|
|
||||||
return s.encode("charmap")
|
|
||||||
|
|
||||||
|
|
||||||
# A marker object to observe whether some optional arguments are passed any
|
|
||||||
# value or not.
|
|
||||||
UNSPECIFIED = object()
|
|
||||||
|
|
||||||
_TEXT_WARNING = "str for {0} is no longer accepted, use bytes"
|
|
||||||
|
|
||||||
|
|
||||||
def text_to_bytes_and_warn(label, obj):
|
|
||||||
"""
|
|
||||||
If ``obj`` is text, emit a warning that it should be bytes instead and try
|
|
||||||
to convert it to bytes automatically.
|
|
||||||
|
|
||||||
:param str label: The name of the parameter from which ``obj`` was taken
|
|
||||||
(so a developer can easily find the source of the problem and correct
|
|
||||||
it).
|
|
||||||
|
|
||||||
:return: If ``obj`` is the text string type, a ``bytes`` object giving the
|
|
||||||
UTF-8 encoding of that text is returned. Otherwise, ``obj`` itself is
|
|
||||||
returned.
|
|
||||||
"""
|
|
||||||
if isinstance(obj, str):
|
|
||||||
warnings.warn(
|
|
||||||
_TEXT_WARNING.format(label),
|
|
||||||
category=DeprecationWarning,
|
|
||||||
stacklevel=3,
|
|
||||||
)
|
|
||||||
return obj.encode("utf-8")
|
|
||||||
return obj
|
|
File diff suppressed because it is too large
Load Diff
@ -1,42 +0,0 @@
|
|||||||
from __future__ import print_function
|
|
||||||
|
|
||||||
import ssl
|
|
||||||
import sys
|
|
||||||
|
|
||||||
import OpenSSL.SSL
|
|
||||||
import cffi
|
|
||||||
import cryptography
|
|
||||||
|
|
||||||
from . import version
|
|
||||||
|
|
||||||
|
|
||||||
_env_info = """\
|
|
||||||
pyOpenSSL: {pyopenssl}
|
|
||||||
cryptography: {cryptography}
|
|
||||||
cffi: {cffi}
|
|
||||||
cryptography's compiled against OpenSSL: {crypto_openssl_compile}
|
|
||||||
cryptography's linked OpenSSL: {crypto_openssl_link}
|
|
||||||
Python's OpenSSL: {python_openssl}
|
|
||||||
Python executable: {python}
|
|
||||||
Python version: {python_version}
|
|
||||||
Platform: {platform}
|
|
||||||
sys.path: {sys_path}""".format(
|
|
||||||
pyopenssl=version.__version__,
|
|
||||||
crypto_openssl_compile=OpenSSL._util.ffi.string(
|
|
||||||
OpenSSL._util.lib.OPENSSL_VERSION_TEXT,
|
|
||||||
).decode("ascii"),
|
|
||||||
crypto_openssl_link=OpenSSL.SSL.SSLeay_version(
|
|
||||||
OpenSSL.SSL.SSLEAY_VERSION
|
|
||||||
).decode("ascii"),
|
|
||||||
python_openssl=getattr(ssl, "OPENSSL_VERSION", "n/a"),
|
|
||||||
cryptography=cryptography.__version__,
|
|
||||||
cffi=cffi.__version__,
|
|
||||||
python=sys.executable,
|
|
||||||
python_version=sys.version,
|
|
||||||
platform=sys.platform,
|
|
||||||
sys_path=sys.path,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
print(_env_info)
|
|
@ -1,40 +0,0 @@
|
|||||||
"""
|
|
||||||
PRNG management routines, thin wrappers.
|
|
||||||
"""
|
|
||||||
|
|
||||||
from OpenSSL._util import lib as _lib
|
|
||||||
|
|
||||||
|
|
||||||
def add(buffer, entropy):
|
|
||||||
"""
|
|
||||||
Mix bytes from *string* into the PRNG state.
|
|
||||||
|
|
||||||
The *entropy* argument is (the lower bound of) an estimate of how much
|
|
||||||
randomness is contained in *string*, measured in bytes.
|
|
||||||
|
|
||||||
For more information, see e.g. :rfc:`1750`.
|
|
||||||
|
|
||||||
This function is only relevant if you are forking Python processes and
|
|
||||||
need to reseed the CSPRNG after fork.
|
|
||||||
|
|
||||||
:param buffer: Buffer with random data.
|
|
||||||
:param entropy: The entropy (in bytes) measurement of the buffer.
|
|
||||||
|
|
||||||
:return: :obj:`None`
|
|
||||||
"""
|
|
||||||
if not isinstance(buffer, bytes):
|
|
||||||
raise TypeError("buffer must be a byte string")
|
|
||||||
|
|
||||||
if not isinstance(entropy, int):
|
|
||||||
raise TypeError("entropy must be an integer")
|
|
||||||
|
|
||||||
_lib.RAND_add(buffer, len(buffer), entropy)
|
|
||||||
|
|
||||||
|
|
||||||
def status():
|
|
||||||
"""
|
|
||||||
Check whether the PRNG has been seeded with enough data.
|
|
||||||
|
|
||||||
:return: 1 if the PRNG is seeded enough, 0 otherwise.
|
|
||||||
"""
|
|
||||||
return _lib.RAND_status()
|
|
@ -1,28 +0,0 @@
|
|||||||
# Copyright (C) AB Strakt
|
|
||||||
# Copyright (C) Jean-Paul Calderone
|
|
||||||
# See LICENSE for details.
|
|
||||||
|
|
||||||
"""
|
|
||||||
pyOpenSSL - A simple wrapper around the OpenSSL library
|
|
||||||
"""
|
|
||||||
|
|
||||||
__all__ = [
|
|
||||||
"__author__",
|
|
||||||
"__copyright__",
|
|
||||||
"__email__",
|
|
||||||
"__license__",
|
|
||||||
"__summary__",
|
|
||||||
"__title__",
|
|
||||||
"__uri__",
|
|
||||||
"__version__",
|
|
||||||
]
|
|
||||||
|
|
||||||
__version__ = "22.0.0"
|
|
||||||
|
|
||||||
__title__ = "pyOpenSSL"
|
|
||||||
__uri__ = "https://pyopenssl.org/"
|
|
||||||
__summary__ = "Python wrapper module around the OpenSSL library"
|
|
||||||
__author__ = "The pyOpenSSL developers"
|
|
||||||
__email__ = "cryptography-dev@python.org"
|
|
||||||
__license__ = "Apache License, Version 2.0"
|
|
||||||
__copyright__ = "Copyright 2001-2020 {0}".format(__author__)
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user