semvec/pypi-packages huggingface dataset:
py-diffie-hellman 1.0.1
Python implementation of the Diffie-Hellman key exchange protocol
Requires Python: >=3.6

# py-diffie-hellman

[![PyPI](https://img.shields.io/pypi/v/py-diffie-hellman?style=for-the-badge)](https://pypi.org/project/py-diffie-hellman/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000?style=for-the-badge)](https://github.com/psf/black)

Python implementation of the [Diffie-Hellman key exchange protocol](https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange).

Supports RFC 3526 MODP Groups 5, 14, 15, 16, 17, 18 (1536 to 8192 bit) and RFC 2409 Groups 1 and 2 (768 and 1024 bit).
The default group is 14 (2048-bit).

The key length in bits may be supplied to the constructor, defaults to 540-bit.

## Example
Encryption
```python
from diffiehellman import DiffieHellman

# automatically generate two key pairs
dh1 = DiffieHellman(group=14, key_bits=540)
dh2 = DiffieHellman(group=14, key_bits=540)

# get both public keys
dh1_public = dh1.get_public_key()
dh2_public = dh2.get_public_key()

# generate shared key based on the other side's public key
dh1_shared = dh1.generate_shared_key(dh2_public)
dh2_shared = dh2.generate_shared_key(dh1_public)

# the shared keys should be equal
assert dh1_shared == dh2_shared
```
Emailer 1.1
Email sender
Keywords: python,HTML,Email,email sender,Emailer,Mail

## Emailer


* `Send Email easily with python.`

<br>

## Installation

* Install Package Using `pip`
   ```shell script
   python3 pip install Emailer
   ```
  
<br>

### How to use:

* How to send Email
    ```python
    from Emailer.core import EmailSender

    # Configuring HOST
    HOST_USER = 'example@gmail.com'
    HOST_PASSWORD = 'secretpassword'
    sender = EmailSender(HOST_USER, HOST_PASSWORD)
    
    # Lets send the email
  
    # This is out email content (a html file) You can also refer
    # to variables like jinja template
    html_file_path = '/some/path/name.html' # <h1>Hey {{ name }}<h1>
    context = {'name': 'Anonymous'} # The value of variable in html {{ name }}
    receiver = 'someone@gmail.com'
    subject = 'Nothing Special'
  
    sender.send(
      receiver=receiver,
      subject=subject,
      template=html_file_path,
      context=context
    )
  
    # And done.Email sent 🎊🎉
    ```

* You can also send text instead of html file
`Defaultly its set to TEMPLATE_TYPE_PATH to use html file path`
    ```python
    from Emailer import template_types
  
    sender.send(
      receiver=receiver,
      subject=subject,
      template='Just a text',
      template_type=template_types.TEMPLATE_TYPE_TEXT
    )
    
    # Just change the template type to text.
    ```

* Changing Server, Port
`defaultly its set to Gmail server:'smtp.gmail.com', port:465`
    ```python
    sender.send(
      receiver=receiver,
      subject=subject,
      template='Just a text',
      template_type=template_types.TEMPLATE_TYPE_TEXT,
      
      SERVER='Email server',
      PORT='Email servers port'
    )
    ```
stankeviciuscalculator 0.3
Calculator module. 

## Python Calculator with memory function

Contains class - Calculator

Methods:
   
.add   
.subtract  
.multiply  
.division  
.n_root  
.reset_memory - resets calculator memory to 0

### Installation

pip install stankeviciuscalculator

### Usage

You can start calculator with starting point 0 or any other number you prefer.

```
from stankeviciuscalculator import Calculator
calc = Calculator(4)
calc.add(2) # result would be 6. Result saved to memory.
calc.subtract(1) # result would be 5. New result overwrites calculator memory
HTMLTemplateRender 1.0.1
Html template renderer
Keywords: python,HTML,template,html template renderer,HTMLTemplateRender

## HTMLTemplateRender


* `Rendering html file with variables into text`

<br>

## Installation

* Install Package Using `pip`
   ```shell script
   python3 pip install HTMLTemplateRender
   ```
  
<br>

### How to use:

* HTML File (test.html)
    `Use {{ variable }} to assign value`
   ```html
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Test</title>
    </head>
    <body>
        <h1>Hey there {{ username }}</h1>
        <h2>It's {{ day_name }}</h2>
    </body>
    </html>
   ```

   * Lets Render the file
    ```python
    from HTMLTemplateRender.renderer import render_template

    context = {
        'username': 'Anonymous',
        'day_name': 'Sunday'
    }
    
    result = render_template(template_path='test.html', context=context)
    print(result)
    ```

* Output
    ```html
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Test</title>
    </head>
    <body>
        <h1>Hey there Anonymous</h1>
        <h2>It's Sunday</h2>
    </body>
    </html>
    
    Process finished with exit code 0

    ```
mdpt 0.1
protocol
Requires Python: >=3.6

**mdmt**\
is a protocol for data transfer

project include:\
_ request generator\
_ request parser\
_ simple socket server / client

\
\
request:

    mdpt/0.1
    length: ##
    ##meta##
    
    -
    ##data##

\
\
generating:

    mdpt(meta).g(data)
\
parsing data:

    mdpt().u(pkg)
\
parsing metadata:

    mdpt().m(pkg)
\
parsing data length:

    mdpt().l(pkg, include_meta, minus)
include_meta: bool if True returns length with metadata
minus: int subtracts minus value