semvec/pypi-packages huggingface dataset:
humu1us-cipher 1.0.1
Encryption/decryption library
License: MIT
Keywords: AES encryption decryption

cipher
======

|pypi| |pyversion|

Encryption and decryption tools. Cipher mix AES encryption with base64 encode generating plain text encrypted files.

Usage
+++++

* variables:

.. code:: python

    >>> import cipher
    >>> cipher.encrypt("encryption_password", "something to encrypt!")
    'WDJoMWJYVXhkWE5mWlc1algxOGNSc2hFT1o2ZGRBOGhoWnByQjYzZnZBYlp3N2ZKZmVDTEw2V1ZEMWlhZ0ZyZDVpSnpVZDll'

.. code:: python

    >>> import cipher
    >>> encrypted = cipher.encrypt("encryption_password", "something to encrypt!")
    >>> cipher.decrypt("encryption_password", encrypted)
    'something to encrypt!'

* files:

.. code:: python

    >>> import cipher
    >>> txt = "file content to encrypt!"
    >>> cipher.write("/tmp/file.encrypted", "encryption_password", txt)

.. code:: python

    >>> import cipher
    >>> cipher.read("/tmp/file.encrypted", "encryption_password")
    'file content to encrypt!'

* A ``Credentials`` class can be used to handle secrets stored in ``JSON`` formats:

.. code:: python

    >>> import json
    >>> secrets = {
    ...     "db_dsn": "mysql://user:pass@host:port/dbname",
    ...     "api_token": "some token"
    ... }
    >>> cipher.write("/tmp/secrets", "encryption_password", json.dumps(secrets))
    >>>
    >>> # so, in your app you can do something like this:
    >>> import cipher
    >>> cred = cipher.Credentials("/tmp/secrets", "encryption_password")
    >>> cred.db_dsn
    'mysql://user:pass@host:port/dbname'
    >>> cred.api_token
    'some token'

Generating keys
+++++++++++++++

There are a lot of ways to create keys but a good easy to use way to create non-easy to remember keys is using ``/dev/urandom``, almost on Unix systems. For example:

.. code::

    dd if=/dev/urandom bs=16 count=1 | base64 > /path/to/key_file

The ``count`` parameter is the number of blocks to read and write, while the ``bs`` parameter is the size of each block.


CLI
+++

There is also available a nice command line. Just install ``cipher`` and start using it! ``$ ciphercmd -v`` will let you know it is ready to be used.

Installation
++++++++++++

PyPi:

::

    $ pip install humu1us-cipher

Development version:

::

    $ git clone git@github.com:humu1us/cipher.git
    $ cd cipher
    $ pip install -e .

Contribution
++++++++++++

Contributions are welcome! Feel free to report bugs or open an issue if you feel a new feature is needed. Pull requests are welcome!


.. |pypi| image:: https://img.shields.io/pypi/v/humu1us-cipher.svg?style=flat-square
   :target: https://pypi.python.org/pypi/humu1us-cipher/
.. |pyversion| image:: https://img.shields.io/pypi/pyversions/humu1us-cipher.svg?style=flat-square
   :target: https://pypi.python.org/pypi/humu1us-cipher/
pyensemblorthologues 0.2.2
Tool to download ortologue genes from ensembl compara.
License: MIT
Requires Python: >=3.6.1,<4.0

# PyEnsemblOrthologues


<p align="center">
<a href="https://pypi.python.org/pypi/pyensemblorthologues">
    <img src="https://img.shields.io/pypi/v/pyensemblorthologues.svg"
        alt = "Release Status">
</a>

<a href="https://github.com/homonecloco/pyensemblorthologues/actions">
    <img src="https://github.com/homonecloco/pyensemblorthologues/actions/workflows/main.yml/badge.svg?branch=release" alt="CI Status">
</a>

<a href="https://pyensemblorthologues.readthedocs.io/en/latest/?badge=latest">
    <img src="https://readthedocs.org/projects/pyensemblorthologues/badge/?version=latest" alt="Documentation Status">
</a>

</p>


Tool to download ortologue genes from ensembl compara


* Free software: MIT
* Documentation: <https://pyensemblorthologues.readthedocs.io>


## Features

* TODO

## Credits

This package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter) and the [zillionare/cookiecutter-pypackage](https://github.com/zillionare/cookiecutter-pypackage) project template.