diff --git a/fastapi/Scripts/Activate.ps1 b/fastapi/Scripts/Activate.ps1 deleted file mode 100644 index f09f7b82ad..0000000000 --- a/fastapi/Scripts/Activate.ps1 +++ /dev/null @@ -1,398 +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 the _PYTHON_VENV_PROMPT_PREFIX altogether: - if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) { - Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force - } - - # Leave deactivate function in the global namespace if requested: - if (-not $NonDestructive) { - Remove-Item -Path function:deactivate - } -} - -<# -.Description -Get-PyVenvConfig parses the values from the pyvenv.cfg file located in the -given folder, and returns them in a map. - -For each line in the pyvenv.cfg file, if that line can be parsed into exactly -two strings separated by `=` (with any amount of whitespace surrounding the =) -then it is considered a `key = value` line. The left hand string is the key, -the right hand is the value. - -If the value starts with a `'` or a `"` then the first and last character is -stripped from the value before being captured. - -.Parameter ConfigDir -Path to the directory that contains the `pyvenv.cfg` file. -#> -function Get-PyVenvConfig( - [String] - $ConfigDir -) { - Write-Verbose "Given ConfigDir=$ConfigDir, obtain values in pyvenv.cfg" - - # Ensure the file exists, and issue a warning if it doesn't (but still allow the function to continue). - $pyvenvConfigPath = Join-Path -Resolve -Path $ConfigDir -ChildPath 'pyvenv.cfg' -ErrorAction Continue - - # An empty map will be returned if no config file is found. - $pyvenvConfig = @{ } - - if ($pyvenvConfigPath) { - - Write-Verbose "File exists, parse `key = value` lines" - $pyvenvConfigContent = Get-Content -Path $pyvenvConfigPath - - $pyvenvConfigContent | ForEach-Object { - $keyval = $PSItem -split "\s*=\s*", 2 - if ($keyval[0] -and $keyval[1]) { - $val = $keyval[1] - - # Remove extraneous quotations around a string value. - if ("'""".Contains($val.Substring(0, 1))) { - $val = $val.Substring(1, $val.Length - 2) - } - - $pyvenvConfig[$keyval[0]] = $val - Write-Verbose "Adding Key: '$($keyval[0])'='$val'" - } - } - } - return $pyvenvConfig -} - - -<# Begin Activate script --------------------------------------------------- #> - -# Determine the containing directory of this script -$VenvExecPath = Split-Path -Parent $MyInvocation.MyCommand.Definition -$VenvExecDir = Get-Item -Path $VenvExecPath - -Write-Verbose "Activation script is located in path: '$VenvExecPath'" -Write-Verbose "VenvExecDir Fullname: '$($VenvExecDir.FullName)" -Write-Verbose "VenvExecDir Name: '$($VenvExecDir.Name)" - -# Set values required in priority: CmdLine, ConfigFile, Default -# First, get the location of the virtual environment, it might not be -# VenvExecDir if specified on the command line. -if ($VenvDir) { - Write-Verbose "VenvDir given as parameter, using '$VenvDir' to determine values" -} -else { - Write-Verbose "VenvDir not given as a parameter, using parent directory name as VenvDir." - $VenvDir = $VenvExecDir.Parent.FullName.TrimEnd("\\/") - Write-Verbose "VenvDir=$VenvDir" -} - -# Next, read the `pyvenv.cfg` file to determine any required value such -# as `prompt`. -$pyvenvCfg = Get-PyVenvConfig -ConfigDir $VenvDir - -# Next, set the prompt from the command line, or the config file, or -# just use the name of the virtual environment folder. -if ($Prompt) { - Write-Verbose "Prompt specified as argument, using '$Prompt'" -} -else { - Write-Verbose "Prompt not specified as argument to script, checking pyvenv.cfg value" - if ($pyvenvCfg -and $pyvenvCfg['prompt']) { - Write-Verbose " Setting based on value in pyvenv.cfg='$($pyvenvCfg['prompt'])'" - $Prompt = $pyvenvCfg['prompt']; - } - else { - Write-Verbose " Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virutal environment)" - Write-Verbose " Got leaf-name of $VenvDir='$(Split-Path -Path $venvDir -Leaf)'" - $Prompt = Split-Path -Path $venvDir -Leaf - } -} - -Write-Verbose "Prompt = '$Prompt'" -Write-Verbose "VenvDir='$VenvDir'" - -# Deactivate any currently active virtual environment, but leave the -# deactivate function in place. -deactivate -nondestructive - -# Now set the environment variable VIRTUAL_ENV, used by many tools to determine -# that there is an activated venv. -$env:VIRTUAL_ENV = $VenvDir - -if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) { - - Write-Verbose "Setting prompt to '$Prompt'" - - # Set the prompt to include the env name - # Make sure _OLD_VIRTUAL_PROMPT is global - function global:_OLD_VIRTUAL_PROMPT { "" } - Copy-Item -Path function:prompt -Destination function:_OLD_VIRTUAL_PROMPT - New-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Description "Python virtual environment prompt prefix" -Scope Global -Option ReadOnly -Visibility Public -Value $Prompt - - function global:prompt { - Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) " - _OLD_VIRTUAL_PROMPT - } -} - -# Clear PYTHONHOME -if (Test-Path -Path Env:PYTHONHOME) { - Copy-Item -Path Env:PYTHONHOME -Destination Env:_OLD_VIRTUAL_PYTHONHOME - Remove-Item -Path Env:PYTHONHOME -} - -# Add the venv to the PATH -Copy-Item -Path Env:PATH -Destination Env:_OLD_VIRTUAL_PATH -$Env:PATH = "$VenvExecDir$([System.IO.Path]::PathSeparator)$Env:PATH" - -# SIG # Begin signature block -# MIIcwAYJKoZIhvcNAQcCoIIcsTCCHK0CAQExDzANBglghkgBZQMEAgEFADB5Bgor -# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG -# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAwnDYwEHaCQq0n -# 8NAvsN7H7BO7/48rXCNwrg891FS5vaCCC38wggUwMIIEGKADAgECAhAECRg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IE -# IF4QsNmEZSxyIoRHXsGFuji0l/UWCqW9PHVzCEWUlsAfMA0GCSqGSIb3DQEBAQUA -# BIIBAGLTB2GJcXOg7O2cTQmsIoasfSqq+sCpeV4z2od18Lx4IIdnj3R0gKY8UH2T -# 2j0JMcPogZDZxqxKY//0KP5AL1SzHwD5tN/61Fg/oVk6Yp7dw8HN1V5Kayg9IrXf -# xyfway7Zc6YAWWzRtf5vv7xpgRKGTUahGrYZwxJPnAyhW643vymwhkQ/cRodTJIz -# d3qdy4sTHORPKwPUzhxjhsGah6GBAe+Rho03JiRIvQsvUaF5igjA4fJ1QSFKZvqz -# rA0oiJNZckQHYEPxh1AQShen9Jhr7fd2j5bVVBpaWAALmRdr8Q12CiFlQyk4KKy7 -# AEIHi2Rbf06++s+R2qJ5Tzfggs4= -# SIG # End signature block diff --git a/fastapi/Scripts/activate b/fastapi/Scripts/activate deleted file mode 100644 index 27e7aeb605..0000000000 --- a/fastapi/Scripts/activate +++ /dev/null @@ -1,76 +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 - fi - - if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then - PS1="${_OLD_VIRTUAL_PS1:-}" - export PS1 - unset _OLD_VIRTUAL_PS1 - fi - - unset VIRTUAL_ENV - if [ ! "${1:-}" = "nondestructive" ] ; then - # Self destruct! - unset -f deactivate - fi -} - -# unset irrelevant variables -deactivate nondestructive - -VIRTUAL_ENV="C:\Users\Admin\Desktop\github\fastapi\fastapi" -export VIRTUAL_ENV - -_OLD_VIRTUAL_PATH="$PATH" -PATH="$VIRTUAL_ENV/Scripts:$PATH" -export PATH - -# unset PYTHONHOME if set -# this will fail if PYTHONHOME is set to the empty string (which is bad anyway) -# could use `if (set -u; : $PYTHONHOME) ;` in bash -if [ -n "${PYTHONHOME:-}" ] ; then - _OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}" - unset PYTHONHOME -fi - -if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then - _OLD_VIRTUAL_PS1="${PS1:-}" - if [ "x(fastapi) " != x ] ; then - PS1="(fastapi) ${PS1:-}" - else - if [ "`basename \"$VIRTUAL_ENV\"`" = "__" ] ; then - # special case for Aspen magic directories - # see https://aspen.io/ - PS1="[`basename \`dirname \"$VIRTUAL_ENV\"\``] $PS1" - else - PS1="(`basename \"$VIRTUAL_ENV\"`)$PS1" - fi - fi - export PS1 -fi - -# This should detect bash and zsh, which have a hash command that must -# be called to get it to forget past commands. Without forgetting -# past commands the $PATH changes we made may not be respected -if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then - hash -r -fi diff --git a/fastapi/Scripts/activate.bat b/fastapi/Scripts/activate.bat deleted file mode 100644 index 8cc11be5ab..0000000000 --- a/fastapi/Scripts/activate.bat +++ /dev/null @@ -1,33 +0,0 @@ -@echo off - -rem This file is UTF-8 encoded, so we need to update the current code page while executing it -for /f "tokens=2 delims=:." %%a in ('"%SystemRoot%\System32\chcp.com"') do ( - set _OLD_CODEPAGE=%%a -) -if defined _OLD_CODEPAGE ( - "%SystemRoot%\System32\chcp.com" 65001 > nul -) - -set VIRTUAL_ENV=C:\Users\Admin\Desktop\github\fastapi\fastapi - -if not defined PROMPT set PROMPT=$P$G - -if defined _OLD_VIRTUAL_PROMPT set PROMPT=%_OLD_VIRTUAL_PROMPT% -if defined _OLD_VIRTUAL_PYTHONHOME set PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME% - -set _OLD_VIRTUAL_PROMPT=%PROMPT% -set PROMPT=(fastapi) %PROMPT% - -if defined PYTHONHOME set _OLD_VIRTUAL_PYTHONHOME=%PYTHONHOME% -set PYTHONHOME= - -if defined _OLD_VIRTUAL_PATH set PATH=%_OLD_VIRTUAL_PATH% -if not defined _OLD_VIRTUAL_PATH set _OLD_VIRTUAL_PATH=%PATH% - -set PATH=%VIRTUAL_ENV%\Scripts;%PATH% - -:END -if defined _OLD_CODEPAGE ( - "%SystemRoot%\System32\chcp.com" %_OLD_CODEPAGE% > nul - set _OLD_CODEPAGE= -) diff --git a/fastapi/Scripts/black.exe b/fastapi/Scripts/black.exe deleted file mode 100644 index 46f03f38c6..0000000000 Binary files a/fastapi/Scripts/black.exe and /dev/null differ diff --git a/fastapi/Scripts/blackd.exe b/fastapi/Scripts/blackd.exe deleted file mode 100644 index 58524288fd..0000000000 Binary files a/fastapi/Scripts/blackd.exe and /dev/null differ diff --git a/fastapi/Scripts/cairosvg.exe b/fastapi/Scripts/cairosvg.exe deleted file mode 100644 index bb331ab914..0000000000 Binary files a/fastapi/Scripts/cairosvg.exe and /dev/null differ diff --git a/fastapi/Scripts/cmark.exe b/fastapi/Scripts/cmark.exe deleted file mode 100644 index cdaae145d6..0000000000 Binary files a/fastapi/Scripts/cmark.exe and /dev/null differ diff --git a/fastapi/Scripts/coverage-3.8.exe b/fastapi/Scripts/coverage-3.8.exe deleted file mode 100644 index 6dfcd290bd..0000000000 Binary files a/fastapi/Scripts/coverage-3.8.exe and /dev/null differ diff --git a/fastapi/Scripts/coverage.exe b/fastapi/Scripts/coverage.exe deleted file mode 100644 index 6dfcd290bd..0000000000 Binary files a/fastapi/Scripts/coverage.exe and /dev/null differ diff --git a/fastapi/Scripts/coverage3.exe b/fastapi/Scripts/coverage3.exe deleted file mode 100644 index 6dfcd290bd..0000000000 Binary files a/fastapi/Scripts/coverage3.exe and /dev/null differ diff --git a/fastapi/Scripts/deactivate.bat b/fastapi/Scripts/deactivate.bat deleted file mode 100644 index 1205c61868..0000000000 --- a/fastapi/Scripts/deactivate.bat +++ /dev/null @@ -1,21 +0,0 @@ -@echo off - -if defined _OLD_VIRTUAL_PROMPT ( - set "PROMPT=%_OLD_VIRTUAL_PROMPT%" -) -set _OLD_VIRTUAL_PROMPT= - -if defined _OLD_VIRTUAL_PYTHONHOME ( - set "PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME%" - set _OLD_VIRTUAL_PYTHONHOME= -) - -if defined _OLD_VIRTUAL_PATH ( - set "PATH=%_OLD_VIRTUAL_PATH%" -) - -set _OLD_VIRTUAL_PATH= - -set VIRTUAL_ENV= - -:END diff --git a/fastapi/Scripts/dmypy.exe b/fastapi/Scripts/dmypy.exe deleted file mode 100644 index 8edc486f8c..0000000000 Binary files a/fastapi/Scripts/dmypy.exe and /dev/null differ diff --git a/fastapi/Scripts/dotenv.exe b/fastapi/Scripts/dotenv.exe deleted file mode 100644 index 002f1b0426..0000000000 Binary files a/fastapi/Scripts/dotenv.exe and /dev/null differ diff --git a/fastapi/Scripts/email_validator.exe b/fastapi/Scripts/email_validator.exe deleted file mode 100644 index 5c35252ff7..0000000000 Binary files a/fastapi/Scripts/email_validator.exe and /dev/null differ diff --git a/fastapi/Scripts/flask.exe b/fastapi/Scripts/flask.exe deleted file mode 100644 index 6dc5de0a74..0000000000 Binary files a/fastapi/Scripts/flask.exe and /dev/null differ diff --git a/fastapi/Scripts/ghp-import.exe b/fastapi/Scripts/ghp-import.exe deleted file mode 100644 index 7ed92cff58..0000000000 Binary files a/fastapi/Scripts/ghp-import.exe and /dev/null differ diff --git a/fastapi/Scripts/httpx.exe b/fastapi/Scripts/httpx.exe deleted file mode 100644 index c75369895d..0000000000 Binary files a/fastapi/Scripts/httpx.exe and /dev/null differ diff --git a/fastapi/Scripts/identify-cli.exe b/fastapi/Scripts/identify-cli.exe deleted file mode 100644 index 784eb4a101..0000000000 Binary files a/fastapi/Scripts/identify-cli.exe and /dev/null differ diff --git a/fastapi/Scripts/markdown_py.exe b/fastapi/Scripts/markdown_py.exe deleted file mode 100644 index ec39ddd37f..0000000000 Binary files a/fastapi/Scripts/markdown_py.exe and /dev/null differ diff --git a/fastapi/Scripts/mkdocs.exe b/fastapi/Scripts/mkdocs.exe deleted file mode 100644 index 3faef54f19..0000000000 Binary files a/fastapi/Scripts/mkdocs.exe and /dev/null differ diff --git a/fastapi/Scripts/mypy.exe b/fastapi/Scripts/mypy.exe deleted file mode 100644 index 31d092b3f3..0000000000 Binary files a/fastapi/Scripts/mypy.exe and /dev/null differ diff --git a/fastapi/Scripts/mypyc.exe b/fastapi/Scripts/mypyc.exe deleted file mode 100644 index b6e97ce392..0000000000 Binary files a/fastapi/Scripts/mypyc.exe and /dev/null differ diff --git a/fastapi/Scripts/nodeenv.exe b/fastapi/Scripts/nodeenv.exe deleted file mode 100644 index 656c6c7b95..0000000000 Binary files a/fastapi/Scripts/nodeenv.exe and /dev/null differ diff --git a/fastapi/Scripts/normalizer.exe b/fastapi/Scripts/normalizer.exe deleted file mode 100644 index ff0b9dc54f..0000000000 Binary files a/fastapi/Scripts/normalizer.exe and /dev/null differ diff --git a/fastapi/Scripts/pip.exe b/fastapi/Scripts/pip.exe deleted file mode 100644 index 79ebecae62..0000000000 Binary files a/fastapi/Scripts/pip.exe and /dev/null differ diff --git a/fastapi/Scripts/pip3.10.exe b/fastapi/Scripts/pip3.10.exe deleted file mode 100644 index 79ebecae62..0000000000 Binary files a/fastapi/Scripts/pip3.10.exe and /dev/null differ diff --git a/fastapi/Scripts/pip3.8.exe b/fastapi/Scripts/pip3.8.exe deleted file mode 100644 index 79ebecae62..0000000000 Binary files a/fastapi/Scripts/pip3.8.exe and /dev/null differ diff --git a/fastapi/Scripts/pip3.exe b/fastapi/Scripts/pip3.exe deleted file mode 100644 index 79ebecae62..0000000000 Binary files a/fastapi/Scripts/pip3.exe and /dev/null differ diff --git a/fastapi/Scripts/pre-commit.exe b/fastapi/Scripts/pre-commit.exe deleted file mode 100644 index 348ce60ec5..0000000000 Binary files a/fastapi/Scripts/pre-commit.exe and /dev/null differ diff --git a/fastapi/Scripts/pwiz.py b/fastapi/Scripts/pwiz.py deleted file mode 100644 index bca29c4c5d..0000000000 --- a/fastapi/Scripts/pwiz.py +++ /dev/null @@ -1,291 +0,0 @@ -#!c:\users\admin\desktop\github\fastapi\fastapi\scripts\python.exe - -import datetime -import os -import sys -from getpass import getpass -from optparse import OptionParser - -from peewee import * -from peewee import __version__ as peewee_version -from peewee import print_ -from playhouse.cockroachdb import CockroachDatabase -from playhouse.reflection import * - -HEADER = """from peewee import *%s - -database = %s('%s'%s) -""" - -BASE_MODEL = """\ -class BaseModel(Model): - class Meta: - database = database -""" - -UNKNOWN_FIELD = """\ -class UnknownField(object): - def __init__(self, *_, **__): pass -""" - -DATABASE_ALIASES = { - CockroachDatabase: ["cockroach", "cockroachdb", "crdb"], - MySQLDatabase: ["mysql", "mysqldb"], - PostgresqlDatabase: ["postgres", "postgresql"], - SqliteDatabase: ["sqlite", "sqlite3"], -} - -DATABASE_MAP = { - value: key for key in DATABASE_ALIASES for value in DATABASE_ALIASES[key] -} - - -def make_introspector(database_type, database_name, **kwargs): - if database_type not in DATABASE_MAP: - err( - "Unrecognized database, must be one of: %s" % ", ".join(DATABASE_MAP.keys()) - ) - sys.exit(1) - - schema = kwargs.pop("schema", None) - DatabaseClass = DATABASE_MAP[database_type] - db = DatabaseClass(database_name, **kwargs) - return Introspector.from_database(db, schema=schema) - - -def print_models( - introspector, - tables=None, - preserve_order=False, - include_views=False, - ignore_unknown=False, - snake_case=True, -): - database = introspector.introspect( - table_names=tables, include_views=include_views, snake_case=snake_case - ) - - db_kwargs = introspector.get_database_kwargs() - header = HEADER % ( - introspector.get_additional_imports(), - introspector.get_database_class().__name__, - introspector.get_database_name(), - ", **%s" % repr(db_kwargs) if db_kwargs else "", - ) - print_(header) - - if not ignore_unknown: - print_(UNKNOWN_FIELD) - - print_(BASE_MODEL) - - def _print_table(table, seen, accum=None): - accum = accum or [] - foreign_keys = database.foreign_keys[table] - for foreign_key in foreign_keys: - dest = foreign_key.dest_table - - # In the event the destination table has already been pushed - # for printing, then we have a reference cycle. - if dest in accum and table not in accum: - print_("# Possible reference cycle: %s" % dest) - - # If this is not a self-referential foreign key, and we have - # not already processed the destination table, do so now. - if dest not in seen and dest not in accum: - seen.add(dest) - if dest != table: - _print_table(dest, seen, accum + [table]) - - print_("class %s(BaseModel):" % database.model_names[table]) - columns = database.columns[table].items() - if not preserve_order: - columns = sorted(columns) - primary_keys = database.primary_keys[table] - for name, column in columns: - skip = all( - [ - name in primary_keys, - name == "id", - len(primary_keys) == 1, - column.field_class in introspector.pk_classes, - ] - ) - if skip: - continue - if column.primary_key and len(primary_keys) > 1: - # If we have a CompositeKey, then we do not want to explicitly - # mark the columns as being primary keys. - column.primary_key = False - - is_unknown = column.field_class is UnknownField - if is_unknown and ignore_unknown: - disp = "%s - %s" % (column.name, column.raw_column_type or "?") - print_(" # %s" % disp) - else: - print_(" %s" % column.get_field()) - - print_("") - print_(" class Meta:") - print_(" table_name = '%s'" % table) - multi_column_indexes = database.multi_column_indexes(table) - if multi_column_indexes: - print_(" indexes = (") - for fields, unique in sorted(multi_column_indexes): - print_( - " ((%s), %s)," - % ( - ", ".join("'%s'" % field for field in fields), - unique, - ) - ) - print_(" )") - - if introspector.schema: - print_(" schema = '%s'" % introspector.schema) - if len(primary_keys) > 1: - pk_field_names = sorted( - [field.name for col, field in columns if col in primary_keys] - ) - pk_list = ", ".join("'%s'" % pk for pk in pk_field_names) - print_(" primary_key = CompositeKey(%s)" % pk_list) - elif not primary_keys: - print_(" primary_key = False") - print_("") - - seen.add(table) - - seen = set() - for table in sorted(database.model_names.keys()): - if table not in seen: - if not tables or table in tables: - _print_table(table, seen) - - -def print_header(cmd_line, introspector): - timestamp = datetime.datetime.now() - print_("# Code generated by:") - print_("# python -m pwiz %s" % cmd_line) - print_("# Date: %s" % timestamp.strftime("%B %d, %Y %I:%M%p")) - print_("# Database: %s" % introspector.get_database_name()) - print_("# Peewee version: %s" % peewee_version) - print_("") - - -def err(msg): - sys.stderr.write("\033[91m%s\033[0m\n" % msg) - sys.stderr.flush() - - -def get_option_parser(): - parser = OptionParser(usage="usage: %prog [options] database_name") - ao = parser.add_option - ao("-H", "--host", dest="host") - ao("-p", "--port", dest="port", type="int") - ao("-u", "--user", dest="user") - ao("-P", "--password", dest="password", action="store_true") - engines = sorted(DATABASE_MAP) - ao( - "-e", - "--engine", - dest="engine", - choices=engines, - help=( - "Database type, e.g. sqlite, mysql, postgresql or cockroachdb. " - 'Default is "postgresql".' - ), - ) - ao("-s", "--schema", dest="schema") - ao( - "-t", - "--tables", - dest="tables", - help=( - "Only generate the specified tables. Multiple table names should " - "be separated by commas." - ), - ) - ao( - "-v", - "--views", - dest="views", - action="store_true", - help="Generate model classes for VIEWs in addition to tables.", - ) - ao( - "-i", - "--info", - dest="info", - action="store_true", - help=( - "Add database information and other metadata to top of the " - "generated file." - ), - ) - ao( - "-o", - "--preserve-order", - action="store_true", - dest="preserve_order", - help="Model definition column ordering matches source table.", - ) - ao( - "-I", - "--ignore-unknown", - action="store_true", - dest="ignore_unknown", - help="Ignore fields whose type cannot be determined.", - ) - ao( - "-L", - "--legacy-naming", - action="store_true", - dest="legacy_naming", - help="Use legacy table- and column-name generation.", - ) - return parser - - -def get_connect_kwargs(options): - ops = ("host", "port", "user", "schema") - kwargs = {o: getattr(options, o) for o in ops if getattr(options, o)} - if options.password: - kwargs["password"] = getpass() - return kwargs - - -if __name__ == "__main__": - raw_argv = sys.argv - - parser = get_option_parser() - options, args = parser.parse_args() - - if len(args) < 1: - err('Missing required parameter "database"') - parser.print_help() - sys.exit(1) - - connect = get_connect_kwargs(options) - database = args[-1] - - tables = None - if options.tables: - tables = [table.strip() for table in options.tables.split(",") if table.strip()] - - engine = options.engine - if engine is None: - engine = "sqlite" if os.path.exists(database) else "postgresql" - - introspector = make_introspector(engine, database, **connect) - if options.info: - cmd_line = " ".join(raw_argv[1:]) - print_header(cmd_line, introspector) - - print_models( - introspector, - tables, - options.preserve_order, - options.views, - options.ignore_unknown, - not options.legacy_naming, - ) diff --git a/fastapi/Scripts/py.test.exe b/fastapi/Scripts/py.test.exe deleted file mode 100644 index 39904e70ab..0000000000 Binary files a/fastapi/Scripts/py.test.exe and /dev/null differ diff --git a/fastapi/Scripts/pygmentize.exe b/fastapi/Scripts/pygmentize.exe deleted file mode 100644 index 1679edab79..0000000000 Binary files a/fastapi/Scripts/pygmentize.exe and /dev/null differ diff --git a/fastapi/Scripts/pyrsa-decrypt.exe b/fastapi/Scripts/pyrsa-decrypt.exe deleted file mode 100644 index f50f2c4a39..0000000000 Binary files a/fastapi/Scripts/pyrsa-decrypt.exe and /dev/null differ diff --git a/fastapi/Scripts/pyrsa-encrypt.exe b/fastapi/Scripts/pyrsa-encrypt.exe deleted file mode 100644 index 15b458e630..0000000000 Binary files a/fastapi/Scripts/pyrsa-encrypt.exe and /dev/null differ diff --git a/fastapi/Scripts/pyrsa-keygen.exe b/fastapi/Scripts/pyrsa-keygen.exe deleted file mode 100644 index 8945255e19..0000000000 Binary files a/fastapi/Scripts/pyrsa-keygen.exe and /dev/null differ diff --git a/fastapi/Scripts/pyrsa-priv2pub.exe b/fastapi/Scripts/pyrsa-priv2pub.exe deleted file mode 100644 index 43225a94b6..0000000000 Binary files a/fastapi/Scripts/pyrsa-priv2pub.exe and /dev/null differ diff --git a/fastapi/Scripts/pyrsa-sign.exe b/fastapi/Scripts/pyrsa-sign.exe deleted file mode 100644 index f1135d7f92..0000000000 Binary files a/fastapi/Scripts/pyrsa-sign.exe and /dev/null differ diff --git a/fastapi/Scripts/pyrsa-verify.exe b/fastapi/Scripts/pyrsa-verify.exe deleted file mode 100644 index 7ea5337ab7..0000000000 Binary files a/fastapi/Scripts/pyrsa-verify.exe and /dev/null differ diff --git a/fastapi/Scripts/pytest.exe b/fastapi/Scripts/pytest.exe deleted file mode 100644 index 39904e70ab..0000000000 Binary files a/fastapi/Scripts/pytest.exe and /dev/null differ diff --git a/fastapi/Scripts/python.exe b/fastapi/Scripts/python.exe deleted file mode 100644 index 7dad4f87ad..0000000000 Binary files a/fastapi/Scripts/python.exe and /dev/null differ diff --git a/fastapi/Scripts/pythonw.exe b/fastapi/Scripts/pythonw.exe deleted file mode 100644 index df52032720..0000000000 Binary files a/fastapi/Scripts/pythonw.exe and /dev/null differ diff --git a/fastapi/Scripts/ruff.exe b/fastapi/Scripts/ruff.exe deleted file mode 100644 index b4cca8db79..0000000000 Binary files a/fastapi/Scripts/ruff.exe and /dev/null differ diff --git a/fastapi/Scripts/stubgen.exe b/fastapi/Scripts/stubgen.exe deleted file mode 100644 index 98c9f21201..0000000000 Binary files a/fastapi/Scripts/stubgen.exe and /dev/null differ diff --git a/fastapi/Scripts/stubtest.exe b/fastapi/Scripts/stubtest.exe deleted file mode 100644 index c197a062df..0000000000 Binary files a/fastapi/Scripts/stubtest.exe and /dev/null differ diff --git a/fastapi/Scripts/typer.exe b/fastapi/Scripts/typer.exe deleted file mode 100644 index cb96478b7d..0000000000 Binary files a/fastapi/Scripts/typer.exe and /dev/null differ diff --git a/fastapi/Scripts/uvicorn.exe b/fastapi/Scripts/uvicorn.exe deleted file mode 100644 index e81116d2db..0000000000 Binary files a/fastapi/Scripts/uvicorn.exe and /dev/null differ diff --git a/fastapi/Scripts/virtualenv.exe b/fastapi/Scripts/virtualenv.exe deleted file mode 100644 index 8f0007ceb2..0000000000 Binary files a/fastapi/Scripts/virtualenv.exe and /dev/null differ diff --git a/fastapi/Scripts/watchfiles.exe b/fastapi/Scripts/watchfiles.exe deleted file mode 100644 index c29dc12918..0000000000 Binary files a/fastapi/Scripts/watchfiles.exe and /dev/null differ diff --git a/fastapi/Scripts/watchmedo.exe b/fastapi/Scripts/watchmedo.exe deleted file mode 100644 index 1c13d613e6..0000000000 Binary files a/fastapi/Scripts/watchmedo.exe and /dev/null differ