Saravanan666/pypi-org huggingface dataset:
Package: validobj
ValidobjValidobj is library that takes semistructured data (for example JSON and YAML
configuration files) and converts it to more structured Python objects. It
places the emphasis on:Good error messages(rather than avoiding extra work in the error handling
code).Schema defined in terms ofdataclassesand other
high level objects such asenums, as well as a subset of
thetypingmodule.Simplicity of implementation (rather than full generality).Validobj requires a modern Python version and has no other dependencies. It
progressively supports typing features as they are implemented in the standard
library and language: A limited subset of the parsing facilities work with
Python 3.8, which is the minimum version. Thecustom validation
modulerequires at least
Python 3.9.Documentationhttps://validobj.readthedocs.io/en/latest/ExampleDefine a schema using dataclassesimportdataclassesimportenumfromtypingimportMapping,Set,Tuple,ListclassDiskPermissions(enum.Flag):READ=enum.auto()WRITE=enum.auto()EXECUTE=enum.auto()classOS(enum.Enum):mac=enum.auto()windows=enum.auto()linux=enum.auto()@dataclasses.dataclassclassJob:name:stros:Set[OS]script_path:strframework_version:Tuple[int,int]=(1,0)disk_permissions:DiskPermissions=DiskPermissions.READ@dataclasses.dataclassclassCIConf:stages:List[Job]global_environment:Mapping[str,str]=dataclasses.field(default_factory=dict)Process a dictionary input into it using Validobjfromvalidobjimportparse_inputinp={'global_environment':{'CI_ACTIVE':'1'},'stages':[{'name':'compile','os':['linux','mac'],'script_path':'build.sh','disk_permissions':['READ','WRITE','EXECUTE'],},{'name':'test','os':['linux','mac'],'script_path':'test.sh','framework_version':[4,0],},],}print(parse_input(inp,CIConf))# This results in a dataclass instance with the correct types:##CIConf(#    stages=[#        Job(#            name='compile',#            os={<OS.linux: 3>, <OS.mac:1>},#            script_path='build.sh',#            framework_version=(1, 0),#            disk_permissions=<DiskPermissions.EXECUTE|WRITE|READ: 7>,#        ),#        Job(#            name='test',#            os={<OS.linux: 3>, <OS.mac: 1>},#            script_path='test.sh',#            framework_version=(4, 0),#            disk_permissions='<DiskPermissions.READ: 1>',#        ),#    ],#    global_environment={'CI_ACTIVE': '1'},#)#The set ofapplied
transformationsas well
as the interface tocustomise
processingare described
in thedocumentationInstallationThe package can be installed withpip:python3 -m pip install validobjAs well as withconda, from theconda-forgechannel:conda install validobj -c conda-forgeThe code is hosted athttps://github.com/Zaharid/validobj
Package: validpeas
validpeasSmall library to create structured validationsExample# Elemental validators@processor_from_validator@make_validator()defis_string(data:Any)->bool:returnisinstance(data,str)@processor_from_validator@make_validator()defis_valid_json(json_string:str)->bool:try:loads(json_string)returnTrueexceptValueError:returnFalse@processor_from_validator@make_validator()defhas_numbers_field(data:dict)->bool:return"numbers"indata@processor_from_validator@make_validator()defis_list(data:Any)->bool:returnisinstance(data,list)@processor_from_validator@make_validator()defis_integer(data:Any)->bool:returnisinstance(data,int)@processor_from_validator@make_validator()deflength_is_greater_than_5(data:list)->bool:returnlen(data)>5@processor_from_validator@make_validator()defascending_pair(numbers:tuple[int,int])->bool:returnnumbers[0]<numbers[1]# Composite validators@make_composite_processor()defall_list_items_are_integers(numbers:list[Any])->list[ValidationResult]:returnlist(map(is_integer,numbers))@make_composite_processor()defis_in_ascending_order(numbers:list[int])->list[ValidationResult]:returnlist(map(ascending_pair,pairwise(numbers)))@make_composite_processor()defmain_validator(data:Any)->list[ValidationResult]:is_string_result=is_string(data)is_valid_json_result=is_valid_json(data,dependencies=[is_string_result])json_data=loads(data)ifis_valid_json_result.passedelseNonehas_numbers_field_result=has_numbers_field(json_data,dependencies=[is_valid_json_result])numbers=json_data["numbers"]ifhas_numbers_field_result.passedelseNoneis_list_result=is_list(numbers,dependencies=[has_numbers_field_result])length_is_greater_than_5_result=length_is_greater_than_5(numbers,dependencies=[is_list_result])all_list_items_are_integers_result=all_list_items_are_integers(numbers,dependencies=[is_list_result])is_in_ascending_order_result=is_in_ascending_order(numbers,dependencies=[all_list_items_are_integers_result])return[is_string_result,is_valid_json_result,has_numbers_field_result,is_list_result,length_is_greater_than_5_result,all_list_items_are_integers_result,is_in_ascending_order_result,]samples=[5,"gfdgsgfsggfds",'{"asdf": [1, 2, 3, 5, 4]}','{"numbers": [1, 2, 3]}','{"numbers": [1, 2, 3, 4, 5, "a"]}','{"numbers": [1, 2, 3, "b"]}','{"numbers": [1, 2, 3, 4, 6, 5, 7, 8, 9, 10]}','{"numbers": [1, 2, 3, 4, 5, 6]}',]forsampleinsamples:result=main_validator(sample)print(human_text_result_report(result))print()
Package: validpy
validpyIt is a library that makes validation checks in pythonInstallation>pipinstallvalidpyUsageimportvalidpyvalidator=validpy.Validator()# Checking user inputuser_input=input("Choose an option (1, 2, 3, 4): ")valid_choices=["1","2","3","4"];ifvalidator.isInput(user_input,valid_choices):print("Correct")# Checking numbers or stringsnumber=3ifvalidator.isInt(number):ifvalidator.isEven(number):print("Even number)print("Odd number")else:print("Thats not a number")
Package: validr
ValidrA simple, fast, extensible python library for data validation.Simple and readable schema10X faster thanjsonschema,
40X faster thanschematicsCan validate and serialize any objectEasy to create custom validatorsAccurate and friendly error messages简单，快速，可拓展的数据校验库。简洁，易读的 Schema比jsonschema快 10 倍，比schematics快 40 倍能够校验&序列化任意类型对象易于拓展自定义校验器准确友好的错误提示OverviewfromvalidrimportT,modelclass,asdict@modelclassclassModel:"""Base Model"""classPerson(Model):name=T.str.maxlen(16).desc('at most 16 chars')website=T.url.optional.desc('website is optional')guyskk=Person(name='guyskk',website='https://github.com/guyskk')print(asdict(guyskk))InstallNote: Only support Python 3.5+pip install validrWhen you have c compiler in your system, validr will be c speedup mode.
Otherwise validr will fallback to pure python mode.To force c speedup mode:VALIDR_SETUP_MODE=c pip install validrTo force pure python mode:VALIDR_SETUP_MODE=py pip install validrDocumenthttps://github.com/guyskk/validr/wikiPerformancebenchmark result in Travis-CI:--------------------------timeits---------------------------
  voluptuous:default             10000 loops cost 0.368s
      schema:default              1000 loops cost 0.318s
        json:loads-dumps        100000 loops cost 1.380s
      validr:default            100000 loops cost 0.719s
      validr:model              100000 loops cost 1.676s
  jsonschema:draft3              10000 loops cost 0.822s
  jsonschema:draft4              10000 loops cost 0.785s
  schematics:default              1000 loops cost 0.792s
