Metadata-Version: 2.1
Name: alphabet
Version: 0.0.5
Summary: A string class enhancement
Home-page: https://github.com/robertoreale/alphabet
Author: Roberto Reale
Author-email: rober.reale@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Requires-Dist: googletrans
Requires-Dist: filemagic
Requires-Dist: pygments

========
alphabet
========

.. image:: https://img.shields.io/pypi/v/alphabet.svg
   :alt: PyPI


``alphabet`` is a Python string class enhancement.

Installation
------------

The easiest way to install the package is via ``pip``::

    $ pip3 install alphabet

Usage
-----

**Obfuscation**

.. code:: python

    from alphabet import alphabet

    key = "foobar"
    s = alphabet.alphabet("python")

    print(s)
    > python

    t = s.obfuscate(key)
    print(bytes(t, 'utf-8'))
    > b'\x16\x16\x1b\n\x0e\x1c'

    print(t.obfuscate(key))
    > python

**Identify a string**

.. code:: python

    from alphabet import alphabet

    alphabet('%!').identify()
    > 'PostScript document text'

    alphabet('import os').identify()
    > 'Python'

    alphabet('<div>foobar</div>').identify()
    > 'XML'

    alphabet('Привет').identify()
    > 'ru'


