Saravanan666/pypi-org huggingface dataset:
Package: valiant
ValiantThe Valiant project aims to provide auditing tools that help project teams
track their dependencies in terms of licensing, security, and dependability.The goal is to help reduce the fragility of the "input side" of software development
by making it easy to assess and track dependencies. Further work will also aim to
check dependencies against policy documents to help integrate Valiant into developer
and release workflows.The system is written in Python 3 and targets Python codebases.Please check out theproject sitefor documentation.Key resourcesResourceDescriptionCodebaseGitHub projectSecurity policyPlease refer to this if you need to report a security concernProject trackerStructured to provide fulfilment ofproject milestonesIssue trackerGitHub issuesDocumentationProject siteLicenseProject licence (MIT)ContributingWant to join in?AttributionI have used thePoetrylibrary to package
this project and guide my implementation efforts.TheHypermodern Python seriesby
Claudio Jolowicz is a great resource and you'll see his guidance instilled in this codebase.[ ~ Dependencies scanned by PyUp.io ~ ]
Package: valid8
python-validate (valid8)"valid8ing is not a crime" ;-)valid8provides user-friendly tools for 3 kind of "entry points":general-purposeinlinevalidation (=anywhere in your code),functioninputs/outputs validationclass fieldsvalidation.All these entry points raise consistentValidationErrorincluding user-friendly details, with inheritance ofValueError/TypeErroras appropriate. You cancustomize this errorso as to get unique error types convenient for i18n.The documentation for users is available here:https://smarie.github.io/python-valid8/A readme for developers is available here:https://github.com/smarie/python-valid8
Package: valida
Validation for nested data structuresInstallingpip install validaA simple examplefromvalidaimportData,Value,Rule# Define some data that we want to validate:my_data=Data({'A':1,'B':[1,2,3],'C':{'c1':8.2,'c2':'hello'}})# Define a rule as a path within the data and a condition at that path:rule=Rule(path=('C','c2'),condition=Value.dtype.equal_to(str),)# Test the rulerule.test(my_data).is_valid# `True` => The rule tested successfullyAcknowledgementsValida was developed using funding from theLightFormEPSRC programme grant (EP/R001715/1)
Package: validargs
ValidargsDescriptionRequirementsInstallationUsageContributionsDescriptionA function decorator that is using theinspectlibrary to validate arguments passed in the decorated function.It allows writing complex and re-usable argument validation rules injected directly in the function signature.The validation is not based on type annotations, which allows to go beyond the basic type validations.NOTE:pydanticis a far more advanced and very well supported library, but requires to model your arguments. If you haven't already, make sure you check it out.Source Code:https://github.com/kolitiri/validargsRequirementsPython 3.8+InstallationpipinstallvalidargsUsageFor best results, use the argument definitions syntax as of python v3.8.Use "/" and "*" to distinguish between "positional only", "positional or keyword" and "keyword only" arguments.Define custom validation rules using theValidatorclass.""" my_app.py """fromtypingimportAnyfromvalidargsimportvalidated,Validatordefpositive_number(argument:int)->None:ifargumentisNone:returnNoneiftype(argument)isnotint:raiseTypeError("Number must be an integer")ifargument<=0:raiseException("Number must be a positive integer")defshort_str(argument:str)->None:ifargumentisNone:returnNoneiflen(argument)>20:raiseException("String too long")Use thevalidateddecorator to decorate the functions that you want validated.@validateddefmy_function(positive_number:int=Validator(positive_number),/,short_string:str=Validator(short_str),*,another_short_string:str=Validator(short_str),):passYou can mix and match arguments with and without validators and also assign default values.@validateddefmy_function(positive_number:int=Validator(positive_number,default_value=10),# Validator with default valuenon_validated_arg:int=0,# Regular argument with default value/,short_string:str=Validator(short_str),# Validator without default value*,another_validated_argument:str,# Regular argument without default value):passContributionsIf you want to contribute to the package, please have a look at the CONTRIBUTING.md file for some basic instructions.
Feel free to reach me in my email or my twitter account, which you can find in my github profile!LicenseThis project is licensed under the terms of the MIT license.AuthorsChristos Liontos
Package: validatable
ValidatableData validation and SQL Toolkit using Python type hints.IntroductionValidatable provides a single class definition for data validation and SQL table representation. It uses Pydantic and SQLAlchemy Core.Getting StartedInstallationYou can install Validatable like this:pip install validatableSimple ExamplefromdatetimeimportdatetimefromtypingimportOptionalfromuuidimportuuid4fromsqlalchemy.dialects.postgresqlimportdialectfromsqlalchemy.schemaimportCreateTablefromvalidatableimportUUID4,BaseTable,EmailStr,Field,ForeignKey,MetaDataclassBase(BaseTable):metadata=MetaData()classUser(Base):id:UUID4=Field(sa_primary_key=True,default_factory=uuid4)name:stremail:EmailStrcreated_ts:datetime=Field(default_factory=datetime.now)friends:Optional[UUID4]=Field(sa_fk=ForeignKey("user.id"))ddl=CreateTable(User.__sa_table__).compile(dialect=dialect())print(ddl)# CREATE TABLE "user" (#         id UUID NOT NULL,#         name VARCHAR NOT NULL,#         email VARCHAR(320) NOT NULL,#         created_ts TIMESTAMP WITHOUT TIME ZONE,#         friends UUID,#         PRIMARY KEY (id),#         FOREIGN KEY(friends) REFERENCES "user" (id)# )LicenseThis project is licensed under the terms of the MIT license - see the LICENSE.txt file for details.
Package: validataclass
validataclassPython library for input validation designed for (but not restricted to) JSON-based APIs, neatly integrating with dataclasses.Status:Beta.Installationvalidataclass is available onPyPI.To install it usingpip, just run:pipinstallvalidataclassIf you add the package to your dependencies, it is recommended to usecompatible releaseversion specifiers to make sure you always get the latest version of the library but without running into breaking changes:pipinstallvalidataclass~=0.8However, keep in mind that the library still is in its beta phase (as indicated by the major version of 0). There can
and will be smaller breaking changes between 0.x minor versions, but we will try to keep them at a minimum and save them
for the release of version 1.0.0.UsageSeedocs/for documentation on how to use this library and
for examples.(Note:The documentation is mostly done now, but still a work in progress.)DevelopmentVirtual environmentTo setup a virtualenv for development of the library, runmake venv.Alternatively you can manually run the following commands (which do the same as the make target):$ virtualenv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
$ pip install -e .Running unit testsUnit tests can be run usingmake toxor by directly executingtox.For this to work you need to either be inside the virtualenv (see above) or to havetoxinstalled
in your system locally.
Package: validata-core
Validata validation corevalidata-coreis a library built overfrictionless-pywhich provides tabular data validation with:French error messages (seeERRORS)Custom checks to handle french specifics (seeCUSTOM CHECKS)validata-coreis used byvalidata-uiandvalidata-apias part of theValidata project.Try (only for python < 3.10)Create a virtualenv, run the script against fixtures:python-mvenv.venvsource.venv/bin/activate
pipinstall-rrequirements.txt
pipinstall-e.
validatatable.csv--schema/path/to/schema.json--ignore_header_case# --ignore_header_case is optional and set to False by default (sensitive to the case by default)A complete list of error messages can found inERRORS.mdTestingpipinstallpytest
pytest--doctest-modulesRelease a new versionOn master branch :Update version insetup.pyandCHANGELOG.mdfilesCommit changes usingReleaseas commit messageCreate git tag (starting with "v" for the release)Git push:git push && git push --tagsCheck that pypi package is created (validata-core pipelines)Creating and pushing a new release will trigger the pipeline in order to automatically update validata-core version in its children projects (so far : validata-api and validata-ui) projects.This pipeline runs when a new tag under the format 'vX.X.X' is pushed. For each project, it will create a new branch in which it updates therequirements.txtand thesetup.pyfiles.
Package: validata-ui
Validata UIValidata user interfaceUsageYou can use the online instance of Validata:user interface:https://go.validata.fr/API:https://go.validata.fr/api/v1/API docs:https://go.validata.fr/api/v1/apidocsSeveral software services compose the Validata stack. The recommended way to run it on your computer is to use Docker. Otherwise you can install each component of this stack manually, for example if you want to contribute by developing a new feature or fixing a bug.Run with DockerRead instructions athttps://gitlab.com/validata-table/validata-dockerDevelopInstallWe recommend usingvenvstandard package:python-mvenv.venvsource.venv/bin/activateInstall the project dependencies (using last release of validata-core project):pipinstall-rrequirements.txt
pipinstall-rrequirements-dev.txt
pipinstall-e.To use a specific distant git development branch of validata-core project:pipinstall-rrequirements.txt
pipinstall-rrequirements-dev.txt
pipuninstallvalidata_core
pipinstallgit+https://gitlab.com/validata-table/validata-core.git@<development-branch-name>
pipinstall-e.PDF report generation uses:eitherHeadless Chromium(default)aptinstall-ychromiumorbrowserless.iopdf service
(see.env.exampleto configure this option)Configurecp.env.example.envCustomize the configuration variables in.envfile.Do not commit.env.ServeStart the web server..../serve.sh... then openhttp://localhost:5601/TestUI tests can be launched usingCypress toolRelease a new versionUpdate version insetup.pyandCHANGELOG.mdfilesCommit changes usingReleaseas commit messageCreate git tag (starting with "v" for the release)Git push:git push && git push --tagssCheck that container image is well built and pypi package is created (validata-ui pipelines)
Package: validate-aws-sns-message
validate_aws_sns_messageValidate integrity of Amazon SNS messages.Refined fromvalidatesns.Verifies cryptographic signature.Checks signing certificate is hosted on an Amazon-controlled URL.Requires message be no older than one hour, the maximum lifetime of an SNS message.Licence:MITQuick startpipinstallvalidate_aws_sns_messageimportvalidate_aws_sns_message# Raise validate_aws_sns_message.ValidationError if message is invalid.validate_aws_sns_message.validate(decoded_json_message_from_sns)GotchasThevalidatefunction downloads the signing certificate on every call. For performance reasons, it's worth caching certificates - you can do this by passing in aget_certificatefunction.This takes aurl, and returns the certificate content. Your function could cache to the filesystem, a database, or wherever makes sense.ContributeGithub:https://github.com/kenichi-ogawa-1988/validate_aws_sns_messageSpecial thanksOriginalvalidatesns:https://github.com/nathforge/validatesns
Package: validate-brackets
#Validate brackets
This package allows to validate correct opening and closing of brackets in a string.InstallationRun the following to install:$pip install validate_bracketsUsagefrom ValidateBrackets import validate_brackets

