semvec/pypi-packages huggingface dataset:
virtualmod 1.0.0
Python package for creating and importing virtual modules.
License: MIT

virtualmod
==========

[![PyPI version](https://badge.fury.io/py/virtualmod.svg)](https://badge.fury.io/py/virtualmod)

Python package for creating and importing virtual modules.

## Install

```bash
pip install virtualmod
```

## Examples
### Module object
Manually creating and registering a module with `virtualmod`.

```python
import virtualmod

# Create a new empty virtual module
module = virtualmod.create_module('custom_module')

# Add attribute to module
module.key = 'value'


# Use decorator to add a function to the module
# NOTE: You can use `add_to_module(module, name='new_name')` to override the module attribute name
@virtualmod.add_to_module(module)
def module_function(name):
    print('Hello', name)


# Use decorator to add a class to the module
@virtualmod.add_to_module(module)
class ModuleClass:
    pass


# Import and use our virtual module
import custom_module

print('Key:', custom_module.key)
custom_module.module_function('virtualmod')
print(custom_module.ModuleClass())
```

### Class definition
`virtualmod` also comes with the ability to use class definitions to define virtual modules.

```python
import virtualmod


# Use class definition to define our virtual module "custom_module"
class CustomModule(virtualmod.VirtualModule):
    # Define the module's name (would be "CustomModule" otherwise)
    __module_name__ = 'custom_module'

    # Add an attribute
    key = 'value'

    # Add a function
    # NOTE: There is no `cls` or `self`
    def module_function(name):
        print('Hello', name)

    # Add a class to the module
    class ModuleClass:
        pass


# Import and use our virtual module
import custom_module

print('Key:', custom_module.key)
custom_module.module_function('virtualmod')
print(custom_module.ModuleClass())
```

### Override an existing module
`virtualmod`'s module finder is registered before the standard builtin finders.
This means if you register a module under a name of an existing module yours would be found and loaded first

```python
import virtualmod

# Create a virtual module under the name "socket"
my_socket = virtualmod.create_module('socket')

# Import socket module
import socket

# Test if the loaded socket module is the one we created
print(socket is my_socket)
```
quickviz 0.3.2
quickviz: interactive widgets for plotting pandas dataframes.
License: MIT

Widgets for quickly visualizing pandas dataframes

It is often necessary to plot data in order to understand it. Plotting
allows to quiclky spot glitches in the data: that person who is 180 meters
tall or this car which can speed thousands of kilometers per hour will
immediately stand out. In this situation, one wants a way to quickly
(rather than beautifully) plot their data. Quickviz provides a set of
widgets to do this in a few clicks.
LightMagic 0.3.7
LightMagic is very simple and quick python3 ORM over momoko/psycopg2.
License: MIT

LightMagic
==========
LightMagic is very simple and quick python3 ORM over momoko/psycopg2.

Введение
--------
LightMagic - это простая и быстрая (условно) ORM система для Postgres.

Система позволяет использовать ограниченный набор запросов для конкретной модели, в частности::

* create()
* get_list()
* load()
* remove()
* upsert()

и использовать оператор join() для нескольких моделей.

При необходимости Вы можете легко расширить свою модель дополнительными методами.

LightMagic изначально разрабатывалась как ORM для Tornado +  Postgres, но Вы так же можете использовать одни и те же
модели и для обычных (синхронных) скриптов (например cron).

Простой вариант использования::

    import LightMagic.types as types
    from LightMagic.db.Model import Model
    class ExampleClass(Model):
        """Just Example Class"""
        id = types.Int(value=3, allow_none=False, db_primary_key=True, db_autovalue=True)
        region = types.Str(allow_none=False, db_primary_key=True, db_autovalue=False, db_default_value='Moscow')
        name = types.Str(min_length=3, max_length=10)
        name_2 = types.Str(regexp=re.compile('^[a-z]{1,3}$'))
        cdate = types.DateTime(db_default_value='NOW()')
        udate = types.DateTime(db_default_value='NOW()')
        params = types.Json(db_default_value='{}')
        list = types.List(type_of_elements=int, db_type=None)
        uuid4 = types.UUID4()
        pan = types.CardPan()
        enum = types.Enum(list_of_values=('a', 1, 10, 8))
        lang = types.Language()
        email = types.Email()
        secret_string = types.CryptoAES(secret_key='qnflslglslvn3ogl', initialization_vector='fhwkfnwifh3hfhsh')

        def get_table_name(self):
            return 'test.table'

License
-------
LightMagic is distributed under the MIT license http://www.opensource.org/licenses/mit-license.php
anonymizeip 1.0.0
Python library for anonymizing IP addresses
License: MIT
Requires Python: >=3.3.0


# anonymize_ip

This is a simple Python library for anonymizing IP addresses. Both IPv4 and IPv6 addresses are supported.

Examples:

* IPv4: `95.239.169.11` → `95.239.169.0`
* IPv6: `5219:3a94:fdc5:19e1:70a3:b2c4:40ef:ae03` → `5219:3a94:fdc5:19e1::`


## Usage

```
pip install anonymizeip
```

```py
from anonymizeip import anonymize_ip

address = "fe80::0202:b3ff:fe1e:8329"
anonymized = anonymize_ip(address)
print(anonymized)

# Prints "fe80::"
```


## Settings

The number of address blocks that are set to 0 can be customized.

Besides the IP address, the function `anonymize_ip` takes two optional parameters:

```py
anonymize_ip(
  address,
  ipv4_mask="...",
  ipv6_mask="..."
)
```

* `ipv4_mask`: Defaults to `255.255.255.0`, i.e. the last octet will be anonymized (set to 0)
* `ipv6_mask`: Defaults to `ffff:ffff:ffff:ffff::` (same as `ffff:ffff:ffff:ffff:0:0:0:0`), i.e. the last four blocks will be anonymized (set to 0)


## Development

1. `git clone`
2. `pipenv install --dev`
3. Make your code modifications
4. `pipenv run test`
5. `pipenv run lint`

Contributions are always welcome. Please first discuss changes via issue before submitting a pull request.


## Credits

The implementation of this library was strongly inspired by [php-ip-anonymizer](https://github.com/geertw/php-ip-anonymizer) by Geert Wirken.