semvec/pypi-packages huggingface dataset:
email-domain-verification 1.1.0
Email Validator
Requires Python: >=3.7


# Email Domain Verification Package
this package can provide some email validators with which users can validate their project emails far easily

## Installation
<p>your module will be installed by PYPI</p>

```
pip install email-domain-verification
```

## Usage

```
from email_domain_verification import Email, EmailVerifier
from email_domain_verification.validators import BlackDomainListValidator

# you can import any of these validators or write your own validator
# (
#     BlackDomainListValidator,
#     DomainExtensionValidator,
#     LengthValidator,
#     MultiDotValidator,
#     SafeDomainValidator,
#     SafeDomainValidatorOnline,
# )

email = Email("hello@gmail.com")
black_email_list = [
    "xyz-mail.com",
    "tempmail.com",
    "temp.com",
    "mail-temp.org",
    # ...
]
validators = [
    BlackDomainListValidator(black_email_list),
]

verifier = EmailVerifier(email)
verifier.verify(validators)
```

### prevent raise exception

```
from email_domain_verification import Email, EmailVerifier
from email_domain_verification.validators import BlackDomainListValidator

email = Email("hello@gmail.com")
black_email_list = [
    "xyz-mail.com",
    "tempmail.com",
    # ...
]
validators = [
    BlackDomainListValidator(black_email_list),
]

verifier = EmailVerifier(email)
validated: bool = verifier.verify(validators, raise_exception=False)
# validated == True => email is safe | validated == False => email is unsafe
```


## Create Custom Validator

```
from email_domain_verification import Email, EmailVerifier
from email_domain_verification.interfaces import ValidatorInterface
from email_domain_verification.validators import LengthValidator


class CustomValidator(ValidatorInterface):
    __criterion: typing.Type

    def __init__(self, criterion: typing.Type) -> None:
        self.__criterion = criterion

    def validate_criterion(self) -> None:
        # validate __criterion
        pass

    def check(self, email: Email) -> bool:
        self.validate_criterion()

        # check email.value
        # example: len(email.value) > self.__criterion: return True
        validate = True
        if not validate:
            raise ValueError("The Error Message")

        return True


email = Email("hello@gmail.com")
validators = [
    BlackDomainListValidator(black_email_list),
    CustomValidator(10),
]

verifier = EmailVerifier(email)
verifier.verify(validators)


```

#### Copyright (c) 2023, Khodnevisai.com (Mahdi Niknejad).
CToolKit 2.45
CToolKit to manipulate CPipeLines and Repos

# CToolkit
 is An Python Package to manipulate C/C++ buildings and  PipeLines
 providing easy automation tools to increase your code pipelines 
 with amalgamations, black box testing, and readme replacment

### Instalation from Pip
for install the lib from pip call 

~~~shell
pip install CToolKit
~~~
### Installation from scratch

clone the repo into your machine with:

~~~shell
git clone https://github.com/OUIsolutions/CTolkitBuild.git
~~~
Then install with:
~~~shell
cd CTolkitBuild/
pip install .
~~~

### Installation from github
type the following comand to install from github
~~~shell
pip install git+https://github.com/OUIsolutions/CTolkitBuild.git
~~~

### Amalgamation System

for amalgamate an C lib its super easy, just call 
~~~python
import CToolKit as ct

STARTER  = f'test.h'
OUTPUT = 'amalgamated.h'
amalgamated_code = ct.generate_amalgamated_code(STARTER)
with open(OUTPUT,'w') as arq:
    arq.write(amalgamated_code)
~~~
or even more implicit:
~~~python

import CToolKit as ct

STARTER  = f'CTextEngine/CTextEngineMain.h'
OUTPUT = 'amalgamated.h'
amalgamated_code = ct.generate_amalgamated_code(STARTER,OUTPUT)

~~~

### Comand Line Operations

#### Compile an Project 
it wil copile the given file

~~~python


import CToolKit as ct

COMPILER = 'gcc'
FILE = 'test.c'
OUTPUT = 'test.out'
ct.compile_project(
 FILE,
 COMPILER,
 OUTPUT,
 raise_errors=True,
 raise_warnings=True
)
~~~

#### Testing copilation with valgrind 

Execute an valgrind testing of the given binary ( you need to have valgrind installed in your os)

~~~python
import CToolKit as ct

COMPILER = 'gcc'
FILE = 'test.c'
OUTPUT = 'test.out'
ct.compile_project(
 COMPILER,
 FILE,
 OUTPUT,
 raise_errors=True,
 raise_warnings=True
)

FLAGS = ['-libcur']
ct.test_binary_with_valgrind(OUTPUT, FLAGS)
~~~
Executing copilation and test with file with a single comand 
~~~python
import CToolKit as ct

COMPILER = 'gcc'
FILE = 'test.c'

ct.execute_test_for_file(FILE,COMPILER)

~~~

Executing Test with all .c or .cpp files in the given folder 

~~~python 
import CToolKit as ct


test = ct.FolderTestPreset(folder='tests/main_test',side_effect_folder='tests/target')
# wil create non existent outputs
test.generate_ouptut()
# will start the test
test.start_test()


~~~

#### Execution 
you can execute an binary with the ComandLine Execution class

~~~python

import CToolKit as ct

COMPILER = 'gcc'

FILE = 'test.c'
OUTPUT = 'test.out'
ct.compile_project(
 FILE,
 COMPILER,
 OUTPUT,
 raise_errors=True,
 raise_warnings=True
)

execution = ct.ComandLineExecution(f'./{OUTPUT}')

print('output:', execution.output)
print('statuscode:', execution.status_code)
~~~
#### Readme Replacement 
you can replace readme content with code system 
for these just tipe: < + !--codeof:test.c-->, you can see 
these example in the following lib:
https://github.com/OUIsolutions/CTextEngine

~~~Markdown
Will free the memory
<!--codeof:exemples/free.c-->
~~~
~~~python

import CToolKit as ct

ct.include_code_in_markdown('README.md')
~~~