semvec/pypi-packages huggingface dataset:
macaddr 2.1
Working with network MAC addresses

# macaddr

As a network engineer you many have to deal with MAC address values.  In some
cases a network operating system wants the MAC address in a particular format. 
The following are common formats:

    * aa:bb:cc:dd:ee:ff
    * aabb-ccdd-eeff
    * aabb.ccdd.eeff

As well as their upper-case variants, AA:BB:CC:DD:EE:FF for example.

This package provides the `MacAddress` class definition and a supporting `format`
method that allows you to develop programs using a MAC address in different formats.

# Installation
```shell
pip install macaddr
```
# Usage

By default the MacAddress is formated in the "2 byte colon separated" format.


```python
from macaddr import MacAddress

mac = MacAddress("aabb.ccdd.eeff")
print(mac)
```
```shell
aa:bb:cc:dd:ee:ff
```

You can obtain differnt formats using the `format` method.

```python
from macaddr import MacAddress

mac = MacAddress("aabb.ccdd.eeff")
print(mac.format(size=4, sep='-', to_case=str.upper))
```
```shell
AABB-CCDD-EEFF
```

The `format` method values are cached so that repeated calls to `format` with
the same arguments return the cached value.  For example, if you had a network
of 1000 devices, 500 of them required the "2-colon" format and 500 of them
required the "4-dot" format, then these two formats are only computed twice.
sqlbatis 0.9.0
A tool that help u to interact with DB more easily

## SQLBatis

![License](https://img.shields.io/github/license/1011-1-000/SQLBatis?style=flat-square)
![PyPI - Python Version](https://img.shields.io/badge/Python-3.6%20%7C%203.7%20%7C%203.8-blue?style=flat-square)
![Build Status](https://img.shields.io/badge/build-passing-brightgreen?style=flat-square)
[![DOC](https://img.shields.io/badge/SQLBatis-doc-orange?style=flat-square)](https://sqlbatis.readthedocs.io/en/latest/index.html)

**Under Documentation**

SQLBatis is a tool that inspired by the Mybatis, it provides an easier way to interact with the database through the raw sql.

SQLBatis allows you to migrate, update your database according to the data model you defined in your app.Also, there are several decorators and builtin functions which give you capbility to interact with your database.

Let's try it.

### Requirements

-   [SQLAlchemy-Core](https://docs.sqlalchemy.org/en/13/core/tutorial.html)
-   [Alembic](https://alembic.sqlalchemy.org/)


### Installation
Install SQLBatis with command `pip`::

    pip install sqlbatis

### Quick Tutorial

Connect to the DB

```python
from sqlbatis import SQLBatis
db = SQLBatis('sqlite:///:memory:')
```

We have provided the decorator **@db.query** to execute the raw sql, Here are CRUD examples:

```python
from sqlalchemy import Column, Integer, String
from sqlbatis import SQLBatis, Model
db = SQLBatis('sqlite:///:memory:')

class User(Model):

    id = Column(Integer, primary_key=True)
    name = Column(String)
    full_name = Column(String)


@db.query('INSERT INTO user (name, full_name) VALUS(:name, :full_name)')
def create(name, full_name):
    pass

@db.query('SELECT * FROM user')
def query_user():
    pass

@db.query('UPDATE user SET name = :name WHERE id = :id')
def update_user(name, id):
    pass

@db.query('DELETE FROM user WHERE id = :id')
def delete_user(id):
    pass

if __name__ == '__main__':
    create('10111000', 'Leo')
```

### Documentation

[More details please refer to the docs](https://sqlbatis.readthedocs.io/en/latest/index.html)