semvec/pypi-packages huggingface dataset:
l2address 1.0.1
MAC address manipulation library
License: MIT
Keywords: Networking,Telecommunication,MAC,L2

# l2address

Micro library I'm planing to develop by using TDD approach, just to try it.

## Example usage

```python

import l2address

mac = l2address.mac_address(0xff00ff)
print(mac)
# 00:00:00:ff:00:ff
mac += 0xff00
print(mac)
# 00:00:00:ff:ff:ff
mac -= l2address.mac_address('00:00:00:ff:ff:f0')
print(mac)
# 00:00:00:00:00:0f
print(mac == l2address.mac_address(0xf))
# True
print(l2address.mac_address('ffffffffffff') + 1)
# 00:00:00:00:00:00
print(l2address.mac_address(0xff, l2address.PeriodFormatter(4)))
# 0000.0000.00ff
```

## Features

At the current moment supports:

- Create MAC address from int
- Create MAC address from str
- Sum and Substitution of MAC addresses (and with ints)
- Convert MAC to string
- Different formatting types (00:00:00:00:00:00, 0000.0000.0000, 00-00-00-00-00-00, and so on)
- Validation of format when parsing from string. There are predefined formats, but can be extended, see: [Extending Formats](#extending-formats)

## Extending Formats

```python
import l2address
from l2address.utils import per_join

# Just inherit l2address.Formatter and use new formatter


class MyMacStarFormatter(l2address.Formatter):
    def format(self, value, max_value):
        return per_join(self._to_clean_str(value, max_value), '*', 2)

    def _get_validator_regexp(self, _str, max_value):
        return r'^([\da-fA-F][\da-fA-F]\*?){6}'


try:
    l2address.mac_address('AB*ab*bc*de*ff*ff')
except ValueError:
    print('Failed as expected')
    # Failed as expected

mac = l2address.mac_address('AB*ab*bc*de*ff*ff', MyMacStarFormatter())
print(mac)
# ab*ab*bc*de*ff*ff
print(mac.to_str(l2address.ColonFormatter()))
# ab:ab:bc:de:ff:ff
print(l2address.mac_address(0xff).to_str(MyMacStarFormatter()))
# 00*00*00*00*00*ff
```

## Plans

- Multiplication by int
- Different lengths of MAC address (there are 64 bit MAC addesses I believe)
spacevader 0.0.4
A simple space invader game developed purely in Python
License: MIT
Requires Python: >=3.6
Keywords: space,invader,vader,spaceinvader,space-invader,spacevader,space-vader,space vader,space invader

========
Overview
========



A simple space invaders game developed purely in Python

* Free software: MIT license

.. image:: https://github.com/pratikms/spacevader/blob/master/screenshots/GameInProgress.png?raw=true
.. image:: https://github.com/pratikms/spacevader/blob/master/screenshots/GameOver.png?raw=true

Installation
============

::

    pip install spacevader

You can also install the in-development version with::

    pip install https://github.com/pratikms/spacevader/archive/master.zip


Documentation
=============


https://spacevader.readthedocs.io/


Development
===========

To run the all tests run::

    tox

Note, to combine the coverage data from all the tox environments run:

.. list-table::
    :widths: 10 90
    :stub-columns: 1

    - - Windows
      - ::

            set PYTEST_ADDOPTS=--cov-append
            tox

    - - Other
      - ::

            PYTEST_ADDOPTS=--cov-append tox


Changelog
=========

0.0.4 (2020-02-03)
------------------

* Increase player speed
* Increase bullet speed
* Refactoring

0.0.3 (2020-01-02)
------------------

* Provide restart option on game over

0.0.2 (2019-12-18)
------------------

* Bugfix: change relative to absolute imports.

0.0.1 (2019-12-18)
------------------

* First release on PyPI.