# Validate a string with brackets, returns True
validate_brackets('[]{()}')

# Validate a string with brackets, returns False
validate_brackets('[]{(}'Developing validate_bracketsTo install validate_brackets, along with the tool you need to develp and run tests, run the following in your virtualenv$pip install -e .[dev]
Package: validate-cnpj
validate-cnpjValidates Brazilian CNPJFeaturesCNPJ Validation with maskCNPJ Validation without maskModes of use#!/usr/bin/pythonimportvalidate_cnpj# Without maskvalidate_cnpj.is_valid('40158686000170')# True# With maskvalidate_cnpj.is_valid('40.158.686/0001-70')# Trueor#!/usr/bin/pythonfromvalidate_cnpjimportis_valid# Without maskis_valid('11.111.111/0001-11')# False# With maskis_valid('11111111000111')# FalseAuthorJoão FilhoGithubCreditsThis package was created with Cookiecutter and thecs01/cookiecutter-pypackageproject template.Cookiecuttercs01/cookiecutter-pypackage
Package: validateCPF
validate-CPFEnglish: Function to validade the inputed CPF. It can validade CPF's inputed as just numbers or
as xxx.xxx.xxx-xx. The function returns the CPF as a eleven digit interger number.Portugues: Função para validar um CPF inputado. A função consegue validar CPF's inputados somente como números ou no formato xxx.xxx.xxx-xx. A função retorna o CPF como um numero inteiro de onze digitos.fromvalidateCPFimportgetCPFx=getCPF("Digite seu CPF: ")
Package: validate-cpf
validate-cpfValidates Brazilian CPFFeaturesCPF Validation with maskCPF Validation without maskModes of use#!/usr/bin/pythonimportvalidate_cpf# Without maskvalidate_cpf.is_valid('52998224725')# True# With maskvalidate_cpf.is_valid('529.982.247-25')# Trueor#!/usr/bin/pythonfromvalidate_cpfimportis_valid# Without maskis_valid('11111111111')# False# With maskis_valid('111.111.111-11')# FalseAuthorJoão Filho DrummerzzzGithubCreditsThis package was created with Cookiecutter and thecs01/cookiecutter-pypackageproject template.Cookiecuttercs01/cookiecutter-pypackage
Package: validatedoc
validatedocValidates my extremely specific opinions of what python function docstrings
should look like.I recommend using this with pydocstyle, which velidates pep257.  This is more
strict and more opinionated than that.Installingpip install validatedocUsagevalidatedoc file1.py dir/file2.py file2.pyMore infoExample of how it expects docs to be formated:def foo(bar, baz, qux) -> zam:
    """Do foo thing to bar baz and qux and produce zam.

    :param bar: a thing
    :param baz: another thing
    :param qux: more
    :raises FooError: when foo goes wrong
    :raises ValueError: if a value is wrong
    :return: the value of Zam
    """
    ...Specifically, it ensures that:There is an empty newline between the description and parameters listParameters are in the format:param name: descriptionException docstrings are in the format:raises exception: descriptionReturn docstrings look like:return: description, and come after all raises
and param doc stringsThere are no empty newlines in the param/raises/return listLines in the param/raises/return list either start an item or have a four
space indent (to continue the previous line)The params match exactly the argumentsReturn docstrings are lastIf the function is annotated to return None, no return should be presentIf the function specifies a return other than none, return is presentIn the future, I also want to:Verify that any exceptions raised in the function have a raises docstringBetter support *args and **kwargs (right now they're considered
normal args that require a single param each if they're in the function
definition)Validate docstrings on things other than functionsValidate the short and long descriptions in some waySomething with typesRequire param/raises/return lines to start with a lowercase or an
uppercase (and decide which to use)
Package: validate_email
Validate_email is a package for Python that check if an email is valid, properly formatted and really exists.INSTALLATIONFirst, you must do:pip install validate_emailExtraFor check the domain mx and verify email exits you must have thepyDNSpackage installed:pip install pyDNSUSAGEBasic usage:from validate_email import validate_email
is_valid = validate_email('example@example.com')Checking domain has SMTP ServerCheck if the host has SMTP Server:from validate_email import validate_email
is_valid = validate_email('example@example.com',check_mx=True)Verify email existsCheck if the host has SMTP Server and the email really exists:from validate_email import validate_email
is_valid = validate_email('example@example.com',verify=True)TODOs and BUGSSee:http://github.com/syrusakbary/validate_email/issues
Package: validate-email-address
validate-email-addressvalidate-email-addressis a package for Python that check if an email is valid, properly formatted and really exists.INSTALLATIONFirst, you must do:pip install validate-email-addressExtraFor check the domain mx and verify email exits you must have thepyDNSpackage installed:pip install pyDNSUSAGEBasic usage:>>> from validate_email_address import validate_email
>>> validate_email('example@example.com')
TrueChecking domain has SMTP ServerCheck if the host has SMTP Server:>>> from validate_email_address import validate_email
>>> validate_email('example@sharklasers.com', check_mx=True)
TrueVerify email existsCheck if the host has SMTP Server and the email really exists:>>> from validate_email_address import validate_email
>>> validate_email('example@sharklasers.com', verify=True)
True
Package: validate-email-wt
Validate_email is a package for Python that check if an email is valid, properly formatted and really exists.INSTALLATIONFirst, you must do:pip install validate-email-wtExtraFor check the domain mx and verify email exits you must have thepyDNSpackage installed:pip install pyDNSUSAGEBasic usage:from validate_email import validate_email
is_valid = validate_email('example@example.com')Checking domain has SMTP ServerCheck if the host has SMTP Server:from validate_email import validate_email
is_valid = validate_email('example@example.com',check_mx=True)Verify email existsCheck if the host has SMTP Server and the email really exists:from validate_email import validate_email
is_valid = validate_email('example@example.com',verify=True)Verify email exists on a server that implements callback verficationCheck if the host has SMTP Server and the email really exists:from validate_email import validate_email
is_valid = validate_email('example@example.com',verify=True,sending_email="valid@example.org")valid@example.orgmust be a valid e-mail that you control.For information on callback verification see:https://en.wikipedia.org/wiki/Callback_verificationDon’t allow your users to register with disposable emailsChecks are performed against this version of the listing:https://github.com/martenson/disposable-email-domains/tree/4efb0b0ed43022a78abc768c4f28ba7ed7a37772from validate_email import validate_email
is_valid = validate_email(”disposable@yopmail.com”, allow_disposable=False)
assert not is_validTODOs and BUGSSee:http://github.com/syrusakbary/validate_email/issues
Package: validate-extension-file
Thư viện kiểm tra extension file.Cài đặt:$pip3installvalidate-extension-fileSử dụngfromtruestrive.libs.filetypes.fileimportFilefromtruestrive.libs.filetypes.commonimportExtensionImageFile.check_filetype_by_file_extensions(file_binary=file,# Check filetype của định dạng file binary.Mặc định Nonefile_path=file_path,# Check filetype của path fileextensions=[ExtensionImage.PNG]# Danh sách extension cần check.)Lấy extensions supportExtension Image:fromtruestrive.libs.filetypes.commonimportExtensionImageExtensionImage.LIST_EXTENSION_SUPPORTEDExtension Document:fromtruestrive.libs.filetypes.commonimportExtensionDocumentExtensionDocument.LIST_EXTENSION_SUPPORTEDExtension Audio:fromtruestrive.libs.filetypes.commonimportExtensionAudioExtensionAudio.LIST_EXTENSION_SUPPORTED
Package: validateFieldData
ValidateFieldDatavalidateFieldData is a Python library For cleaning up data related to, or to be submitted in  form fields.InstallationUse the package managerpipto install validateData.pipinstallvalidateFieldDataUsageimportvalidateFieldDataasmp# text = '   Hola   'mp.validateField(text)# returns 'Hola'# username =  ' Dark Sider12 'mp.validateField(username,capitalization='lowercase',spaces=True)# returns 'darksider12'# username =  ' Dark Sider12 'mp.validateField(username,capitalization='lowercase')# returns 'dark sider12'# username =  ' Dark Sider12 'mp.validateField(username,spaces=True)# returns 'DarkSider12'# first_name =  ' Dark Sider12 'mp.validateField(first_name,capitalization='uppercase')# returns 'DARK SIDER12'# work_email = 'nologin@gmail'mp.validateField(work_email,email=True)# returns 'EL correo no es valido '# comments = '   Este texto tiene menos de 300 caracteres    'mp.validateField(comments,length=300)# returns 'Este texto tiene menos de 300 caracteres'# ID_number = ' 1064 78923 'mp.validateField(ID_number,document=True)# returns '1064578923'ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: validatejson
validatejsonAccepts JSON payload and JSON schema as input and runs JSON payload validation against the provided JSON schema.Usage: validatejson [OPTIONS] JSON_DATA_LOCATION SCHEMA_LOCATION
  
  Arguments:
    JSON_DATA_LOCATION  [required]
    SCHEMA_LOCATION     [required]
  
  Options:
    --install-completion [bash|zsh|fish|powershell|pwsh]
                                    Install completion for the specified shell.
    --show-completion [bash|zsh|fish|powershell|pwsh]
                                    Show completion for the specified shell, to
                                    copy it or customize the installation.
    --help                          Show this message and exit.
Package: validate-mail
Validate E-mail IDThis project validates the e-mail ID passed.InstallationRun the following to install:pipinstallvalidate-mailUsagefromvalidate_mailimportvalidate_emailvalid_mail=abc@gmail.cominvalid_mail=abc.@gmail.com# validate your mail IDprint(validate_email(valid_mail))# Trueprint(validate_email(invalid_mail))# FalseMIT Licensed - 2020 Britsa -britsa.tech@gmail.comContributors:
Maria Irudaya Regilan J, Pavithra K, Ravi Shankar M
Package: validate-nigerian-phone
Issues and pull requests welcome.A Python module to validate and format a Nigerian phone number as well as deduce the network provider or area code.Table of ContentsInstallationUsageFeaturesContributeRun TestsInstallationYou will needPython 3.xandpip.Install using pip:pip install validate_nigerian_phoneInstall via repo:Clone repogit clonehttps://github.com/djunehor/validate_nigerian_phonePlace validate_nigerian_phone in your project root folderUsagefromvalidate_nigerian_phoneimportNigerianPhonephone=NigerianPhone('+2348135087966')# Check if is validphone.is_valid()#True# Get formattedphone.formatted()#08135087966# Get Networkphone.get_network()#mtn# Check if is mtnphone.is_mtn()# True# Get network from phone number prefix e.gphone.get_network_by_prefix('0703')# mtnFeaturesCurrently implementedis_validformattedget_networkget_area_codeis_mtnis_glois_airtelis_9mobileis_smileis_smileis_multilinksis_visafoneis_ntelis_starcommsis_zoomget_prefixes_by_networkget_network_by_prefixget_area_code_by_nameTestsRunpython tests.pyContributeCheck out the issues on GitHub and/or make a pull request to contribute!
Package: validatenric
Validate NRICHello!This is a project to write and publish a python script to check if a Singaporean NRIC number is valid.The Singaporean National Registration Identity Card (NRIC) is document issued in Singapore to citizens and PRs for the purpose of identification.As explained very well byIvan Tayin his article, the last letter of the NRIC functions as a checksum to validate the NRIC number.Please note that this does not mean that the NRIC number is in use.I am aware that several sites (including Ivan's) already function as an NRIC number validator, however i cannot a find a package that does the same thing for python.With that in mind, the purpose of this project is twofold:Practice publishing a small package to thePython Package Index (PyPI).Practice publishing an app of sorts to google cloudDo note that this project is in no way supported by the Singapore government or any legal body in Singapore.This is done for fun.The package has one method, ".validate()", that takes a non-case-sensitive input as a string and outputs either "valid", "invalid, wrong checksum",or "invalid, wrong format".