semvec/pypi-packages huggingface dataset:
pyregexp 0.3.1
Simple regex library
License: MIT
Keywords: regex,regexp,engine

# pyregex(p)

## What is it

Pyregex(p) is a backtracking Regex Engine complete with all major regular-expressions' features.

It is composed of a Lexer, a Parser (a TDRD parser) and finally the Engine.

Features implemented includes:
| Feature | Syntax |
|-|-|
| match start | ^... |
| match end | ...$ |
| escaping | \\ |
| grouping | (...) |
| named group | (?\<name\>...) | 
| non-capturing group | (?:...) |
| alternative | a\|b |
| wildcard | . |
| space | \s |
| quantifiers | ? \* + |
| curly brace quantification | {exact} {min,max} {,max} {min,} |
| range element | [^a-zA-Z059] |


## Play with the engine:

```Python
from pyregexp.engine import RegexEngine

reng = RegexEngine()

reng.match('^my_(beautiful_)+regex', '^my_beautiful_beautiful_beautiful_regex')
```
idazen 0.2.0
Take control over your Ikea IDÅSEN standing desk without hassle and stay ZEN 🙌.
License: MIT
Requires Python: >=3.7.0,<4.0.0
Keywords: idasen,ikea,bluetooth,linak

# idazen

[![Actions Status](https://github.com/zifeo/idazen/workflows/CI/badge.svg)](https://github.com/zifeo/idazen/actions)
[![PyPI version](https://badge.fury.io/py/idazen.svg)](https://badge.fury.io/py/idazen)

Take control over your Ikea IDÅSEN standing desk without hassle and stay ZEN 🙌.

## Getting started

```
# pypi
pip install idazen

# master
pip install --upgrade git+https://github.com/zifeo/idazen.git   
```

### MacOS

You may need to add your Terminal (or other) app to the Bluetooth allowlist `System Preferences > Security & Privacy > Bluetooth`.

## Usage

```
> idazen scan
Scanning 10s...
Found: Desk 7764 (3C9D3306-3B80-4D68-8670-AC9451083BC5)
Use "idazen save 3C9D3306-3B80-4D68-8670-AC9451083BC5" or "idazen scan --save"
```

```
> idazen move 78
Height set to 78.22
```
sm4 1.0.2
A pure Python implementation for the SM4 algorithm
License: MIT

![version](https://img.shields.io/pypi/v/sm4.svg) ![license](https://img.shields.io/pypi/l/sm4.svg)

# SM4
A pure Python implementation for the famous SM4 algorithm, supporting Python 2 and 3.

## Installation
Using `pip`:
```bash
$ pip install sm4 
```

Or manually download the archive and run the command after extracting the stuff inside:
```bash
$ python setup.py install
```

## Usage
Firstly, define a `SM4Key` object by passing your encryption / decryption key. The key should be of length 16.
Note that the key should be written as `bytes` in *Python 3*.
```python
from sm4 import SM4Key
key0 = SM4Key(b"any length16 key")
```

Secondly, encrypt messages by calling the method `encrypt()` from the `SM4Key` object, or decrypt them by calling `decrypt()`.
Note that the messages should be written as `bytes` in *Python 3*.
```python
key0.encrypt(b"Any very very very long message!")  # -> b'\x15\x8a\x18_qg\xf4%\x080\xb2HEFFO\x90\x0e\xc1\xbb\x07\xe5\xae\xed\xd5\x90\xf4K\xfb\xae]\xae'
```

By default, *ECB Mode* is used. You may enable *CBC Mode* by passing the argument `initial`, as the *Initial Value*.
The argument should be a `bytes` object of length 16. 
```python
key0.encrypt(b"any long message", initial=b"\0"*16)        # -> b'\x15\x8a\x18_qg\xf4%\x080\xb2HEFFO\x98\x01}1\xe3\xa5oL\xdf\x95(A\xd8\xce\x14\xc9'
```

The *SM4* algorithm requires the message to be of any length that is a multiple of 16.
By default, the length of the message to encrypt / decrypt is assured by users.
You may choose to turn on *PKCS5 Padding Mode*(by passing the argument `padding` with a TRUTHY value), telling Python to do the padding before encryption for you.
```python
key0.encrypt(b"abc", padding=True)  # -> b'K\x9euZ\x03\x96\xe0\x93+\xc9%Z\xab\xf5\xff\x17'
```

While in decryption with *PKCS5 Padding*, the length of the message is still required to be a multiple of 8. But after decryption, Python will throw the padding characters away. 
```python
key0.decrypt(b"K\x9euZ\x03\x96\xe0\x93+\xc9%Z\xab\xf5\xff\x17", padding=True)  # -> b"abc"
```
des 1.0.6
A pure Python implementation for the famous DES algorithm
License: MIT

![version](https://img.shields.io/pypi/v/des.svg) ![license](https://img.shields.io/pypi/l/des.svg)

# DES (Data Encryption Standard)
A pure Python implementation for the famous DES algorithm, supporting Python 2 and 3.

## Installation
Using `pip`:
```bash
$ pip install des 
```

Or manually download the archive and run the command after extracting the stuff inside:
```bash
$ python setup.py install
```

## Usage
Firstly, define a `DesKey` object by passing your encryption / decryption key. The key should be of length 8, 16 or 24. The algorithm will be automatically chosen for you.
Note that the key should be written as `bytes` in *Python 3*.
```python
from des import DesKey
key0 = DesKey(b"some key")                  # for DES
key1 = DesKey(b"a key for TRIPLE")          # for 3DES, same as "a key for TRIPLEa key fo"
key2 = DesKey(b"a 24-byte key for TRIPLE")  # for 3DES
key3 = DesKey(b"1234567812345678REAL_KEY")  # for DES, same as "REAL_KEY"
```

You may know whether a key is for *DES* or *3DES* algorithm by calling its method `is_single()` or `is_triple()`.
```python
key0.is_single()  # -> True
key1.is_triple()  # -> True
key2.is_single()  # -> False
key3.is_triple()  # -> False
```

Secondly, encrypt messages by calling the method `encrypt()` from the `DesKey` object, or decrypt them by calling `decrypt()`.
Note that the messages should be written as `bytes` in *Python 3*.
```python
key0.encrypt(b"any long message")  # -> b"\x14\xfa\xc2 '\x00{\xa9\xdc;\x9dq\xcbr\x87Q"
```

By default, *ECB Mode* is used. You may enable *CBC Mode* by passing the argument `initial`, as the *Initial Value*.
The argument may be either a `bytes` object of length 8 or an integer using *big-endian*. 
```python
key0.encrypt(b"any long message", initial=0)        # -> b"\x14\xfa\xc2 '\x00{\xa9\xb2\xa5\xa7\xfb#\x86\xc5\x9b"
key0.encrypt(b"any long message", initial=b"\0"*8)  # same as above
```

The *DES* algorithm requires the message to be of any length that is a multiple of 8.
By default, the length of the message to encrypt / decrypt is assured by users.
You may choose to turn on *PKCS5 Padding Mode*(by passing the argument `padding` with a TRUTHY value), telling Python to do the padding before encryption for you.
```python
key0.encrypt(b"abc", padding=True)  # -> b"%\xd1KU\x8b_A\xa6"
```

While in decryption with *PKCS5 Padding*, the length of the message is still required to be a multiple of 8. But after decryption, Python will throw the padding characters away. 
```python
key0.decrypt(b"%\xd1KU\x8b_A\xa6", padding=True)  # -> b"abc"
```

## Note
Because DES keys are 56 bits and the input key to this algorithm is 8, 16 or 24 bytes, this implementation ignores the least significant bit of each key byte.
freegeoip-client 1.0.5
FreeGeoIp's RESTful API client for Python
License: MIT
Requires Python: >=3.6
Keywords: FreeGeoIp,Client,REST API Client

# Description

Simple Python library made for consuming [FreeGeoIp's](https://freegeoip.app/) RESTful API. API returns geo location data either for
the current IP address that made the request or for the provided IP address.

## Installing and usage

Install using pip (available at [pypi - freegeoip-client](https://pypi.org/project/freegeoip-client/))

```bash
pip install freegeoip-client
```

Use it in code

```python
from freegeoip_client import FreeGeoIpClient

client = FreeGeoIpClient(api_key="some_api_key")

geo_data = client.get_geo_location()
geo_data_by_ip = client.get_geo_location_for_ip_address("8.8.8.8")
```

Example output

```python
>>> from freegeoip_client import FreeGeoIpClient
>>> client = FreeGeoIpClient(api_key="some_api_key")
>>> client.get_geo_location_for_ip_address("8.8.8.8")
{'ip': '8.8.8.8', 'country_code': 'US', 'country_name': 'United States', 'region_code': '', 'region_name': '', 'city': '', 'zip_code': '', 'time_zone': 'America/Chicago', 'latitude': 37.751, 'longitude': -97.822, 'metro_code': 0}
```

## Building project locally

Using [pip - Package Installer for Python](https://pip.pypa.io/en/stable/) and `setup.py`, `__init__.py` files to define which modules will be included in a package, project can be built and installed locally in order to import it in another Python script.

```bash
# OS-level (/usr/local/lib/<python version>)
python -m pip install -e .

# for current user (/home/<user>)
python -m pip install --user -e .

# virtual environment (wherever virtual environment is initialized)
python -m venv env
source /env/bin/activate
python -m pip install -e .
```

Importing in different script(s):

```python
from freegeoip_client import FreeGeoIpClient
```

## Third party dependencies for project development

Required:

- [requests](https://docs.python-requests.org/en/latest/) - Required to make HTTP requests

Not required (but highly encouraged to improve code quality):

- [flake8](https://flake8.pycqa.org/en/latest/) - Tool to enforce style guide for Python code ([PEP8](https://www.python.org/dev/peps/pep-0008/))
- [black](https://github.com/psf/black) - tool to format Python code
- [pytest](https://docs.pytest.org/en/7.0.x/) - framework for writing small and readable tests
- [requests-mock](https://requests-mock.readthedocs.io/en/latest/overview.html) - library at its core is simply a transport adapter that can be preloaded with responses that are returned if certain URIs are requested

Dependencies are defined in `requirements.txt` file and are installed using [pip](https://pip.pypa.io/en/stable/). Dependencies can be installed on OS-level, for current user or within virtual environments.

```bash
# OS-level (/usr/local/lib/<python version>)
python -m pip install -r requirements.txt

# for current user (/home/<user>)
python -m pip install --user -r requirements.txt

# virtual environment (wherever virtual environment is initialized)
python -m venv env
source /env/bin/activate
python -m pip install -r requirements.txt
```