---------------------------scores---------------------------
  voluptuous:default               375
      schema:default                43
        json:loads-dumps          1000
      validr:default              1918
      validr:model                 823
  jsonschema:draft3                168
  jsonschema:draft4                176
  schematics:default                17DevelopValidr is implemented byCythonsince v0.14.0, it's 5X
faster than pure Python implemented.setup:It's better to usevirtualenvor
similar tools to create isolated Python environment for develop.After that, install dependencys:./bootstrap.shbuild, test and benchmark:inv build
inv test
inv benchmarkLicenseThe project is open source underAnti-996 LicenseandGNU GPL License, you can choose one of them.
Package: validrequest
ValidatorThis is a request handler validation tool for RESTful API endpoints.How To Usefromvalidrequestimportvalidator,ValidationErrorfromtypingimportDict,Anydefrequest_handler(request,response,next):# Note: type and state must be the first rules in that order# i.e. type (string,float,integer,number,dict)|state (required,sometimes)validation_rules:Dict[str,str]={"q":"string|required|max:100","timestamp":"float|sometimes|min:1|max:13","comment":"string|required|min:10","code":"integer|required","version":"float|sometimes","metadata":"dict|required","timeSince":"number|required"}request_parameters:Dict[str,Any]=request.bodytry:validator(validation_rules,request_parameters)returnresponse.status(200).send("Validation successful.")exceptValidationErrorase:returnnext({"message":e})exceptException:returnnext({"message":"Something else went wrong."})# You can also use a decorator (@validate) - see demo.py for an exampleRefer to thedemo.pyfile for further implementations.How to Installpython-mpipinstallvalidrequestpython-mpipinstallgit+https://github.com/ableinc/validrequest.gitImportant - Migrating from v0.0.3 to v1.0.0Breaking Changesin Version 1.0.0 - Please carefully review the changes belowimport library name has changed from "validator" to "validrequest":fromvalidrequestimportvalidate,validator,ValidationError@validate decorator now accepts 'request' or 'req' as Request argument nameparse_level was changed to payload_level for @validate decoratorerror callback must be named "next" for @validate decorator - it will not accept any other argumenterror callback will return a string error message with error type - it will no longer return JSONstrict declaration has been removed - validation rules will always be checked against required and ignored for sometimes'number' is now an acceptable type in validation rule - this can be used for fields that may be either integer or floatAcceptable types in validation rules:Integer: int | integer | numberFloat: float | numberString: str | stringDictionary: dict | dictionary | objectBoolean: bool | boolean
Package: validus
ValidusA dead simple Python string validation library.RequirementsPython 3.3+InstallationpipinstallvalidusUsage>>>importvalidus>>>validus.isemail('someone@example.com')TrueList of Functionsisascii()isprintascii()isnonempty()isbase64()isemail()ishexadecimal()isint()isfloat()ispositive()isslug()isuuid()isuuid3()isuuid4()isuuid5()isfullwidth()ishalfwidth()islatitude()islongitude()ismac()ismd5()issha1()issha256()issha512()ismongoid()isiso8601()isbytelen()isipv4()isipv6()isip()isport()isdns()isssn()issemver()ismultibyte()isfilepath()isdatauri()isjson()istime()isurl()iscrcard()isisin()isiban()ishexcolor()isrgbcolor()isphone()isisbn()isisbn10()isisbn13()isimei()ismimetype()isisrc()ResourcesDocumentationIssue TrackerCodeCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.3.0 (2018-05-22)isurl function updated and removed support for irc url.0.2.0 (2017-12-15)Added some more functions.Refactored for improved performance.0.1.0 (2017-06-07)First release on PyPI.
Package: valigator
valigatorCheck your backups before you wreck yourself !valigatorhelps you automate backup validation. It usesDockerto create ephemeral environments in which a backup restoration can occur.It aims to be a generic tool used to testANYbackup type:- Database backup (mysql,mongodb…)- …InstallationRequirementsWIPSetupUsepipto install it:$ pip install valigatorUsageWIPConfigurationWIPExtensionsWIPLimitationsThis tool has been tested on the following OSes:Ubuntu 14.04It has been tested against the following Python versions:Python 2.7
Package: vali-helper
vali-helperDescriptionvalid-helper is a util that helps define the validation to the parameters of functionsInstallationpipinstallvali_helperInstructionsThis package is very easy to use. There are some pre-defined validation classes. For example, if a function give_money
has an int parameter money, and it requires the parameter is greater than "0", it can be written in the below following
form:fromvaliimport*@validator(valis=[GreaterThan(name='money',value=0)])defgive_money(money:int|float):print(money)>>>give_money(-10)Traceback(mostrecentcalllast):vali.validation.ValiFailError:Thevalidationvaluemustgreaterthan0,butprovided-10More examples could be referred to src/vali/tests
Package: valimail
ValiMail - Email Verification LibraryValiMail is a library designed for advanced and effective verification of email addresses.FeaturesVerify the format and validity of email addresses.Detect if an email address exists in a leaked database.Support email domain verification.Support email comparison against a blacklist.Integration with popular email service providers.InstallationYou can install the library using the following command:pipinstallvalimailHow To UseImport the libraryfromvalimailimportvali_mail,check_domain_name,check_if_known,is_dispose_emailUse library functions to check email addressesemail="example@email.com"is_valid=vali_mail(email)is_in_database=check_if_known(email)is_valid_domain=check_domain_name(email)is_dispose=is_dispose_email(email)# Print the resultsprint(f"Is valid email:{is_valid}")print(f"Is in database:{is_in_database}")print(f"Has valid domain:{is_valid_domain}")print(f"Is blacklisted:{is_dispose}")#Ihad Been Added The RealTime Examples in The File example.pyDocumentationFor detailed documentation and examples, please refer to theofficial documentation.LicenseThis project is licensed under the MIT License - see theLICENSEfile for details.
Package: valipy
Dead Simple Data Validation In PythonValipyValipy is a simple, chainable and composable data validation library that aims to be used in any place where you need to make sure data is schematized in a certain way.Valipy is heavily inspired on the js validation libraryv8n.jsand it tries it best to be an almost 1:1 python alternative.Python Version SupportValipy currently only supportspython >3.11. This is beacuse Valipy uses some features from the typing module only available for the newest python releases.FeaturesChainable APIPlenty of validation rules  (20+)Create your own validation rulesReusableCan use Regexgranular exceptionsSchema ValidationInstalationAs easy aspip install valipyDocumentationcheck de documentationhere
Package: valjean
ValjeanQuick installation guide:valjeanneeds at least python3.6 (deprecated on December 23, 2021).Installation usingpipSetup a virtual environmentpython3 -m venv MY_VIRTUAL_ENV
source MY_VIRTUAL_ENV/bin/activate
pip install -U pipInstallation from gitgit clone https://github.com/valjean-framework/valjean.git
pip install ./valjean  # or pip install path/to/valjeanInstallation from archiveThe pip archive can be downloaded from theFichiers/Filesarea of Tuleap.pip install valjean-VERSION.tar.gzInstallation usingcondaDownload and installconda.Download thevaljean-condaarchive from theFichiers/Filesarea of
Tuleap.Installvaljean:source MY_CONDA/bin/activate
conda create -n MY_ENV python=PY_VERSION
conda activate MY_ENV
conda install -c file://PATH/TO/valjean-VERSION.tar.bz2 --use-local valjeanThe python version ofcondashould be the same as the one used to build thevaljeanarchive.This installation is not foreseen for development.DocumentationThe documentation can be found online:https://valjean.readthedocs.io/en/latest/It can also be downloaded from theFichiers/Filesarea of Tuleap.tar xzf valjean-doc-*.tar.gzYou can also consult the source files for the documentation in thedoc/srcdirectory.
Package: valkyrie-tools
Valkyrie ToolsA collection of tools and scripts for making the life of security analysts
easier, faster, and more efficient.[][tests]
[][codecov]
[][pypi_]
[][python version][][read the docs]InstallationInstallvalkyrie-toolsfrom the Python Package Index:$pipinstallvalkyrie-toolsor$python3-mpipinstallvalkyrie-toolsRequirementsPython 3.8+UsageAll of the command line tools are available under directly and should be
available in your path after installation.$valkyrieAll commands were built with the intention of being used in a CI/CD pipeline.
As such, they all have a--helpflag that will print out the available
options.$valkyrie--helpCommand Line ScriptsA list of all available command line scripts:valkyrieurlcheckipcheckwhobeOnce you've installed the package, you can run any of the scripts like so:$<script-name><args>ValkyrieThis script has not yet been implemented.URLCheckThis script will check the aliveness of a URL and follow any redirects.Arguments:$urlcheck<url>Example Usage:$urlcheck"https://google.com"->https://google.comHTTP/1.1-301-MovedPermanently
>>https://www.google.com/HTTP/1.1-200-OKIPCheckThis script will get information for an IP address.Arguments:$ipcheck<ip>Example Usage:$ipcheck1.1.1.1
>1.1.1.1ip:1.1.1.1hostname:one.one.one.oneanycast:Truecity:LosAngelesregion:Californiacountry:USloc:34.0522,-118.2437org:AS13335Cloudflare,Inc.postal:90076timezone:America/Los_Angelesreadme:https://ipinfo.io/missingauthWhoBeThis script will get information for a domain or IP address.Arguments:$whobe<domain/ip>Example Usage:$whobegoogle.com
>google.comRegistrar:MarkMonitorInc.(None)Emails:-abusecomplaints@markmonitor.comName:NoneAddress:None,None,NoneNone,NoneCreationDate:1997-09-1504:00:00ExpirationDate:2028-09-1404:00:00UpdatedDate:2019-09-0915:39:04NameServers:-NS1.GOOGLE.COM-NS2.GOOGLE.COM-NS3.GOOGLE.COM-NS4.GOOGLE.COM
$
$whobe1.1.1.1
>1.1.1.1ASN:13335(AU)CIDR:1.1.1.0/24Description:1.1.1.0/24Networks:-APNIC-LABS(AA1412-AP)CIDR:1.1.1.0/24Netrange:(1.1.1.0-1.1.1.255)-24HostsAddress:POBox3646SouthBrisbane,QLD4101Australia,AUEmails:-resolver-abuse@cloudflare.com-helpdesk@apnic.net-research@apnic.netContributingContributions are very welcome.
To learn more, see theContributor Guide.LicenseDistributed under the terms of theMIT license,valkyrie-toolsis free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.CreditsThis project was built off of the sweat and tears
of the the bad actors it was built to fight.
Package: vallaris
Vallaris libraryA package to made for support Vallaris MapsNow supported Pythont >= 3.6How to use1 Install python >= 3.62 Install library vallaris ==> pip3 install vallaris3 Create User On Vallaris Maps athttps://vallarismaps.com/management/signin4 Example source code athttps://repo.i-bitz.co.th/vallaris_example/vallaris-pythonSelect a file from the code folder.  for data management in Vallaris Maps1 collectionCreate.py  ==> for create Collection2 collectionUpdate.py ==> for update Collection3 collectionDelete.py ==> for delete Collection4 featuresCreate.py ==> for create data in Collection5 featuresUpdate.py ==> for update data in Collection6 featuresDelete.py ==> for delete data in Collection7 featuresExport.py ==> for download data in Collection8 vectortileCreate.py ==> for Vector TileSelect a file from the code folder.  for create Module processes in Vallaris Maps1 perform.py ==> for write code python2 mockProcess.py ==> for json test for use processes
Package: vallarisStreaming
Vallaris libraryA package to made for support Vallaris MapsNow supported Pythont >= 3.6How to use1 Install python >= 3.62 Install library vallaris ==> pip3 install vallaris3 Create User On Vallaris Maps athttps://vallarismaps.com/management/signin4 Example source code athttps://repo.i-bitz.co.th/vallaris_example/vallaris-pythonSelect a file from the code folder.  for data management in Vallaris Maps1 collectionCreate.py  ==> for create Collection2 collectionUpdate.py ==> for update Collection3 collectionDelete.py ==> for delete Collection4 featuresCreate.py ==> for create data in Collection5 featuresUpdate.py ==> for update data in Collection6 featuresDelete.py ==> for delete data in Collection7 featuresExport.py ==> for download data in Collection8 vectortileCreate.py ==> for Vector TileSelect a file from the code folder.  for create Module processes in Vallaris Maps1 perform.py ==> for write code python2 mockProcess.py ==> for json test for use processes
Package: valle-6steps
Valle 6 steps packageThe program can be used to help middle school and first/second year high school students to improve their writing and pronunciation in English. In order to do so, the teacher gives them a noun, which is used as first input. Using two Datamuse APIs, the students will get some collocations (adjectives + other words commonly combined with the given noun). They will then get from the teacher some «banned words», which are words that students can’t use in their text. The following input is a sentence given by the teacher, which represents the beginning of the text that each student has to write. The text, of about 50 words, must contain at least 5 collocations obtained from Datamuse but no banned words. Should the banned word be used, then the student gets a message telling him to revise the text. If the text has no banned words it is automatically corrected by gingerbit. Once gingerbit gives back a corrected text, the student has to use this text as an input so as to get the text pronounced in British English.To call the program:
start_sixsteps()
Package: vallenae
Vallen AE Python ToolsDocumentation·ExamplesPython tools to extract and analyze Acoustic Emission measurement data.
The package includes following modules:vallenae.io: Reading (and writing) of Vallen Systeme SQLite database files (*.pridb, *.tradb, *.trfdb)vallenae.features: Extraction of Acoustic Emission featuresvallenae.timepicker: Timepicking algorithms for arrival time estimationsNote:
A free/lite version of the Vallen AE Suite is available since the release R2020.
If offers the basic features for real-time data visualization and analysis with VisualAE.
So you could write you own pridb/tradb files and have real-time visualizations with VisualAE.The Vallen AE Suite can be downloadedhere.InstallationInstall the latest version fromPyPI:$pipinstallvallenaeIf you want to run the latest version of the code, you can install from the master branch directly:$pipinstall-Ugit+https://github.com/vallen-systems/pyVallenAE.git# Or if you don't have git installed$pipinstall-Uhttps://github.com/vallen-systems/pyVallenAE/zipball/masterPlease note, thatvallenaerequires Python 3.6 or newer. On Linux systems,pipis usually mapped to Python 2, so usepip<version>(e.g.pip3orpip3.7) instead. Alternatively, you can runpipfrom your specific Python version withpython<version> -m pip.ContributingFeature requests, bug reports and fixes are always welcome!
Justcreate an issueor make a pull-request.Development setup# Clone this repository$gitclonehttps://github.com/vallen-systems/pyVallenAE.git
$cdpyVallenAE# Install package and dependencies$pipinstall-e.[dev]# Run the test suite with tox$tox# Build the documentation with Sphinx$cddocs
$makehtml# on Linux$./make.bathtml# on Windows