Text Generation
sentence-transformers
English
rag
retrieval-augmented-generation
vehicle-recalls
nhtsa
flan-t5
embeddings
Instructions to use aowens25/vehicle-recall-rag with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use aowens25/vehicle-recall-rag with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("aowens25/vehicle-recall-rag") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- .DS_StoreAdded
- .gitattributes+71
- .venv/.DS_StoreAdded
- .venv/.gitignoreAdded+1
- .venv/bin/Activate.ps1Added+247
- .venv/bin/activateAdded+69
- .venv/bin/activate.cshAdded+26
- .venv/bin/activate.fishAdded+66
- .venv/bin/f2pyAdded+7
- .venv/bin/hfAdded+7
- .venv/bin/huggingface-cliAdded+7
- .venv/bin/normalizerAdded+7
- .venv/bin/numpy-configAdded+7
- .venv/bin/pipAdded+8
- .venv/bin/pip3Added+8
- .venv/bin/pip3.10Added+8
- .venv/bin/pythonAdded+3
- .venv/bin/python3Added+3
- .venv/bin/python3.10Added+3
- .venv/bin/tiny-agentsAdded+7
- .venv/bin/tqdmAdded+7
- .venv/bin/transformersAdded+7
- .venv/bin/transformers-cliAdded+7
- .venv/lib/.DS_StoreAdded
- .venv/lib/python3.10/.DS_StoreAdded
- .venv/lib/python3.10/site-packages/.DS_StoreAdded
- .venv/lib/python3.10/site-packages/__pycache__/typing_extensions.cpython-310.pycAdded+3
- .venv/lib/python3.10/site-packages/_distutils_hack/__init__.pyAdded+128
- .venv/lib/python3.10/site-packages/_distutils_hack/__pycache__/__init__.cpython-310.pycAdded
- .venv/lib/python3.10/site-packages/_distutils_hack/__pycache__/override.cpython-310.pycAdded
- .venv/lib/python3.10/site-packages/_distutils_hack/override.pyAdded+1
- .venv/lib/python3.10/site-packages/_yaml/__init__.pyAdded+33
- .venv/lib/python3.10/site-packages/_yaml/__pycache__/__init__.cpython-310.pycAdded
- .venv/lib/python3.10/site-packages/certifi-2025.11.12.dist-info/INSTALLERAdded+1
- .venv/lib/python3.10/site-packages/certifi-2025.11.12.dist-info/METADATAAdded+78
- .venv/lib/python3.10/site-packages/certifi-2025.11.12.dist-info/RECORDAdded+14
- .venv/lib/python3.10/site-packages/certifi-2025.11.12.dist-info/WHEELAdded+5
- .venv/lib/python3.10/site-packages/certifi-2025.11.12.dist-info/licenses/LICENSEAdded+20
- .venv/lib/python3.10/site-packages/certifi-2025.11.12.dist-info/top_level.txtAdded+1
- .venv/lib/python3.10/site-packages/certifi/__init__.pyAdded+4
- .venv/lib/python3.10/site-packages/certifi/__main__.pyAdded+12
- .venv/lib/python3.10/site-packages/certifi/__pycache__/__init__.cpython-310.pycAdded
- .venv/lib/python3.10/site-packages/certifi/__pycache__/__main__.cpython-310.pycAdded
- .venv/lib/python3.10/site-packages/certifi/__pycache__/core.cpython-310.pycAdded
- .venv/lib/python3.10/site-packages/certifi/cacert.pemAdded
- .venv/lib/python3.10/site-packages/certifi/core.pyAdded+83
- .venv/lib/python3.10/site-packages/certifi/py.typedAdded
- .venv/lib/python3.10/site-packages/charset_normalizer-3.4.4.dist-info/INSTALLERAdded+1
- .venv/lib/python3.10/site-packages/charset_normalizer-3.4.4.dist-info/METADATAAdded+764
- .venv/lib/python3.10/site-packages/charset_normalizer-3.4.4.dist-info/RECORDAdded+35
32 unmodified lines33343532 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text32 unmodified lines3334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510632 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text.venv/bin/python filter=lfs diff=lfs merge=lfs -text.venv/bin/python3 filter=lfs diff=lfs merge=lfs -text.venv/bin/python3.10 filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/__pycache__/typing_extensions.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/charset_normalizer/md__mypyc.cpython-310-darwin.so filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/hf_xet/hf_xet.abi3.so filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/huggingface_hub/__pycache__/hf_api.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/huggingface_hub/inference/__pycache__/_client.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/huggingface_hub/inference/_generated/__pycache__/_async_client.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/idna/__pycache__/idnadata.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/idna/__pycache__/uts46data.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/numpy/_core/__pycache__/_add_newdocs.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/numpy/_core/__pycache__/fromnumeric.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/numpy/_core/_multiarray_tests.cpython-310-darwin.so filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/numpy/_core/_multiarray_umath.cpython-310-darwin.so filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/numpy/_core/_simd.cpython-310-darwin.so filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/numpy/_core/tests/__pycache__/test_multiarray.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/numpy/_core/tests/__pycache__/test_numeric.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/numpy/_core/tests/__pycache__/test_regression.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/numpy/_core/tests/__pycache__/test_ufunc.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/numpy/_core/tests/__pycache__/test_umath.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/numpy/fft/_pocketfft_umath.cpython-310-darwin.so filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/numpy/lib/__pycache__/_function_base_impl.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/numpy/lib/tests/__pycache__/test_function_base.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/numpy/linalg/__pycache__/_linalg.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/numpy/linalg/_umath_linalg.cpython-310-darwin.so filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/numpy/ma/__pycache__/core.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/numpy/ma/tests/__pycache__/test_core.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/numpy/random/_bounded_integers.cpython-310-darwin.so filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/numpy/random/_common.cpython-310-darwin.so filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/numpy/random/_generator.cpython-310-darwin.so filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/numpy/random/_mt19937.cpython-310-darwin.so filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/numpy/random/_pcg64.cpython-310-darwin.so filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/numpy/random/_philox.cpython-310-darwin.so filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/numpy/random/bit_generator.cpython-310-darwin.so filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/numpy/random/mtrand.cpython-310-darwin.so filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/pip/_vendor/distlib/t64-arm.exe filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/pip/_vendor/distlib/t64.exe filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/pip/_vendor/distlib/w64-arm.exe filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/pip/_vendor/distlib/w64.exe filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/pip/_vendor/idna/__pycache__/idnadata.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/pip/_vendor/idna/__pycache__/uts46data.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/pip/_vendor/pkg_resources/__pycache__/__init__.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/pip/_vendor/rich/__pycache__/_emoji_codes.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/pkg_resources/__pycache__/__init__.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/pkg_resources/_vendor/__pycache__/pyparsing.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/regex/__pycache__/_regex_core.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/regex/_regex.cpython-310-darwin.so filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/regex/tests/__pycache__/test_regex.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/safetensors/_safetensors_rust.abi3.so filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/setuptools/_vendor/__pycache__/pyparsing.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/setuptools/_vendor/more_itertools/__pycache__/more.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/tokenizers/tokenizers.abi3.so filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/transformers/__pycache__/modeling_outputs.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/transformers/__pycache__/modeling_tf_utils.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/transformers/__pycache__/modeling_utils.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/transformers/__pycache__/testing_utils.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/transformers/__pycache__/tokenization_utils_base.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/transformers/__pycache__/trainer.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/transformers/__pycache__/training_args.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/transformers/generation/__pycache__/logits_process.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/transformers/generation/__pycache__/tf_utils.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/transformers/generation/__pycache__/utils.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/transformers/models/oneformer/__pycache__/modeling_oneformer.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/transformers/models/qwen2_5_omni/__pycache__/modeling_qwen2_5_omni.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/transformers/models/qwen2_5_omni/__pycache__/modular_qwen2_5_omni.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/transformers/models/qwen3_omni_moe/__pycache__/modeling_qwen3_omni_moe.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/transformers/models/seamless_m4t/__pycache__/modeling_seamless_m4t.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/transformers/models/seamless_m4t_v2/__pycache__/modeling_seamless_m4t_v2.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/transformers/models/speecht5/__pycache__/modeling_speecht5.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.10/site-packages/yaml/_yaml.cpython-310-darwin.so filter=lfs diff=lfs merge=lfs -text
1*123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247<#
.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 virtual 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"123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869# 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 variablesdeactivate nondestructive
VIRTUAL_ENV="/Users/alexanderowens/Documents/huggingface/.venv"export VIRTUAL_ENV
_OLD_VIRTUAL_PATH="$PATH"PATH="$VIRTUAL_ENV/bin:$PATH"export PATH
# unset PYTHONHOME if set# this will fail if PYTHONHOME is set to the empty string (which is bad anyway)# could use `if (set -u; : $PYTHONHOME) ;` in bashif [ -n "${PYTHONHOME:-}" ] ; then _OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}" unset PYTHONHOMEfi
if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then _OLD_VIRTUAL_PS1="${PS1:-}" PS1="(.venv) ${PS1:-}" export PS1 VIRTUAL_ENV_PROMPT="(.venv) " export VIRTUAL_ENV_PROMPTfi
# 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 respectedif [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then hash -r 2> /dev/nullfi1234567891011121314151617181920212223242526# 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 "/Users/alexanderowens/Documents/huggingface/.venv"
set _OLD_VIRTUAL_PATH="$PATH"setenv PATH "$VIRTUAL_ENV/bin:$PATH"
set _OLD_VIRTUAL_PROMPT="$prompt"
if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then set prompt = "(.venv) $prompt" setenv VIRTUAL_ENV_PROMPT "(.venv) "endif
alias pydoc python -m pydoc
rehash123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566# 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 endend
# Unset irrelevant variables.deactivate nondestructive
set -gx VIRTUAL_ENV "/Users/alexanderowens/Documents/huggingface/.venv"
set -gx _OLD_VIRTUAL_PATH $PATHset -gx PATH "$VIRTUAL_ENV/bin" $PATH
# Unset PYTHONHOME if set.if set -q PYTHONHOME set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME set -e PYTHONHOMEend
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) "(.venv) " (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 "(.venv) "end1234567#!/Users/alexanderowens/Documents/huggingface/.venv/bin/pythonimport sysfrom numpy.f2py.f2py2e import mainif __name__ == '__main__': if sys.argv[0].endswith('.exe'): sys.argv[0] = sys.argv[0][:-4] sys.exit(main())1234567#!/Users/alexanderowens/Documents/huggingface/.venv/bin/pythonimport sysfrom huggingface_hub.cli.hf import mainif __name__ == '__main__': if sys.argv[0].endswith('.exe'): sys.argv[0] = sys.argv[0][:-4] sys.exit(main())1234567#!/Users/alexanderowens/Documents/huggingface/.venv/bin/pythonimport sysfrom huggingface_hub.commands.huggingface_cli import mainif __name__ == '__main__': if sys.argv[0].endswith('.exe'): sys.argv[0] = sys.argv[0][:-4] sys.exit(main())1234567#!/Users/alexanderowens/Documents/huggingface/.venv/bin/pythonimport sysfrom charset_normalizer.cli import cli_detectif __name__ == '__main__': if sys.argv[0].endswith('.exe'): sys.argv[0] = sys.argv[0][:-4] sys.exit(cli_detect())1234567#!/Users/alexanderowens/Documents/huggingface/.venv/bin/pythonimport sysfrom numpy._configtool import mainif __name__ == '__main__': if sys.argv[0].endswith('.exe'): sys.argv[0] = sys.argv[0][:-4] sys.exit(main())12345678#!/Users/alexanderowens/Documents/huggingface/.venv/bin/python# -*- coding: utf-8 -*-import reimport sysfrom pip._internal.cli.main import mainif __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) sys.exit(main())12345678#!/Users/alexanderowens/Documents/huggingface/.venv/bin/python# -*- coding: utf-8 -*-import reimport sysfrom pip._internal.cli.main import mainif __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) sys.exit(main())12345678#!/Users/alexanderowens/Documents/huggingface/.venv/bin/python# -*- coding: utf-8 -*-import reimport sysfrom pip._internal.cli.main import mainif __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) sys.exit(main())123version https://git-lfs.github.com/spec/v1oid sha256:70a7b7dea6a2cca966ea664cd0088fbaaf146dceb243ba054b6938d747809fb3size 152624123version https://git-lfs.github.com/spec/v1oid sha256:70a7b7dea6a2cca966ea664cd0088fbaaf146dceb243ba054b6938d747809fb3size 152624123version https://git-lfs.github.com/spec/v1oid sha256:70a7b7dea6a2cca966ea664cd0088fbaaf146dceb243ba054b6938d747809fb3size 1526241234567#!/Users/alexanderowens/Documents/huggingface/.venv/bin/pythonimport sysfrom huggingface_hub.inference._mcp.cli import appif __name__ == '__main__': if sys.argv[0].endswith('.exe'): sys.argv[0] = sys.argv[0][:-4] sys.exit(app())1234567#!/Users/alexanderowens/Documents/huggingface/.venv/bin/pythonimport sysfrom tqdm.cli import mainif __name__ == '__main__': if sys.argv[0].endswith('.exe'): sys.argv[0] = sys.argv[0][:-4] sys.exit(main())1234567#!/Users/alexanderowens/Documents/huggingface/.venv/bin/pythonimport sysfrom transformers.commands.transformers_cli import mainif __name__ == '__main__': if sys.argv[0].endswith('.exe'): sys.argv[0] = sys.argv[0][:-4] sys.exit(main())1234567#!/Users/alexanderowens/Documents/huggingface/.venv/bin/pythonimport sysfrom transformers.commands.transformers_cli import main_cliif __name__ == '__main__': if sys.argv[0].endswith('.exe'): sys.argv[0] = sys.argv[0][:-4] sys.exit(main_cli())123version https://git-lfs.github.com/spec/v1oid sha256:aceb7920599f59c20f33ded89acb78f2788b35697da9b839ed36e20c48d66431size 115659123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128import sysimport osimport reimport importlibimport warnings
is_pypy = '__pypy__' in sys.builtin_module_names
warnings.filterwarnings('ignore', r'.+ distutils\b.+ deprecated', DeprecationWarning)
def warn_distutils_present(): if 'distutils' not in sys.modules: return if is_pypy and sys.version_info < (3, 7): # PyPy for 3.6 unconditionally imports distutils, so bypass the warning # https://foss.heptapod.net/pypy/pypy/-/blob/be829135bc0d758997b3566062999ee8b23872b4/lib-python/3/site.py#L250 return warnings.warn( "Distutils was imported before Setuptools, but importing Setuptools " "also replaces the `distutils` module in `sys.modules`. This may lead " "to undesirable behaviors or errors. To avoid these issues, avoid " "using distutils directly, ensure that setuptools is installed in the " "traditional way (e.g. not an editable install), and/or make sure " "that setuptools is always imported before distutils.")
def clear_distutils(): if 'distutils' not in sys.modules: return warnings.warn("Setuptools is replacing distutils.") mods = [name for name in sys.modules if re.match(r'distutils\b', name)] for name in mods: del sys.modules[name]
def enabled(): """ Allow selection of distutils by environment variable. """ which = os.environ.get('SETUPTOOLS_USE_DISTUTILS', 'stdlib') return which == 'local'
def ensure_local_distutils(): clear_distutils() distutils = importlib.import_module('setuptools._distutils') distutils.__name__ = 'distutils' sys.modules['distutils'] = distutils
# sanity check that submodules load as expected core = importlib.import_module('distutils.core') assert '_distutils' in core.__file__, core.__file__
def do_override(): """ Ensure that the local copy of distutils is preferred over stdlib.
See https://github.com/pypa/setuptools/issues/417#issuecomment-392298401 for more motivation. """ if enabled(): warn_distutils_present() ensure_local_distutils()
class DistutilsMetaFinder: def find_spec(self, fullname, path, target=None): if path is not None: return
method_name = 'spec_for_{fullname}'.format(**locals()) method = getattr(self, method_name, lambda: None) return method()
def spec_for_distutils(self): import importlib.abc import importlib.util
class DistutilsLoader(importlib.abc.Loader):
def create_module(self, spec): return importlib.import_module('setuptools._distutils')
def exec_module(self, module): pass
return importlib.util.spec_from_loader('distutils', DistutilsLoader())
def spec_for_pip(self): """ Ensure stdlib distutils when running under pip. See pypa/pip#8761 for rationale. """ if self.pip_imported_during_build(): return clear_distutils() self.spec_for_distutils = lambda: None
@staticmethod def pip_imported_during_build(): """ Detect if pip is being imported in a build script. Ref #2355. """ import traceback return any( frame.f_globals['__file__'].endswith('setup.py') for frame, line in traceback.walk_stack(None) )
DISTUTILS_FINDER = DistutilsMetaFinder()
def add_shim(): sys.meta_path.insert(0, DISTUTILS_FINDER)
def remove_shim(): try: sys.meta_path.remove(DISTUTILS_FINDER) except ValueError: pass1__import__('_distutils_hack').do_override()123456789101112131415161718192021222324252627282930313233# This is a stub package designed to roughly emulate the _yaml# extension module, which previously existed as a standalone module# and has been moved into the `yaml` package namespace.# It does not perfectly mimic its old counterpart, but should get# close enough for anyone who's relying on it even when they shouldn't.import yaml
# in some circumstances, the yaml module we imoprted may be from a different version, so we need# to tread carefully when poking at it here (it may not have the attributes we expect)if not getattr(yaml, '__with_libyaml__', False): from sys import version_info
exc = ModuleNotFoundError if version_info >= (3, 6) else ImportError raise exc("No module named '_yaml'")else: from yaml._yaml import * import warnings warnings.warn( 'The _yaml extension module is now located at yaml._yaml' ' and its location is subject to change. To use the' ' LibYAML-based parser and emitter, import from `yaml`:' ' `from yaml import CLoader as Loader, CDumper as Dumper`.', DeprecationWarning ) del warnings # Don't `del yaml` here because yaml is actually an existing # namespace member of _yaml.
__name__ = '_yaml'# If the module is top-level (i.e. not a part of any specific package)# then the attribute should be set to ''.# https://docs.python.org/3.8/library/types.html__package__ = ''1pip123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778Metadata-Version: 2.4Name: certifiVersion: 2025.11.12Summary: Python package for providing Mozilla's CA Bundle.Home-page: https://github.com/certifi/python-certifiAuthor: Kenneth ReitzAuthor-email: me@kennethreitz.comLicense: MPL-2.0Project-URL: Source, https://github.com/certifi/python-certifiClassifier: Development Status :: 5 - Production/StableClassifier: Intended Audience :: DevelopersClassifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)Classifier: Natural Language :: EnglishClassifier: Programming Language :: PythonClassifier: Programming Language :: Python :: 3Classifier: Programming Language :: Python :: 3 :: OnlyClassifier: Programming Language :: Python :: 3.7Classifier: Programming Language :: Python :: 3.8Classifier: Programming Language :: Python :: 3.9Classifier: Programming Language :: Python :: 3.10Classifier: Programming Language :: Python :: 3.11Classifier: Programming Language :: Python :: 3.12Classifier: Programming Language :: Python :: 3.13Classifier: Programming Language :: Python :: 3.14Requires-Python: >=3.7License-File: LICENSEDynamic: authorDynamic: author-emailDynamic: classifierDynamic: descriptionDynamic: home-pageDynamic: licenseDynamic: license-fileDynamic: project-urlDynamic: requires-pythonDynamic: summary
Certifi: Python SSL Certificates================================
Certifi provides Mozilla's carefully curated collection of Root Certificates forvalidating the trustworthiness of SSL certificates while verifying the identityof TLS hosts. It has been extracted from the `Requests`_ project.
Installation------------
``certifi`` is available on PyPI. Simply install it with ``pip``::
$ pip install certifi
Usage-----
To reference the installed certificate authority (CA) bundle, you can use thebuilt-in function::
>>> import certifi
>>> certifi.where() '/usr/local/lib/python3.7/site-packages/certifi/cacert.pem'
Or from the command line::
$ python -m certifi /usr/local/lib/python3.7/site-packages/certifi/cacert.pem
Enjoy!
.. _`Requests`: https://requests.readthedocs.io/en/master/
Addition/Removal of Certificates--------------------------------
Certifi does not support any addition/removal or other modification of theCA trust store content. This project is intended to provide a reliable andhighly portable root of trust to python deployments. Look to upstream projectsfor methods to use alternate trust.1234567891011121314certifi-2025.11.12.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
certifi-2025.11.12.dist-info/METADATA,sha256=_JprGu_1lWSdHlruRBKcorXnrfvBDhvX_6KRr8HQbLc,2475
certifi-2025.11.12.dist-info/RECORD,,
certifi-2025.11.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
certifi-2025.11.12.dist-info/licenses/LICENSE,sha256=6TcW2mucDVpKHfYP5pWzcPBpVgPSH2-D8FPkLPwQyvc,989
certifi-2025.11.12.dist-info/top_level.txt,sha256=KMu4vUCfsjLrkPbSNdgdekS-pVJzBAJFO__nI8NF6-U,8
certifi/__init__.py,sha256=1BRSxNMnZW7CZ2oJtYWLoJgfHfcB9i273exwiPwfjJM,94
certifi/__main__.py,sha256=xBBoj905TUWBLRGANOcf7oi6e-3dMP4cEoG9OyMs11g,243
certifi/__pycache__/__init__.cpython-310.pyc,,
certifi/__pycache__/__main__.cpython-310.pyc,,
certifi/__pycache__/core.cpython-310.pyc,,
certifi/cacert.pem,sha256=oa1dZD4hxDtb7XTH4IkdzbWPavUcis4eTwINZUqlKhY,283932
certifi/core.py,sha256=XFXycndG5pf37ayeF8N32HUuDafsyhkVMbO4BAPWHa0,3394
certifi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,012345Wheel-Version: 1.0Generator: setuptools (80.9.0)Root-Is-Purelib: trueTag: py3-none-any
1234567891011121314151617181920This package contains a modified version of ca-bundle.crt:
ca-bundle.crt -- Bundle of CA Root Certificates
This is a bundle of X.509 certificates of public Certificate Authorities(CA). These were automatically extracted from Mozilla's root certificatesfile (certdata.txt). This file can be found in the mozilla source tree:https://hg.mozilla.org/mozilla-central/file/tip/security/nss/lib/ckfw/builtins/certdata.txtIt contains the certificates in PEM format and thereforecan be directly used with curl / libcurl / php_curl, or withan Apache+mod_ssl webserver for SSL client authentication.Just configure this file as the SSLCACertificateFile.#
***** BEGIN LICENSE BLOCK *****This Source Code Form is subject to the terms of the Mozilla Public License,v. 2.0. If a copy of the MPL was not distributed with this file, You can obtainone at http://mozilla.org/MPL/2.0/.
***** END LICENSE BLOCK *****@(#) $RCSfile: certdata.txt,v $ $Revision: 1.80 $ $Date: 2011/11/03 15:11:58 $1certifi1234from .core import contents, where
__all__ = ["contents", "where"]__version__ = "2025.11.12"123456789101112import argparse
from certifi import contents, where
parser = argparse.ArgumentParser()parser.add_argument("-c", "--contents", action="store_true")args = parser.parse_args()
if args.contents: print(contents())else: print(where())1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283"""certifi.py~~~~~~~~~~
This module returns the installation location of cacert.pem or its contents."""import sysimport atexit
def exit_cacert_ctx() -> None: _CACERT_CTX.__exit__(None, None, None) # type: ignore[union-attr]
if sys.version_info >= (3, 11):
from importlib.resources import as_file, files
_CACERT_CTX = None _CACERT_PATH = None
def where() -> str: # This is slightly terrible, but we want to delay extracting the file # in cases where we're inside of a zipimport situation until someone # actually calls where(), but we don't want to re-extract the file # on every call of where(), so we'll do it once then store it in a # global variable. global _CACERT_CTX global _CACERT_PATH if _CACERT_PATH is None: # This is slightly janky, the importlib.resources API wants you to # manage the cleanup of this file, so it doesn't actually return a # path, it returns a context manager that will give you the path # when you enter it and will do any cleanup when you leave it. In # the common case of not needing a temporary file, it will just # return the file system location and the __exit__() is a no-op. # # We also have to hold onto the actual context manager, because # it will do the cleanup whenever it gets garbage collected, so # we will also store that at the global level as well. _CACERT_CTX = as_file(files("certifi").joinpath("cacert.pem")) _CACERT_PATH = str(_CACERT_CTX.__enter__()) atexit.register(exit_cacert_ctx)
return _CACERT_PATH
def contents() -> str: return files("certifi").joinpath("cacert.pem").read_text(encoding="ascii")
else:
from importlib.resources import path as get_path, read_text
_CACERT_CTX = None _CACERT_PATH = None
def where() -> str: # This is slightly terrible, but we want to delay extracting the # file in cases where we're inside of a zipimport situation until # someone actually calls where(), but we don't want to re-extract # the file on every call of where(), so we'll do it once then store # it in a global variable. global _CACERT_CTX global _CACERT_PATH if _CACERT_PATH is None: # This is slightly janky, the importlib.resources API wants you # to manage the cleanup of this file, so it doesn't actually # return a path, it returns a context manager that will give # you the path when you enter it and will do any cleanup when # you leave it. In the common case of not needing a temporary # file, it will just return the file system location and the # __exit__() is a no-op. # # We also have to hold onto the actual context manager, because # it will do the cleanup whenever it gets garbage collected, so # we will also store that at the global level as well. _CACERT_CTX = get_path("certifi", "cacert.pem") _CACERT_PATH = str(_CACERT_CTX.__enter__()) atexit.register(exit_cacert_ctx)
return _CACERT_PATH
def contents() -> str: return read_text("certifi", "cacert.pem", encoding="ascii")1pip123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764Metadata-Version: 2.4Name: charset-normalizerVersion: 3.4.4Summary: The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet.Author-email: "Ahmed R. TAHRI" <tahri.ahmed@proton.me>Maintainer-email: "Ahmed R. TAHRI" <tahri.ahmed@proton.me>License: MITProject-URL: Changelog, https://github.com/jawah/charset_normalizer/blob/master/CHANGELOG.mdProject-URL: Documentation, https://charset-normalizer.readthedocs.io/Project-URL: Code, https://github.com/jawah/charset_normalizerProject-URL: Issue tracker, https://github.com/jawah/charset_normalizer/issuesKeywords: encoding,charset,charset-detector,detector,normalization,unicode,chardet,detectClassifier: Development Status :: 5 - Production/StableClassifier: Intended Audience :: DevelopersClassifier: Operating System :: OS IndependentClassifier: Programming Language :: PythonClassifier: Programming Language :: Python :: 3Classifier: Programming Language :: Python :: 3.7Classifier: Programming Language :: Python :: 3.8Classifier: Programming Language :: Python :: 3.9Classifier: Programming Language :: Python :: 3.10Classifier: Programming Language :: Python :: 3.11Classifier: Programming Language :: Python :: 3.12Classifier: Programming Language :: Python :: 3.13Classifier: Programming Language :: Python :: 3.14Classifier: Programming Language :: Python :: 3 :: OnlyClassifier: Programming Language :: Python :: Implementation :: CPythonClassifier: Programming Language :: Python :: Implementation :: PyPyClassifier: Topic :: Text Processing :: LinguisticClassifier: Topic :: UtilitiesClassifier: Typing :: TypedRequires-Python: >=3.7Description-Content-Type: text/markdownLicense-File: LICENSEProvides-Extra: unicode-backportDynamic: license-file
<h1 align="center">Charset Detection, for Everyone 👋</h1>
<p align="center"> <sup>The Real First Universal Charset Detector</sup><br> <a href="https://pypi.org/project/charset-normalizer"> <img src="https://img.shields.io/pypi/pyversions/charset_normalizer.svg?orange=blue" /> </a> <a href="https://pepy.tech/project/charset-normalizer/"> <img alt="Download Count Total" src="https://static.pepy.tech/badge/charset-normalizer/month" /> </a> <a href="https://bestpractices.coreinfrastructure.org/projects/7297"> <img src="https://bestpractices.coreinfrastructure.org/projects/7297/badge"> </a></p><p align="center"> <sup><i>Featured Packages</i></sup><br> <a href="https://github.com/jawah/niquests"> <img alt="Static Badge" src="https://img.shields.io/badge/Niquests-Most_Advanced_HTTP_Client-cyan"> </a> <a href="https://github.com/jawah/wassima"> <img alt="Static Badge" src="https://img.shields.io/badge/Wassima-Certifi_Replacement-cyan"> </a></p><p align="center"> <sup><i>In other language (unofficial port - by the community)</i></sup><br> <a href="https://github.com/nickspring/charset-normalizer-rs"> <img alt="Static Badge" src="https://img.shields.io/badge/Rust-red"> </a></p>
> A library that helps you read text from an unknown charset encoding.<br /> Motivated by `chardet`,> I'm trying to resolve the issue by taking a new approach.> All IANA character set names for which the Python core library provides codecs are supported.
<p align="center"> >>>>> <a href="https://charsetnormalizerweb.ousret.now.sh" target="_blank">👉 Try Me Online Now, Then Adopt Me 👈 </a> <<<<<</p>
This project offers you an alternative to **Universal Charset Encoding Detector**, also known as **Chardet**.
| Feature | [Chardet](https://github.com/chardet/chardet) | Charset Normalizer | [cChardet](https://github.com/PyYoshi/cChardet) ||--------------------------------------------------|:---------------------------------------------:|:--------------------------------------------------------------------------------------------------:|:-----------------------------------------------:|| `Fast` | ❌ | ✅ | ✅ || `Universal**` | ❌ | ✅ | ❌ || `Reliable` **without** distinguishable standards | ❌ | ✅ | ✅ || `Reliable` **with** distinguishable standards | ✅ | ✅ | ✅ || `License` | LGPL-2.1<br>_restrictive_ | MIT | MPL-1.1<br>_restrictive_ || `Native Python` | ✅ | ✅ | ❌ || `Detect spoken language` | ❌ | ✅ | N/A || `UnicodeDecodeError Safety` | ❌ | ✅ | ❌ || `Whl Size (min)` | 193.6 kB | 42 kB | ~200 kB || `Supported Encoding` | 33 | 🎉 [99](https://charset-normalizer.readthedocs.io/en/latest/user/support.html#supported-encodings) | 40 |
<p align="center"><img src="https://i.imgflip.com/373iay.gif" alt="Reading Normalized Text" width="226"/><img src="https://media.tenor.com/images/c0180f70732a18b4965448d33adba3d0/tenor.gif" alt="Cat Reading Text" width="200"/></p>
*\*\* : They are clearly using specific code for a specific encoding even if covering most of used one*<br>
## ⚡ Performance
This package offer better performance than its counterpart Chardet. Here are some numbers.
| Package | Accuracy | Mean per file (ms) | File per sec (est) ||-----------------------------------------------|:--------:|:------------------:|:------------------:|| [chardet](https://github.com/chardet/chardet) | 86 % | 63 ms | 16 file/sec || charset-normalizer | **98 %** | **10 ms** | 100 file/sec |
| Package | 99th percentile | 95th percentile | 50th percentile ||-----------------------------------------------|:---------------:|:---------------:|:---------------:|| [chardet](https://github.com/chardet/chardet) | 265 ms | 71 ms | 7 ms || charset-normalizer | 100 ms | 50 ms | 5 ms |
_updated as of december 2024 using CPython 3.12_
Chardet's performance on larger file (1MB+) are very poor. Expect huge difference on large payload.
> Stats are generated using 400+ files using default parameters. More details on used files, see GHA workflows.> And yes, these results might change at any time. The dataset can be updated to include more files.> The actual delays heavily depends on your CPU capabilities. The factors should remain the same.> Keep in mind that the stats are generous and that Chardet accuracy vs our is measured using Chardet initial capability> (e.g. Supported Encoding) Challenge-them if you want.
## ✨ Installation
Using pip:
```shpip install charset-normalizer -U```
## 🚀 Basic Usage
### CLIThis package comes with a CLI.
```usage: normalizer [-h] [-v] [-a] [-n] [-m] [-r] [-f] [-t THRESHOLD] file [file ...]
The Real First Universal Charset Detector. Discover originating encoding usedon text file. Normalize text to unicode.
positional arguments: files File(s) to be analysed
optional arguments: -h, --help show this help message and exit -v, --verbose Display complementary information about file if any. Stdout will contain logs about the detection process. -a, --with-alternative Output complementary possibilities if any. Top-level JSON WILL be a list. -n, --normalize Permit to normalize input file. If not set, program does not write anything. -m, --minimal Only output the charset detected to STDOUT. Disabling JSON output. -r, --replace Replace file when trying to normalize it instead of creating a new one. -f, --force Replace file without asking if you are sure, use this flag with caution. -t THRESHOLD, --threshold THRESHOLD Define a custom maximum amount of chaos allowed in decoded content. 0. <= chaos <= 1. --version Show version information and exit.```
```bashnormalizer ./data/sample.1.fr.srt```
or
```bashpython -m charset_normalizer ./data/sample.1.fr.srt```
🎉 Since version 1.4.0 the CLI produce easily usable stdout result in JSON format.
```json{ "path": "/home/default/projects/charset_normalizer/data/sample.1.fr.srt", "encoding": "cp1252", "encoding_aliases": [ "1252", "windows_1252" ], "alternative_encodings": [ "cp1254", "cp1256", "cp1258", "iso8859_14", "iso8859_15", "iso8859_16", "iso8859_3", "iso8859_9", "latin_1", "mbcs" ], "language": "French", "alphabets": [ "Basic Latin", "Latin-1 Supplement" ], "has_sig_or_bom": false, "chaos": 0.149, "coherence": 97.152, "unicode_path": null, "is_preferred": true}```
### Python*Just print out normalized text*```pythonfrom charset_normalizer import from_path
results = from_path('./my_subtitle.srt')
print(str(results.best()))```
*Upgrade your code without effort*```pythonfrom charset_normalizer import detect```
The above code will behave the same as **chardet**. We ensure that we offer the best (reasonable) BC result possible.
See the docs for advanced usage : [readthedocs.io](https://charset-normalizer.readthedocs.io/en/latest/)
## 😇 Why
When I started using Chardet, I noticed that it was not suited to my expectations, and I wanted to propose areliable alternative using a completely different method. Also! I never back down on a good challenge!
I **don't care** about the **originating charset** encoding, because **two different tables** canproduce **two identical rendered string.**What I want is to get readable text, the best I can.
In a way, **I'm brute forcing text decoding.** How cool is that ? 😎
Don't confuse package **ftfy** with charset-normalizer or chardet. ftfy goal is to repair Unicode string whereas charset-normalizer to convert raw file in unknown encoding to unicode.
## 🍰 How
- Discard all charset encoding table that could not fit the binary content. - Measure noise, or the mess once opened (by chunks) with a corresponding charset encoding. - Extract matches with the lowest mess detected. - Additionally, we measure coherence / probe for a language.
**Wait a minute**, what is noise/mess and coherence according to **YOU ?**
*Noise :* I opened hundred of text files, **written by humans**, with the wrong encoding table. **I observed**, then**I established** some ground rules about **what is obvious** when **it seems like** a mess (aka. defining noise in rendered text). I know that my interpretation of what is noise is probably incomplete, feel free to contribute in order to improve or rewrite it.
*Coherence :* For each language there is on earth, we have computed ranked letter appearance occurrences (the best we can). So I thoughtthat intel is worth something here. So I use those records against decoded text to check if I can detect intelligent design.
## ⚡ Known limitations
- Language detection is unreliable when text contains two or more languages sharing identical letters. (eg. HTML (english tags) + Turkish content (Sharing Latin characters)) - Every charset detector heavily depends on sufficient content. In common cases, do not bother run detection on very tiny content.
## ⚠️ About Python EOLs
**If you are running:**
- Python >=2.7,<3.5: Unsupported- Python 3.5: charset-normalizer < 2.1- Python 3.6: charset-normalizer < 3.1- Python 3.7: charset-normalizer < 4.0
Upgrade your Python interpreter as soon as possible.
## 👤 Contributing
Contributions, issues and feature requests are very much welcome.<br />Feel free to check [issues page](https://github.com/ousret/charset_normalizer/issues) if you want to contribute.
## 📝 License
Copyright © [Ahmed TAHRI @Ousret](https://github.com/Ousret).<br />This project is [MIT](https://github.com/Ousret/charset_normalizer/blob/master/LICENSE) licensed.
Characters frequencies used in this project © 2012 [Denny Vrandečić](http://simia.net/letters/)
## 💼 For Enterprise
Professional support for charset-normalizer is available as part of the [TideliftSubscription][1]. Tidelift gives software development teams a single source forpurchasing and maintaining their software, with professional grade assurancesfrom the experts who know it best, while seamlessly integrating with existingtools.
[1]: https://tidelift.com/subscription/pkg/pypi-charset-normalizer?utm_source=pypi-charset-normalizer&utm_medium=readme
[](https://www.bestpractices.dev/projects/7297)
# ChangelogAll notable changes to charset-normalizer will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [3.4.4](https://github.com/Ousret/charset_normalizer/compare/3.4.2...3.4.4) (2025-10-13)
### Changed- Bound `setuptools` to a specific constraint `setuptools>=68,<=81`.- Raised upper bound of mypyc for the optional pre-built extension to v1.18.2
### Removed- `setuptools-scm` as a build dependency.
### Misc- Enforced hashes in `dev-requirements.txt` and created `ci-requirements.txt` for security purposes.- Additional pre-built wheels for riscv64, s390x, and armv7l architectures.- Restore ` multiple.intoto.jsonl` in GitHub releases in addition to individual attestation file per wheel.
## [3.4.3](https://github.com/Ousret/charset_normalizer/compare/3.4.2...3.4.3) (2025-08-09)
### Changed- mypy(c) is no longer a required dependency at build time if `CHARSET_NORMALIZER_USE_MYPYC` isn't set to `1`. (#595) (#583)- automatically lower confidence on small bytes samples that are not Unicode in `detect` output legacy function. (#391)
### Added- Custom build backend to overcome inability to mark mypy as an optional dependency in the build phase.- Support for Python 3.14
### Fixed- sdist archive contained useless directories.- automatically fallback on valid UTF-16 or UTF-32 even if the md says it's noisy. (#633)
### Misc- SBOM are automatically published to the relevant GitHub release to comply with regulatory changes. Each published wheel comes with its SBOM. We choose CycloneDX as the format.- Prebuilt optimized wheel are no longer distributed by default for CPython 3.7 due to a change in cibuildwheel.
## [3.4.2](https://github.com/Ousret/charset_normalizer/compare/3.4.1...3.4.2) (2025-05-02)
### Fixed- Addressed the DeprecationWarning in our CLI regarding `argparse.FileType` by backporting the target class into the package. (#591)- Improved the overall reliability of the detector with CJK Ideographs. (#605) (#587)
### Changed- Optional mypyc compilation upgraded to version 1.15 for Python >= 3.8
## [3.4.1](https://github.com/Ousret/charset_normalizer/compare/3.4.0...3.4.1) (2024-12-24)
### Changed- Project metadata are now stored using `pyproject.toml` instead of `setup.cfg` using setuptools as the build backend.- Enforce annotation delayed loading for a simpler and consistent types in the project.- Optional mypyc compilation upgraded to version 1.14 for Python >= 3.8
### Added- pre-commit configuration.- noxfile.
### Removed- `build-requirements.txt` as per using `pyproject.toml` native build configuration.- `bin/integration.py` and `bin/serve.py` in favor of downstream integration test (see noxfile).- `setup.cfg` in favor of `pyproject.toml` metadata configuration.- Unused `utils.range_scan` function.
### Fixed- Converting content to Unicode bytes may insert `utf_8` instead of preferred `utf-8`. (#572)- Deprecation warning "'count' is passed as positional argument" when converting to Unicode bytes on Python 3.13+
## [3.4.0](https://github.com/Ousret/charset_normalizer/compare/3.3.2...3.4.0) (2024-10-08)
### Added- Argument `--no-preemptive` in the CLI to prevent the detector to search for hints.- Support for Python 3.13 (#512)
### Fixed- Relax the TypeError exception thrown when trying to compare a CharsetMatch with anything else than a CharsetMatch.- Improved the general reliability of the detector based on user feedbacks. (#520) (#509) (#498) (#407) (#537)- Declared charset in content (preemptive detection) not changed when converting to utf-8 bytes. (#381)
## [3.3.2](https://github.com/Ousret/charset_normalizer/compare/3.3.1...3.3.2) (2023-10-31)
### Fixed- Unintentional memory usage regression when using large payload that match several encoding (#376)- Regression on some detection case showcased in the documentation (#371)
### Added- Noise (md) probe that identify malformed arabic representation due to the presence of letters in isolated form (credit to my wife)
## [3.3.1](https://github.com/Ousret/charset_normalizer/compare/3.3.0...3.3.1) (2023-10-22)
### Changed- Optional mypyc compilation upgraded to version 1.6.1 for Python >= 3.8- Improved the general detection reliability based on reports from the community
## [3.3.0](https://github.com/Ousret/charset_normalizer/compare/3.2.0...3.3.0) (2023-09-30)
### Added- Allow to execute the CLI (e.g. normalizer) through `python -m charset_normalizer.cli` or `python -m charset_normalizer`- Support for 9 forgotten encoding that are supported by Python but unlisted in `encoding.aliases` as they have no alias (#323)
### Removed- (internal) Redundant utils.is_ascii function and unused function is_private_use_only- (internal) charset_normalizer.assets is moved inside charset_normalizer.constant
### Changed- (internal) Unicode code blocks in constants are updated using the latest v15.0.0 definition to improve detection- Optional mypyc compilation upgraded to version 1.5.1 for Python >= 3.8
### Fixed- Unable to properly sort CharsetMatch when both chaos/noise and coherence were close due to an unreachable condition in \_\_lt\_\_ (#350)
## [3.2.0](https://github.com/Ousret/charset_normalizer/compare/3.1.0...3.2.0) (2023-06-07)
### Changed- Typehint for function `from_path` no longer enforce `PathLike` as its first argument- Minor improvement over the global detection reliability
### Added- Introduce function `is_binary` that relies on main capabilities, and optimized to detect binaries- Propagate `enable_fallback` argument throughout `from_bytes`, `from_path`, and `from_fp` that allow a deeper control over the detection (default True)- Explicit support for Python 3.12
### Fixed- Edge case detection failure where a file would contain 'very-long' camel cased word (Issue #289)
## [3.1.0](https://github.com/Ousret/charset_normalizer/compare/3.0.1...3.1.0) (2023-03-06)
### Added- Argument `should_rename_legacy` for legacy function `detect` and disregard any new arguments without errors (PR #262)
### Removed- Support for Python 3.6 (PR #260)
### Changed- Optional speedup provided by mypy/c 1.0.1
## [3.0.1](https://github.com/Ousret/charset_normalizer/compare/3.0.0...3.0.1) (2022-11-18)
### Fixed- Multi-bytes cutter/chunk generator did not always cut correctly (PR #233)
### Changed- Speedup provided by mypy/c 0.990 on Python >= 3.7
## [3.0.0](https://github.com/Ousret/charset_normalizer/compare/2.1.1...3.0.0) (2022-10-20)
### Added- Extend the capability of explain=True when cp_isolation contains at most two entries (min one), will log in details of the Mess-detector results- Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES- Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio- `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl)
### Changed- Build with static metadata using 'build' frontend- Make the language detection stricter- Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1
### Fixed- CLI with opt --normalize fail when using full path for files- TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it- Sphinx warnings when generating the documentation
### Removed- Coherence detector no longer return 'Simple English' instead return 'English'- Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'- Breaking: Method `first()` and `best()` from CharsetMatch- UTF-7 will no longer appear as "detected" without a recognized SIG/mark (is unreliable/conflict with ASCII)- Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches- Breaking: Top-level function `normalize`- Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch- Support for the backport `unicodedata2`
## [3.0.0rc1](https://github.com/Ousret/charset_normalizer/compare/3.0.0b2...3.0.0rc1) (2022-10-18)
### Added- Extend the capability of explain=True when cp_isolation contains at most two entries (min one), will log in details of the Mess-detector results- Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES- Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio
### Changed- Build with static metadata using 'build' frontend- Make the language detection stricter
### Fixed- CLI with opt --normalize fail when using full path for files- TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it
### Removed- Coherence detector no longer return 'Simple English' instead return 'English'- Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'
## [3.0.0b2](https://github.com/Ousret/charset_normalizer/compare/3.0.0b1...3.0.0b2) (2022-08-21)
### Added- `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl)
### Removed- Breaking: Method `first()` and `best()` from CharsetMatch- UTF-7 will no longer appear as "detected" without a recognized SIG/mark (is unreliable/conflict with ASCII)
### Fixed- Sphinx warnings when generating the documentation
## [3.0.0b1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...3.0.0b1) (2022-08-15)
### Changed- Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1
### Removed- Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches- Breaking: Top-level function `normalize`- Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch- Support for the backport `unicodedata2`
## [2.1.1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...2.1.1) (2022-08-19)
### Deprecated- Function `normalize` scheduled for removal in 3.0
### Changed- Removed useless call to decode in fn is_unprintable (#206)
### Fixed- Third-party library (i18n xgettext) crashing not recognizing utf_8 (PEP 263) with underscore from [@aleksandernovikov](https://github.com/aleksandernovikov) (#204)
## [2.1.0](https://github.com/Ousret/charset_normalizer/compare/2.0.12...2.1.0) (2022-06-19)
### Added- Output the Unicode table version when running the CLI with `--version` (PR #194)
### Changed- Re-use decoded buffer for single byte character sets from [@nijel](https://github.com/nijel) (PR #175)- Fixing some performance bottlenecks from [@deedy5](https://github.com/deedy5) (PR #183)
### Fixed- Workaround potential bug in cpython with Zero Width No-Break Space located in Arabic Presentation Forms-B, Unicode 1.1 not acknowledged as space (PR #175)- CLI default threshold aligned with the API threshold from [@oleksandr-kuzmenko](https://github.com/oleksandr-kuzmenko) (PR #181)
### Removed- Support for Python 3.5 (PR #192)
### Deprecated- Use of backport unicodedata from `unicodedata2` as Python is quickly catching up, scheduled for removal in 3.0 (PR #194)
## [2.0.12](https://github.com/Ousret/charset_normalizer/compare/2.0.11...2.0.12) (2022-02-12)
### Fixed- ASCII miss-detection on rare cases (PR #170)
## [2.0.11](https://github.com/Ousret/charset_normalizer/compare/2.0.10...2.0.11) (2022-01-30)
### Added- Explicit support for Python 3.11 (PR #164)
### Changed- The logging behavior have been completely reviewed, now using only TRACE and DEBUG levels (PR #163 #165)
## [2.0.10](https://github.com/Ousret/charset_normalizer/compare/2.0.9...2.0.10) (2022-01-04)
### Fixed- Fallback match entries might lead to UnicodeDecodeError for large bytes sequence (PR #154)
### Changed- Skipping the language-detection (CD) on ASCII (PR #155)
## [2.0.9](https://github.com/Ousret/charset_normalizer/compare/2.0.8...2.0.9) (2021-12-03)
### Changed- Moderating the logging impact (since 2.0.8) for specific environments (PR #147)
### Fixed- Wrong logging level applied when setting kwarg `explain` to True (PR #146)
## [2.0.8](https://github.com/Ousret/charset_normalizer/compare/2.0.7...2.0.8) (2021-11-24)### Changed- Improvement over Vietnamese detection (PR #126)- MD improvement on trailing data and long foreign (non-pure latin) data (PR #124)- Efficiency improvements in cd/alphabet_languages from [@adbar](https://github.com/adbar) (PR #122)- call sum() without an intermediary list following PEP 289 recommendations from [@adbar](https://github.com/adbar) (PR #129)- Code style as refactored by Sourcery-AI (PR #131)- Minor adjustment on the MD around european words (PR #133)- Remove and replace SRTs from assets / tests (PR #139)- Initialize the library logger with a `NullHandler` by default from [@nmaynes](https://github.com/nmaynes) (PR #135)- Setting kwarg `explain` to True will add provisionally (bounded to function lifespan) a specific stream handler (PR #135)
### Fixed- Fix large (misleading) sequence giving UnicodeDecodeError (PR #137)- Avoid using too insignificant chunk (PR #137)
### Added- Add and expose function `set_logging_handler` to configure a specific StreamHandler from [@nmaynes](https://github.com/nmaynes) (PR #135)- Add `CHANGELOG.md` entries, format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) (PR #141)
## [2.0.7](https://github.com/Ousret/charset_normalizer/compare/2.0.6...2.0.7) (2021-10-11)### Added- Add support for Kazakh (Cyrillic) language detection (PR #109)
### Changed- Further, improve inferring the language from a given single-byte code page (PR #112)- Vainly trying to leverage PEP263 when PEP3120 is not supported (PR #116)- Refactoring for potential performance improvements in loops from [@adbar](https://github.com/adbar) (PR #113)- Various detection improvement (MD+CD) (PR #117)
### Removed- Remove redundant logging entry about detected language(s) (PR #115)
### Fixed- Fix a minor inconsistency between Python 3.5 and other versions regarding language detection (PR #117 #102)
## [2.0.6](https://github.com/Ousret/charset_normalizer/compare/2.0.5...2.0.6) (2021-09-18)### Fixed- Unforeseen regression with the loss of the backward-compatibility with some older minor of Python 3.5.x (PR #100)- Fix CLI crash when using --minimal output in certain cases (PR #103)
### Changed- Minor improvement to the detection efficiency (less than 1%) (PR #106 #101)
## [2.0.5](https://github.com/Ousret/charset_normalizer/compare/2.0.4...2.0.5) (2021-09-14)### Changed- The project now comply with: flake8, mypy, isort and black to ensure a better overall quality (PR #81)- The BC-support with v1.x was improved, the old staticmethods are restored (PR #82)- The Unicode detection is slightly improved (PR #93)- Add syntax sugar \_\_bool\_\_ for results CharsetMatches list-container (PR #91)
### Removed- The project no longer raise warning on tiny content given for detection, will be simply logged as warning instead (PR #92)
### Fixed- In some rare case, the chunks extractor could cut in the middle of a multi-byte character and could mislead the mess detection (PR #95)- Some rare 'space' characters could trip up the UnprintablePlugin/Mess detection (PR #96)- The MANIFEST.in was not exhaustive (PR #78)
## [2.0.4](https://github.com/Ousret/charset_normalizer/compare/2.0.3...2.0.4) (2021-07-30)### Fixed- The CLI no longer raise an unexpected exception when no encoding has been found (PR #70)- Fix accessing the 'alphabets' property when the payload contains surrogate characters (PR #68)- The logger could mislead (explain=True) on detected languages and the impact of one MBCS match (PR #72)- Submatch factoring could be wrong in rare edge cases (PR #72)- Multiple files given to the CLI were ignored when publishing results to STDOUT. (After the first path) (PR #72)- Fix line endings from CRLF to LF for certain project files (PR #67)
### Changed- Adjust the MD to lower the sensitivity, thus improving the global detection reliability (PR #69 #76)- Allow fallback on specified encoding if any (PR #71)
## [2.0.3](https://github.com/Ousret/charset_normalizer/compare/2.0.2...2.0.3) (2021-07-16)### Changed- Part of the detection mechanism has been improved to be less sensitive, resulting in more accurate detection results. Especially ASCII. (PR #63)- According to the community wishes, the detection will fall back on ASCII or UTF-8 in a last-resort case. (PR #64)
## [2.0.2](https://github.com/Ousret/charset_normalizer/compare/2.0.1...2.0.2) (2021-07-15)### Fixed- Empty/Too small JSON payload miss-detection fixed. Report from [@tseaver](https://github.com/tseaver) (PR #59)
### Changed- Don't inject unicodedata2 into sys.modules from [@akx](https://github.com/akx) (PR #57)
## [2.0.1](https://github.com/Ousret/charset_normalizer/compare/2.0.0...2.0.1) (2021-07-13)### Fixed- Make it work where there isn't a filesystem available, dropping assets frequencies.json. Report from [@sethmlarson](https://github.com/sethmlarson). (PR #55)- Using explain=False permanently disable the verbose output in the current runtime (PR #47)- One log entry (language target preemptive) was not show in logs when using explain=True (PR #47)- Fix undesired exception (ValueError) on getitem of instance CharsetMatches (PR #52)
### Changed- Public function normalize default args values were not aligned with from_bytes (PR #53)
### Added- You may now use charset aliases in cp_isolation and cp_exclusion arguments (PR #47)
## [2.0.0](https://github.com/Ousret/charset_normalizer/compare/1.4.1...2.0.0) (2021-07-02)### Changed- 4x to 5 times faster than the previous 1.4.0 release. At least 2x faster than Chardet.- Accent has been made on UTF-8 detection, should perform rather instantaneous.- The backward compatibility with Chardet has been greatly improved. The legacy detect function returns an identical charset name whenever possible.- The detection mechanism has been slightly improved, now Turkish content is detected correctly (most of the time)- The program has been rewritten to ease the readability and maintainability. (+Using static typing)+- utf_7 detection has been reinstated.
### Removed- This package no longer require anything when used with Python 3.5 (Dropped cached_property)- Removed support for these languages: Catalan, Esperanto, Kazakh, Baque, Volapük, Azeri, Galician, Nynorsk, Macedonian, and Serbocroatian.- The exception hook on UnicodeDecodeError has been removed.
### Deprecated- Methods coherence_non_latin, w_counter, chaos_secondary_pass of the class CharsetMatch are now deprecated and scheduled for removal in v3.0
### Fixed- The CLI output used the relative path of the file(s). Should be absolute.
## [1.4.1](https://github.com/Ousret/charset_normalizer/compare/1.4.0...1.4.1) (2021-05-28)### Fixed- Logger configuration/usage no longer conflict with others (PR #44)
## [1.4.0](https://github.com/Ousret/charset_normalizer/compare/1.3.9...1.4.0) (2021-05-21)### Removed- Using standard logging instead of using the package loguru.- Dropping nose test framework in favor of the maintained pytest.- Choose to not use dragonmapper package to help with gibberish Chinese/CJK text.- Require cached_property only for Python 3.5 due to constraint. Dropping for every other interpreter version.- Stop support for UTF-7 that does not contain a SIG.- Dropping PrettyTable, replaced with pure JSON output in CLI.
### Fixed- BOM marker in a CharsetNormalizerMatch instance could be False in rare cases even if obviously present. Due to the sub-match factoring process.- Not searching properly for the BOM when trying utf32/16 parent codec.
### Changed- Improving the package final size by compressing frequencies.json.- Huge improvement over the larges payload.
### Added- CLI now produces JSON consumable output.- Return ASCII if given sequences fit. Given reasonable confidence.
## [1.3.9](https://github.com/Ousret/charset_normalizer/compare/1.3.8...1.3.9) (2021-05-13)
### Fixed- In some very rare cases, you may end up getting encode/decode errors due to a bad bytes payload (PR #40)
## [1.3.8](https://github.com/Ousret/charset_normalizer/compare/1.3.7...1.3.8) (2021-05-12)
### Fixed- Empty given payload for detection may cause an exception if trying to access the `alphabets` property. (PR #39)
## [1.3.7](https://github.com/Ousret/charset_normalizer/compare/1.3.6...1.3.7) (2021-05-12)
### Fixed- The legacy detect function should return UTF-8-SIG if sig is present in the payload. (PR #38)
## [1.3.6](https://github.com/Ousret/charset_normalizer/compare/1.3.5...1.3.6) (2021-02-09)
### Changed- Amend the previous release to allow prettytable 2.0 (PR #35)
## [1.3.5](https://github.com/Ousret/charset_normalizer/compare/1.3.4...1.3.5) (2021-02-08)
### Fixed- Fix error while using the package with a python pre-release interpreter (PR #33)
### Changed- Dependencies refactoring, constraints revised.
### Added- Add python 3.9 and 3.10 to the supported interpreters
MIT License
Copyright (c) 2025 TAHRI Ahmed R.
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, 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 THESOFTWARE.1234567891011121314151617181920212223242526272829303132333435../../../bin/normalizer,sha256=SYyYe3HF8spu7jCx_JS3LMR8c2BlioCBPRm0pbE-6cc,250
charset_normalizer-3.4.4.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
charset_normalizer-3.4.4.dist-info/METADATA,sha256=jVuUFBti8dav19YLvWissTihVdF2ozUY4KKMw7jdkBQ,37303
charset_normalizer-3.4.4.dist-info/RECORD,,
charset_normalizer-3.4.4.dist-info/WHEEL,sha256=nc924w4TUhRiaM6-2LHWgVO2LgkOLXLUotVVlNPrJ7M,141
charset_normalizer-3.4.4.dist-info/entry_points.txt,sha256=ADSTKrkXZ3hhdOVFi6DcUEHQRS0xfxDIE_pEz4wLIXA,65
charset_normalizer-3.4.4.dist-info/licenses/LICENSE,sha256=bQ1Bv-FwrGx9wkjJpj4lTQ-0WmDVCoJX0K-SxuJJuIc,1071
charset_normalizer-3.4.4.dist-info/top_level.txt,sha256=7ASyzePr8_xuZWJsnqJjIBtyV8vhEo0wBCv1MPRRi3Q,19
charset_normalizer/__init__.py,sha256=OKRxRv2Zhnqk00tqkN0c1BtJjm165fWXLydE52IKuHc,1590
charset_normalizer/__main__.py,sha256=yzYxMR-IhKRHYwcSlavEv8oGdwxsR89mr2X09qXGdps,109
charset_normalizer/__pycache__/__init__.cpython-310.pyc,,
charset_normalizer/__pycache__/__main__.cpython-310.pyc,,
charset_normalizer/__pycache__/api.cpython-310.pyc,,
charset_normalizer/__pycache__/cd.cpython-310.pyc,,
charset_normalizer/__pycache__/constant.cpython-310.pyc,,
charset_normalizer/__pycache__/legacy.cpython-310.pyc,,
charset_normalizer/__pycache__/md.cpython-310.pyc,,
charset_normalizer/__pycache__/models.cpython-310.pyc,,
charset_normalizer/__pycache__/utils.cpython-310.pyc,,
charset_normalizer/__pycache__/version.cpython-310.pyc,,
charset_normalizer/api.py,sha256=V07i8aVeCD8T2fSia3C-fn0i9t8qQguEBhsqszg32Ns,22668
charset_normalizer/cd.py,sha256=WKTo1HDb-H9HfCDc3Bfwq5jzS25Ziy9SE2a74SgTq88,12522
charset_normalizer/cli/__init__.py,sha256=D8I86lFk2-py45JvqxniTirSj_sFyE6sjaY_0-G1shc,136
charset_normalizer/cli/__main__.py,sha256=dMaXG6IJXRvqq8z2tig7Qb83-BpWTln55ooiku5_uvg,12646
charset_normalizer/cli/__pycache__/__init__.cpython-310.pyc,,
charset_normalizer/cli/__pycache__/__main__.cpython-310.pyc,,
charset_normalizer/constant.py,sha256=7UVY4ldYhmQMHUdgQ_sgZmzcQ0xxYxpBunqSZ-XJZ8U,42713
charset_normalizer/legacy.py,sha256=sYBzSpzsRrg_wF4LP536pG64BItw7Tqtc3SMQAHvFLM,2731
charset_normalizer/md.cpython-310-darwin.so,sha256=lMwdspv1dP5y_OV-I9n8Z3rcbHDLqeFGDuGlqHsxNjs,66592
charset_normalizer/md.py,sha256=-_oN3h3_X99nkFfqamD3yu45DC_wfk5odH0Tr_CQiXs,20145
charset_normalizer/md__mypyc.cpython-310-darwin.so,sha256=mCSI_EdUswOxLe0rJEvODAwF7ozoSq7BFzrLoALVnqk,485576
charset_normalizer/models.py,sha256=lKXhOnIPtiakbK3i__J9wpOfzx3JDTKj7Dn3Rg0VaRI,12394
charset_normalizer/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
charset_normalizer/utils.py,sha256=sTejPgrdlNsKNucZfJCxJ95lMTLA0ShHLLE3n5wpT9Q,12170
charset_normalizer/version.py,sha256=nKE4qBNk5WA4LIJ_yIH_aSDfvtsyizkWMg-PUG-UZVk,115.DS_StoreAdded
.gitattributes+71
.venv/.DS_StoreAdded
.venv/.gitignoreAdded+1
.venv/bin/Activate.ps1Added+247
.venv/bin/activateAdded+69
.venv/bin/activate.cshAdded+26
.venv/bin/activate.fishAdded+66
.venv/bin/f2pyAdded+7
.venv/bin/hfAdded+7
.venv/bin/huggingface-cliAdded+7
.venv/bin/normalizerAdded+7
.venv/bin/numpy-configAdded+7
.venv/bin/pipAdded+8
.venv/bin/pip3Added+8
.venv/bin/pip3.10Added+8
.venv/bin/pythonAdded+3
.venv/bin/python3Added+3
.venv/bin/python3.10Added+3
.venv/bin/tiny-agentsAdded+7
.venv/bin/tqdmAdded+7
.venv/bin/transformersAdded+7
.venv/bin/transformers-cliAdded+7
.venv/lib/.DS_StoreAdded
.venv/lib/python3.10/.DS_StoreAdded
.venv/lib/python3.10/site-packages/.DS_StoreAdded
.venv/lib/python3.10/site-packages/__pycache__/typing_extensions.cpython-310.pycAdded+3
.venv/lib/python3.10/site-packages/_distutils_hack/__init__.pyAdded+128
.venv/lib/python3.10/site-packages/_distutils_hack/__pycache__/__init__.cpython-310.pycAdded
.venv/lib/python3.10/site-packages/_distutils_hack/__pycache__/override.cpython-310.pycAdded
.venv/lib/python3.10/site-packages/_distutils_hack/override.pyAdded+1
.venv/lib/python3.10/site-packages/_yaml/__init__.pyAdded+33
.venv/lib/python3.10/site-packages/_yaml/__pycache__/__init__.cpython-310.pycAdded
.venv/lib/python3.10/site-packages/certifi-2025.11.12.dist-info/INSTALLERAdded+1
.venv/lib/python3.10/site-packages/certifi-2025.11.12.dist-info/METADATAAdded+78
.venv/lib/python3.10/site-packages/certifi-2025.11.12.dist-info/RECORDAdded+14
.venv/lib/python3.10/site-packages/certifi-2025.11.12.dist-info/WHEELAdded+5
.venv/lib/python3.10/site-packages/certifi-2025.11.12.dist-info/licenses/LICENSEAdded+20
.venv/lib/python3.10/site-packages/certifi-2025.11.12.dist-info/top_level.txtAdded+1
.venv/lib/python3.10/site-packages/certifi/__init__.pyAdded+4
.venv/lib/python3.10/site-packages/certifi/__main__.pyAdded+12
.venv/lib/python3.10/site-packages/certifi/__pycache__/__init__.cpython-310.pycAdded
.venv/lib/python3.10/site-packages/certifi/__pycache__/__main__.cpython-310.pycAdded
.venv/lib/python3.10/site-packages/certifi/__pycache__/core.cpython-310.pycAdded
.venv/lib/python3.10/site-packages/certifi/cacert.pemAdded
.venv/lib/python3.10/site-packages/certifi/core.pyAdded+83
.venv/lib/python3.10/site-packages/certifi/py.typedAdded
.venv/lib/python3.10/site-packages/charset_normalizer-3.4.4.dist-info/INSTALLERAdded+1
.venv/lib/python3.10/site-packages/charset_normalizer-3.4.4.dist-info/METADATAAdded+764
.venv/lib/python3.10/site-packages/charset_normalizer-3.4.4.dist-info/RECORDAdded+35