semvec/pypi-packages huggingface dataset:
lykkellemainall 0.1.3
Modules pertaining to lykkellemainall
Requires Python: >=3.6

This is package that contains all modules needed to run
the world program i.e. prio 0 till 6
Contents:
    1. mainmasterprogalleod - mastering
    2.  maincalculationprogeodall - calculations
    3. healthcheck - exceptions and health checks
lykkellemainNAmerica 0.1.2
Modules pertaining to lykkellemainNAmerica
Requires Python: >=3.6

This is package that contains all modules needed to run
the NAmerica program i.e. prio 5
Contents:
    1. mainmasterprogeod5 - NA mastering
    2.  maincalculationprog5 - NA calculations
    3. healthcheckeod5 - exceptions and health checks
lykkellemaineurope 0.1.3
Modules pertaining to lykkellemaineurope
Requires Python: >=3.6

This is package that contains all modules needed to run
the Europe program i.e. prio 4
Contents:
    1. mainmasterprogeod4 - europe mastering
    2.  maincalculationprog4 - europe calculations
    3. healthcheckeod4 - exceptions and health checks
lykkellemainasia 0.1.3
Modules pertaining to lykkellemainasia
Requires Python: >=3.6

This is package that contains all modules needed to run
the Asia program i.e. prio 2
Contents:
    1. mainmasterprogeod2 - asia mastering
    2.  maincalculationprogasia2 - asia calculations
    3. healthcheckasia2 - exceptions and health checks
lykkellemainoceania 0.1.2
Modules pertaining to lykkellemainoceania
Requires Python: >=3.6

This is package that contains all modules needed to run
the Oceania program i.e. prio 1
Contents:
    1. mainmasterprogeod1 - oceania mastering
    2.  maincalculationprogasia1 - oceania calculations
    3. healthcheckasia1 - exceptions and health checks
lykkellemainisrael 0.1.2
Modules pertaining to lykkellemainisrael
Requires Python: >=3.6

This is package that contains all modules needed to run
the israel program i.e. prio 0
Contents:
    1. mainmasterprogeod0 - israel mastering
    2.  maincalculationprogasia0 - israel calculations
    3. healthcheckasia0 - exceptions and health checks
email-client 1.5.2
Email clients for grader and other services of fless.pro

# Email client

This repo consist email client for [grader](https://github.com/Flesspro/grader) and other services and packages.

## Installing and run

You need `python3.7`, `pytest5.0.1` and `make4.1`.

Installation: `pip install email-client`

You can see also [PyPi](https://pypi.org/project/email-client/1.3.0/).

We use makefile for run and environment variables for configuration.

You can find smtp-client and imap-client. If you want, you can customize parsing email into smtp-client, you can 
implement custom strategy and use them. For default, we use strategy for grader. 
 
To clean email (all emails are deleted):

    ENV_FILE=./.envs/my_envfile.env CLEAN=YES make clean

## Examples   

Creating IMAPClient:

    from email_client import client_pkg

    client = client_pkg.IMAPClient(
    imap_host=os.getenv('IMAP_HOST'),
    imap_port=os.getenv('IMAP_PORT'),
    login=os.getenv('EMAIL_LOGIN'),
    password=os.getenv('EMAIL_PASSWORD'),
    extract_strategy=strategy,
    )
    
You can log in:
    
    client.login()
    
And logout:

    client.logout()
    
After some minutes you must login again. A lot of servers logout automatically by a time. Also, you can clean emails: 

    client.clean_emails()
    
You can set specify folder:

    client.clean_emails('inbox')
    
Another case, you can get all emails:

    emails, statuses = client.get_imails(folder='inbox')
    
For each emails, you get specify status. If take `zip(emails, statuses)`, you got pairs. You can set `EmailType`, 
for example `UNSEEN`:

    emails, statuses = client.get_imails(email_typeEmailsTypes.UNSEEN, folder='inbox')
    
The same way, you can make SMTP client.
    
## Testing

If we integration-test, we have some stages:

* Data generation
* Create objects
* Testing
* Validation
* Clean

If we unit-test, we have some stages: 

* Create objects
* Testing
* Validation

In this way unit-test is partial case of integration test. We use unit-test for testing 
logic in context one object, function (method). For example, we have function:

    def plus(a, b):
        return a + b
        
This is unit-test. We want to test simple object. This situation is not always possible. 
If we want communication some systems and modules, we deal with integration tests. 
For example, we test connect to data base and collect data from there. This is 
integration-tests. 

All tests lay down into folder:

    tests/

If you want to run tests, you can do this (all emails are deleted):

    ENV_FILE=.envs/my_envfile.env make test
    
Example `test.env`:

    EMAIL_TIMEOUT_TEST=1.5  # Timeout for waiting between reading and writing of emails

    IMAP_HOST=imap.mail.ru
    IMAP_PORT=993
    SMTP_HOST=smtp.mail.ru
    SMTP_PORT=587
    
    EMAIL_LOGIN=my@email.ru
    EMAIL_PASSWORD=my_password


### Emails (integration)

We have some clients for email:

* SMTP-client sends emails
* IMAP-client receives emails

For emails client we have not best way. We test SMTP-client over IMAP-client and IMAP-client
over SMTP-client.